xbmc
Public Member Functions | List of all members
CAEEncoderFFmpeg Class Reference
Inheritance diagram for CAEEncoderFFmpeg:
Inheritance graph
[legend]
Collaboration diagram for CAEEncoderFFmpeg:
Collaboration graph
[legend]

Public Member Functions

bool IsCompatible (const AEAudioFormat &format) override
 Return true if the supplied format is compatible with the current open encoder. More...
 
bool Initialize (AEAudioFormat &format, bool allow_planar_input=false) override
 Called to setup the encoder to accept data in the specified format. More...
 
void Reset () override
 Reset the encoder for new data.
 
unsigned int GetBitRate () override
 Returns the bitrate of the encoder. More...
 
AVCodecID GetCodecID () override
 Returns the AVCodecID of the encoder. More...
 
unsigned int GetFrames () override
 Return the number of frames needed to encode. More...
 
int Encode (uint8_t *in, int in_size, uint8_t *out, int out_size) override
 Encodes the supplied samples into a provided buffer. More...
 
int GetData (uint8_t **data) override
 Get the encoded data. More...
 
double GetDelay (unsigned int bufferSize) override
 Get the delay in seconds. More...
 
- Public Member Functions inherited from IAEEncoder
 IAEEncoder ()=default
 Constructor.
 
virtual ~IAEEncoder ()=default
 Destructor.
 

Member Function Documentation

◆ Encode()

int CAEEncoderFFmpeg::Encode ( uint8_t *  in,
int  in_size,
uint8_t *  out,
int  out_size 
)
overridevirtual

Encodes the supplied samples into a provided buffer.

Parameters
inthe PCM samples encoder requested format
in_sizeinput buffer size
outputbuffer
out_sizeoutput buffer size
Returns
size of encoded data

: This is a workaround for our current design. The caller should be made

Implements IAEEncoder.

◆ GetBitRate()

unsigned int CAEEncoderFFmpeg::GetBitRate ( )
overridevirtual

Returns the bitrate of the encoder.

Returns
bit rate in bits per second

Implements IAEEncoder.

◆ GetCodecID()

AVCodecID CAEEncoderFFmpeg::GetCodecID ( )
overridevirtual

Returns the AVCodecID of the encoder.

Returns
the ffmpeg codec id

Implements IAEEncoder.

◆ GetData()

int CAEEncoderFFmpeg::GetData ( uint8_t **  data)
overridevirtual

Get the encoded data.

Parameters
datareturn pointer to the buffer with the current encoded block
Returns
the size in bytes of *data

Implements IAEEncoder.

◆ GetDelay()

double CAEEncoderFFmpeg::GetDelay ( unsigned int  bufferSize)
overridevirtual

Get the delay in seconds.

Parameters
bufferSizehow much encoded data the caller has buffered to add to the delay
Returns
the delay in seconds including any un-fetched encoded data

Implements IAEEncoder.

◆ GetFrames()

unsigned int CAEEncoderFFmpeg::GetFrames ( )
overridevirtual

Return the number of frames needed to encode.

Returns
number of frames (frames * channels = samples * bits per sample = bytes)

Implements IAEEncoder.

◆ Initialize()

bool CAEEncoderFFmpeg::Initialize ( AEAudioFormat format,
bool  allow_planar_input = false 
)
overridevirtual

Called to setup the encoder to accept data in the specified format.

Parameters
formatthe desired audio format, may be changed to suit the encoder
allow_planar_inputallow engine to use with planar formats
Returns
true on success, false on failure

Implements IAEEncoder.

◆ IsCompatible()

bool CAEEncoderFFmpeg::IsCompatible ( const AEAudioFormat format)
overridevirtual

Return true if the supplied format is compatible with the current open encoder.

Parameters
formatthe format to compare
Returns
true if compatible, false if not

Implements IAEEncoder.


The documentation for this class was generated from the following files: