Data Structures | |
| struct | MLO_DecoderStatus |
| Represents the status of an MLO_Decoder object. More... | |
| struct | MLO_DecoderConfig |
| Detailed decoder configuration information. More... | |
Defines | |
| #define | MLO_DECODER_MAX_FRAME_SIZE 8192 |
| #define | MLO_ERROR_DECODER_UNSUPPORTED_CONFIG (MLO_ERROR_BASE_DECODER-0) |
| Error: the configuration or encoding is not supported by this implementation. | |
| #define | MLO_ERROR_DECODER_INVALID_CHANNEL_CONFIGURATION (MLO_ERROR_BASE_DECODER-1) |
| Error: an invalid channel configuration was encountered. | |
| #define | MLO_ERROR_DECODER_UNSUPPORTED_FORMAT (MLO_ERROR_BASE_DECODER-2) |
| Error: the format or encoding is not supported by this implementation. | |
| #define | MLO_ERROR_DECODER_INVALID_DATA (MLO_ERROR_BASE_DECODER-3) |
| Error: invalid data. | |
Typedefs | |
| typedef MLO_Decoder | MLO_Decoder |
| Decoder object [opaque data structure]. | |
Enumerations | |
| enum | MLO_ObjectTypeIdentifier { MLO_OBJECT_TYPE_AAC_MAIN = 1, MLO_OBJECT_TYPE_AAC_LC = 2, MLO_OBJECT_TYPE_AAC_SSR = 3, MLO_OBJECT_TYPE_AAC_LTP = 4, MLO_OBJECT_TYPE_SBR = 5, MLO_OBJECT_TYPE_AAC_SCALABLE = 6, MLO_OBJECT_TYPE_TWINVQ = 7, MLO_OBJECT_TYPE_ER_AAC_LC = 17, MLO_OBJECT_TYPE_ER_AAC_LTP = 19, MLO_OBJECT_TYPE_ER_AAC_SCALABLE = 20, MLO_OBJECT_TYPE_ER_TWINVQ = 21, MLO_OBJECT_TYPE_ER_BSAC = 22, MLO_OBJECT_TYPE_ER_AAC_LD = 23, MLO_OBJECT_TYPE_LAYER_1 = 32, MLO_OBJECT_TYPE_LAYER_2 = 33, MLO_OBJECT_TYPE_LAYER_3 = 34 } |
| Enumeration of object type identifiers. More... | |
| enum | MLO_ChannelConfiguration { MLO_CHANNEL_CONFIG_NONE = 0, MLO_CHANNEL_CONFIG_MONO = 1, MLO_CHANNEL_CONFIG_STEREO = 2, MLO_CHANNEL_CONFIG_STEREO_PLUS_CENTER = 3, MLO_CHANNEL_CONFIG_STEREO_PLUS_CENTER_PLUS_REAR_MONO = 4, MLO_CHANNEL_CONFIG_FIVE = 5, MLO_CHANNEL_CONFIG_FIVE_PLUS_ONE = 6, MLO_CHANNEL_CONFIG_SEVEN_PLUS_ONE = 7, MLO_CHANNEL_CONFIG_UNSUPPORTED } |
| Channel configuration for multichannel audio buffers. More... | |
Functions | |
| MLO_Result | MLO_DecoderConfig_Parse (const unsigned char *encoded, MLO_Size encoded_size, MLO_DecoderConfig *config) |
| Parse an array of bytes containing the DecoderSpecificInfo field of a DecoderConfigDescriptor descriptor. | |
| unsigned int | MLO_DecoderConfig_GetSampleRate (const MLO_DecoderConfig *config) |
| Returns the value of the sample rate expressed in an MLO_DecoderConfig struct. | |
| MLO_Cardinal | MLO_DecoderConfig_GetChannelCount (const MLO_DecoderConfig *config) |
| Returns the number of audio channels expressed in an MLO_DecoderConfig struct. | |
| MLO_Result | MLO_Decoder_Create (const MLO_DecoderConfig *config, MLO_Decoder **decoder) |
| Create a new MLO_Decoder object. | |
| MLO_Result | MLO_Decoder_Destroy (MLO_Decoder *decoder) |
| Destroy an MLO_Decoder object and free the resources associated with it. | |
| MLO_Result | MLO_Decoder_Reset (MLO_Decoder *decoder) |
| Reset the internal state of an MLO_Decoder object. | |
| MLO_Result | MLO_Decoder_DecodeFrame (MLO_Decoder *decoder, const MLO_Byte *frame, MLO_Size frame_size, MLO_SampleBuffer *sample) |
| Decode a single audio frame. | |
| MLO_Result | MLO_Decoder_GetStatus (MLO_Decoder *decoder, MLO_DecoderStatus **status) |
| Return the current status of an MLO_Decoder object. | |
| typedef struct MLO_Decoder MLO_Decoder |
Decoder object [opaque data structure].
An MLO_Decoder object is used to decode AAC audio frames.
Channel configuration for multichannel audio buffers.
Enumeration of object type identifiers.
Object type identifiers identify which of the many possible codecs and codec profiles an encoded stream carries. This library only supports the AAC Low Complexity profile, but other object type identifiers are included here for information. These identifiers are defined in: 14496-3 1.5.1.1
| MLO_Result MLO_Decoder_Create | ( | const MLO_DecoderConfig * | config, | |
| MLO_Decoder ** | decoder | |||
| ) |
Create a new MLO_Decoder object.
| config | Pointer to an MLO_DecoderConfig expressing the configuration parameters of the decoder object to create. | |
| decoder | Pointer to a pointer to an MLO_Decoder object where the pointer to the newly created object will be returned. |
| MLO_Result MLO_Decoder_DecodeFrame | ( | MLO_Decoder * | decoder, | |
| const MLO_Byte * | frame, | |||
| MLO_Size | frame_size, | |||
| MLO_SampleBuffer * | sample | |||
| ) |
Decode a single audio frame.
| decoder | Pointer to an MLO_Decoder object. | |
| frame | Pointer to an array of bytes containing a frame of AAC compressed audio data. The caller must ensure that this array of bytes contains at least one entire AAC frame. | |
| frame_size | Size in bytes of the AAC frame data. | |
| sample | Pointer to an MLO_SampleBuffer object encapsulating the information about the decoded audio buffer will be returned. |
| MLO_Result MLO_Decoder_Destroy | ( | MLO_Decoder * | decoder | ) |
Destroy an MLO_Decoder object and free the resources associated with it.
| decoder | Pointer to the decoder object to destroy. |
| MLO_Result MLO_Decoder_GetStatus | ( | MLO_Decoder * | decoder, | |
| MLO_DecoderStatus ** | status | |||
| ) |
Return the current status of an MLO_Decoder object.
| decoder | Pointer to the MLO_Decoder object of which the status will be returned. | |
| status | Pointer to a pointer where a pointer to an MLO_DecoderStatus struct will be returned. The caller must be aware that the information pointed to by this pointer cannot no longer be used after the next call to any of the MLO_Decoder functions. |
| MLO_Result MLO_Decoder_Reset | ( | MLO_Decoder * | decoder | ) |
Reset the internal state of an MLO_Decoder object.
This flushed all internal buffers and returns the decoder to a state equivalent to the state of a newly created object.
| MLO_Cardinal MLO_DecoderConfig_GetChannelCount | ( | const MLO_DecoderConfig * | config | ) |
Returns the number of audio channels expressed in an MLO_DecoderConfig struct.
| config | Pointer to an MLO_DecoderConfig struct of which the number of audio channels should be returned. |
| unsigned int MLO_DecoderConfig_GetSampleRate | ( | const MLO_DecoderConfig * | config | ) |
Returns the value of the sample rate expressed in an MLO_DecoderConfig struct.
| config | Pointer to an MLO_DecoderConfig struct of which the sample rate should be returned. |
| MLO_Result MLO_DecoderConfig_Parse | ( | const unsigned char * | encoded, | |
| MLO_Size | encoded_size, | |||
| MLO_DecoderConfig * | config | |||
| ) |
Parse an array of bytes containing the DecoderSpecificInfo field of a DecoderConfigDescriptor descriptor.
The information contained in this DecoderSpecificInfo field is returned in the fields of a MLO_DecoderConfig structure. See 14496-1, subpart 2, p 2.6.6 for details.
| encoded | Pointer to an array of bytes with the encoded DecoderSpecificInfo field. | |
| encoded_size | Size in bytes of the byte array pointed to by the encoded parameter. | |
| config | Pointer to an MLO_DecoderConfig struct in which the parsed information will be returned. |