Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
IAEEncoder Class Referenceabstract

#include <AEEncoder.h>

Inheritance diagram for IAEEncoder:
CAEEncoderFFmpeg

Public Member Functions

 IAEEncoder ()=default
 
virtual ~IAEEncoder ()=default
 
virtual bool IsCompatible (const AEAudioFormat &format)=0
 
virtual bool Initialize (AEAudioFormat &format, bool allow_planar_input=false)=0
 
virtual void Reset ()=0
 
virtual unsigned int GetBitRate ()=0
 
virtual AVCodecID GetCodecID ()=0
 
virtual unsigned int GetFrames ()=0
 
virtual int Encode (uint8_t *in, int in_size, uint8_t *out, int out_size)=0
 
virtual int GetData (uint8_t **data)=0
 
virtual double GetDelay (unsigned int bufferSize)=0
 

Detailed Description

IAEEncoder interface for on the fly audio compression

Constructor & Destructor Documentation

◆ IAEEncoder()

IAEEncoder::IAEEncoder ( )
default

Constructor

◆ ~IAEEncoder()

virtual IAEEncoder::~IAEEncoder ( )
virtualdefault

Destructor

Member Function Documentation

◆ Encode()

virtual int IAEEncoder::Encode ( uint8_t * in,
int in_size,
uint8_t * out,
int out_size )
pure virtual

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

Implemented in CAEEncoderFFmpeg.

◆ GetBitRate()

virtual unsigned int IAEEncoder::GetBitRate ( )
pure virtual

Returns the bitrate of the encoder

Returns
bit rate in bits per second

Implemented in CAEEncoderFFmpeg.

◆ GetCodecID()

virtual AVCodecID IAEEncoder::GetCodecID ( )
pure virtual

Returns the AVCodecID of the encoder

Returns
the ffmpeg codec id

Implemented in CAEEncoderFFmpeg.

◆ GetData()

virtual int IAEEncoder::GetData ( uint8_t ** data)
pure virtual

Get the encoded data

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

Implemented in CAEEncoderFFmpeg.

◆ GetDelay()

virtual double IAEEncoder::GetDelay ( unsigned int bufferSize)
pure virtual

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

Implemented in CAEEncoderFFmpeg.

◆ GetFrames()

virtual unsigned int IAEEncoder::GetFrames ( )
pure virtual

Return the number of frames needed to encode

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

Implemented in CAEEncoderFFmpeg.

◆ Initialize()

virtual bool IAEEncoder::Initialize ( AEAudioFormat & format,
bool allow_planar_input = false )
pure virtual

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

Implemented in CAEEncoderFFmpeg.

◆ IsCompatible()

virtual bool IAEEncoder::IsCompatible ( const AEAudioFormat & format)
pure virtual

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

Implemented in CAEEncoderFFmpeg.

◆ Reset()

virtual void IAEEncoder::Reset ( )
pure virtual

Reset the encoder for new data

Implemented in CAEEncoderFFmpeg.


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