11 #include "cores/AudioEngine/Utils/AEAudioFormat.h" 14 #include <libavcodec/avcodec.h> 51 virtual void Reset() = 0;
79 virtual int Encode (uint8_t *in,
int in_size, uint8_t *out,
int out_size) = 0;
86 virtual int GetData(uint8_t **data) = 0;
93 virtual double GetDelay(
unsigned int bufferSize) = 0;
virtual unsigned int GetBitRate()=0
Returns the bitrate of the encoder.
virtual int Encode(uint8_t *in, int in_size, uint8_t *out, int out_size)=0
Encodes the supplied samples into a provided buffer.
virtual bool Initialize(AEAudioFormat &format, bool allow_planar_input=false)=0
Called to setup the encoder to accept data in the specified format.
virtual unsigned int GetFrames()=0
Return the number of frames needed to encode.
virtual double GetDelay(unsigned int bufferSize)=0
Get the delay in seconds.
IAEEncoder interface for on the fly audio compression.
Definition: AEEncoder.h:20
virtual AVCodecID GetCodecID()=0
Returns the AVCodecID of the encoder.
virtual bool IsCompatible(const AEAudioFormat &format)=0
Return true if the supplied format is compatible with the current open encoder.
IAEEncoder()=default
Constructor.
virtual int GetData(uint8_t **data)=0
Get the encoded data.
virtual ~IAEEncoder()=default
Destructor.
virtual void Reset()=0
Reset the encoder for new data.