From c89b5e3c0d9515f07892af464bd6c60fb3427c36 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Wed, 4 Dec 2019 14:53:54 +0100 Subject: Timestamp arrival of UDP packets --- src/AVTInput.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/AVTInput.h') diff --git a/src/AVTInput.h b/src/AVTInput.h index e925a80..fd6cf02 100644 --- a/src/AVTInput.h +++ b/src/AVTInput.h @@ -37,6 +37,7 @@ #include #include #include +#include #define DEF_BR 64 @@ -79,12 +80,12 @@ class AVTInput */ int setDabPlusParameters(int bitrate, int channels, int sample_rate, bool sbr, bool ps); - /*! Read incomming frames from the encoder, reorder and reassemble then into DAB+ superframes + /*! Read incoming frames from the encoder, reorder and reassemble then into DAB+ superframes *! Give the next reassembled audio frame (120ms for DAB+) * * \return the size of the frame or 0 if none are available yet */ - ssize_t getNextFrame(std::vector &buf); + size_t getNextFrame(std::vector &buf, std::chrono::system_clock::time_point& ts); /*! Store a new PAD frame. *! Frames are sent to the encoder on request @@ -118,6 +119,7 @@ class AVTInput bool _frameAligned = false; std::vector _currentFrame; int32_t _nbFrames = 0; + std::chrono::system_clock::time_point _frameZeroTimestamp; size_t _currentFrameSize = 0; bool _parseURI(const char* uri, std::string& address, long& port); -- cgit v1.2.3