#include <AEEncoderFFmpeg.h>
◆ CAEEncoderFFmpeg()
CAEEncoderFFmpeg::CAEEncoderFFmpeg |
( |
| ) |
|
◆ ~CAEEncoderFFmpeg()
CAEEncoderFFmpeg::~CAEEncoderFFmpeg |
( |
| ) |
|
|
override |
◆ 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
-
in | the PCM samples encoder requested format |
in_size | input buffer size |
output | buffer |
out_size | output buffer size |
- Returns
- size of encoded data
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
-
data | return 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
-
bufferSize | how 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
-
format | the desired audio format, may be changed to suit the encoder |
allow_planar_input | allow 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
-
format | the format to compare |
- Returns
- true if compatible, false if not
Implements IAEEncoder.
◆ Reset()
void CAEEncoderFFmpeg::Reset |
( |
| ) |
|
|
overridevirtual |
Reset the encoder for new data
Implements IAEEncoder.
The documentation for this class was generated from the following files: