#ifndef B0BCC994_AC90_4B90_9CD2_10586E958794 #define B0BCC994_AC90_4B90_9CD2_10586E958794 /* ******************************************************************************* * INCLUDE ******************************************************************************* */ #include "Frame.h" #include "SampleFormat.h" #include "ChannelLayout.h" #include namespace Video { namespace Core { /* ******************************************************************************* * CLASS DECLARE ******************************************************************************* */ class AudioFrameAdapter { public: using Ptr = Poco::SharedPtr; public: AudioFrameAdapter(ChannelLayout layout, SampleFormat format, int frameSize, int sampleRate); public: void put(Frame::Ptr pFrame); Frame::Ptr get(); protected: int remainOfReadFrame(); int spaceOfOutFrame(); uint64_t getInFrameTimestamp(); private: int _linesize; int _lines; int _sampleSize; Frame::Ptr _pInFrame; Frame::Ptr _pOutFrame; uint32_t _readIndex; uint32_t _writeIndex; uint32_t _sampleDuration; int _sampleRate; uint32_t _frameSize; uint64_t _encodeClock; }; } } #endif