|
| ||||||||||||||||
An audio encoder
| enum BitrateMode { cbr, abr, vbr } | BitrateMode |
Type to specify bitrate mode. Possible values: - cbr - constant bitrate mode described by bitrate - abr - average bitrate mode described by an average bitrate and quality - vbr - variable bitrate mode described by quality
| unsigned int inSampleRate | inSampleRate |
[private]
| unsigned int inBitsPerSample | inBitsPerSample |
[private]
| unsigned int inChannel | inChannel |
[private]
| bool inBigEndian | inBigEndian |
[private]
| BitrateMode outBitrateMode | outBitrateMode |
[private]
| unsigned int outBitrate | outBitrate |
[private]
| double outQuality | outQuality |
[private]
| unsigned int outSampleRate | outSampleRate |
[private]
| unsigned int outChannel | outChannel |
[private]
| inline void
init ( unsigned int inSampleRate,
unsigned int inBitsPerSample,
unsigned int inChannel,
bool inBigEndian,
BitrateMode outBitrateMode,
unsigned int outBitrate,
double outQuality,
unsigned int outSampleRate,
unsigned int outChannel )
throw ( Exception ) | init |
[private]
Initialize the object.
Parameters:
| inSampleRate | sample rate of the input. |
| inBitsPerSample | number of bits per sample of the input. |
| inChannel | number of channels of the input. |
| inBigEndian | shows if the input is big or little endian. |
| outBitrateMode | the bit rate mode of the output. |
| outBitrate | bit rate of the output. |
| outSampleRate | sample rate of the output. |
| outChannel | number of channels of the output. |
Throws: Exception
| inline void
strip ( void )
throw ( Exception ) | strip |
[private]
De-iitialize the object.
Throws: Exception
| inline
AudioEncoder ( void )
throw ( Exception ) | AudioEncoder |
[protected]
Default constructor. Always throws an Exception.
Throws: Exception
| inline
AudioEncoder ( unsigned int inSampleRate,
unsigned int inBitsPerSample,
unsigned int inChannel,
bool inBigEndian,
BitrateMode outBitrateMode,
unsigned int outBitrate,
double outQuality,
unsigned int outSampleRate = 0,
unsigned int outChannel = 0 )
throw ( Exception ) | AudioEncoder |
[protected]
Constructor.
Parameters:
| inSampleRate | sample rate of the input. |
| inBitsPerSample | number of bits per sample of the input. |
| inChannel | number of channels of the input. |
| inBigEndian | shows if the input is big or little endian |
| outBitrateMode | the bit rate mode of the output. |
| outBitrate | bit rate of the output (kbits/sec). |
| outQuality | the quality of the stream. |
| outSampleRate | sample rate of the output. If 0, inSampleRate is used. |
| outChannel | number of channels of the output. If 0, inChannel is used. |
Throws: Exception
| inline
AudioEncoder ( const AudioSource * as,
BitrateMode outBitrateMode,
unsigned int outBitrate,
double outQuality,
unsigned int outSampleRate = 0,
unsigned int outChannel = 0 )
throw ( Exception) | AudioEncoder |
[protected]
Constructor.
Parameters:
| as | get input sample rate, bits per sample and channels from this AudioSource. |
| outBitrateMode | the bit rate mode of the output. |
| outBitrate | bit rate of the output (kbits/sec). |
| outQuality | the quality of the stream. |
| outSampleRate | sample rate of the output. If 0, input sample rate is used. |
| outChannel | number of channels of the output. If 0, input channel is used. |
Throws: Exception
| inline
AudioEncoder ( const AudioEncoder & encoder )
throw ( Exception ) | AudioEncoder |
[protected]
Copy constructor.
Parameters:
| encoder | the AudioEncoder to copy. |
| inline AudioEncoder &
operator= ( const AudioEncoder & encoder )
throw ( Exception ) | operator= |
[protected virtual]
Assignment operator.
Parameters:
| encoder | the AudioEncoder to assign this to. |
Returns: a reference to this AudioEncoder.
Throws: Exception
Reimplemented from Sink.
| inline
~AudioEncoder ( void )
throw ( Exception ) | ~AudioEncoder |
[virtual]
Destructor.
Throws: Exception
| inline int
getInChannel ( void )
throw () | getInChannel |
[const]
Get the number of channels of the input.
Returns: the number of channels of the input.
| inline bool
isInBigEndian ( void )
throw () | isInBigEndian |
[const]
Tell if the input is big or little endian.
Returns: true if the input is big endian, false if little endian.
| inline int
getInSampleRate ( void )
throw () | getInSampleRate |
[const]
Get the sample rate of the input.
Returns: the sample rate of the input.
| inline int
getInBitsPerSample ( void )
throw () | getInBitsPerSample |
[const]
Get the number of bits per sample of the input.
Returns: the number of bits per sample of the input.
| inline int
getOutChannel ( void )
throw () | getOutChannel |
[const]
Get the number of channels of the output.
Returns: the number of channels of the output.
| inline int
getOutSampleRate ( void )
throw () | getOutSampleRate |
[const]
Get the sample rate of the output.
Returns: the sample rate of the output.
| inline BitrateMode
getOutBitrateMode ( void )
throw () | getOutBitrateMode |
[const]
Get the bit rate mode of the output.
Returns: the bit rate mode of the output.
| inline unsigned int
getOutBitrate ( void )
throw () | getOutBitrate |
[const]
Get the bit rate of the output in kbits/sec, for fixed bitrate encodings.
Returns: the bit rate of the output.
| inline double
getOutQuality ( void )
throw () | getOutQuality |
[const]
Get the encoding quality of the output, for variable bitrate encodings.
Returns: the encoding quality of the output.
| bool
isRunning ( void )
throw () | isRunning |
[const pure virtual]
Check wether encoding is in progress.
Returns: true if encoding is in progress, false otherwise.
| bool
start ( void )
throw ( Exception ) | start |
[pure virtual]
Start encoding. This function returns as soon as possible, with encoding started in the background.
Returns: true if encoding has started, false otherwise.
Throws: Exception
| void
stop ( void )
throw ( Exception ) | stop |
[pure virtual]
Stop encoding. Stops the encoding running in the background.
Throws: Exception