整理代码
This commit is contained in:
commit
c7b4e178ec
364 changed files with 59691 additions and 0 deletions
44
video/ffmpeg/AudioDecodeHandler.h
Normal file
44
video/ffmpeg/AudioDecodeHandler.h
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef AD6CD053_01C0_4CD4_B6DE_4F9D3940E437
|
||||
#define AD6CD053_01C0_4CD4_B6DE_4F9D3940E437
|
||||
/*
|
||||
*******************************************************************************
|
||||
* INCLUDE
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include "../core/AudioDecoder.h"
|
||||
extern "C"
|
||||
{
|
||||
#include <libavcodec/avcodec.h>
|
||||
}
|
||||
#include <functional>
|
||||
|
||||
namespace Video
|
||||
{
|
||||
namespace FFmpeg
|
||||
{
|
||||
/*
|
||||
*******************************************************************************
|
||||
* CLASS DECLARE
|
||||
*******************************************************************************
|
||||
*/
|
||||
class AudioDecodeHandler: public Core::AudioDecodeHandler
|
||||
{
|
||||
public:
|
||||
AudioDecodeHandler(Core::CodecID codecID, Core::AudioComponent::Ptr pPrevious);
|
||||
~AudioDecodeHandler();
|
||||
|
||||
protected:
|
||||
void write(Core::Packet::Ptr pPacket) override;
|
||||
Core::Frame::Ptr read() override;
|
||||
|
||||
Core::Frame::Ptr convert(AVFrame* pFrame);
|
||||
|
||||
private:
|
||||
AVCodecContext* _pCodecCtx;
|
||||
AVFrame* _pFrame;
|
||||
AVPacket* _pPacket;
|
||||
std::function<void(AVFrame*, Core::Frame::Ptr)> _frameConvertor;
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue