#ifndef __AUDIO_ENCODER_H__ #define __AUDIO_ENCODER_H__ #include "abstract_encoder.h" template<> class Encoder : public AbstractEncoder { public: struct Param { int bitRate; }; ~Encoder() { Close(); } bool Open(const Param& audioParma, AVFormatContext* fmtCtx); virtual void Close() override; virtual bool PushFrame(AVFrame* frame, bool isEnd, uint64_t pts) override; private: bool _Init(const Param& audioParam, AVFormatContext* fmtCtx); }; #endif