整理代码

This commit is contained in:
蒲爽 2026-09-28 21:33:04 +08:00
commit c7b4e178ec
364 changed files with 59691 additions and 0 deletions

View file

@ -0,0 +1,45 @@
#ifndef D5F58729_9077_452E_ADC5_2D75E17601EA
#define D5F58729_9077_452E_ADC5_2D75E17601EA
/*
*******************************************************************************
* INCLUDE
*******************************************************************************
*/
#include "../core/AudioEncoder.h"
extern "C"
{
#include <libavcodec/avcodec.h>
}
#include <functional>
namespace Video
{
namespace FFmpeg
{
/*
*******************************************************************************
* CLASS DECLARE
*******************************************************************************
*/
class AudioEncoder: public Core::AudioEncoder
{
public:
AudioEncoder(Core::CodecID codecID);
~AudioEncoder();
protected:
void initialize() override;
void deinitialize() override;
Core::Packet::Ptr encode() override;
void onConfigChanged(ParameterNames& names) override;
uint64_t ts = 0;
private:
AVCodecContext* _pCodecCtx;
AVFrame* _pFrame;
AVPacket* _pPacket;
std::function<void(Core::Frame::Ptr, AVFrame*)> _frameConvertor;
};
}
}
#endif