整理代码
This commit is contained in:
commit
c7b4e178ec
364 changed files with 59691 additions and 0 deletions
58
video/core/AudioFrameAdapter.h
Normal file
58
video/core/AudioFrameAdapter.h
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
#ifndef B0BCC994_AC90_4B90_9CD2_10586E958794
|
||||
#define B0BCC994_AC90_4B90_9CD2_10586E958794
|
||||
/*
|
||||
*******************************************************************************
|
||||
* INCLUDE
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include "Frame.h"
|
||||
#include "SampleFormat.h"
|
||||
#include "ChannelLayout.h"
|
||||
#include <Poco/SharedPtr.h>
|
||||
|
||||
namespace Video
|
||||
{
|
||||
namespace Core
|
||||
{
|
||||
/*
|
||||
*******************************************************************************
|
||||
* CLASS DECLARE
|
||||
*******************************************************************************
|
||||
*/
|
||||
class AudioFrameAdapter
|
||||
{
|
||||
public:
|
||||
using Ptr = Poco::SharedPtr<AudioFrameAdapter>;
|
||||
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue