![]() |
Maestro Audio Framework v 1.4
NXP Semiconductors
|
Contains common codec interface APIs definitions. More...
Enumerations | |
| enum | audio_stream_type_t { STREAM_TYPE_UNKNOWN = 0 , STREAM_TYPE_MP3 , STREAM_TYPE_PCM , STREAM_TYPE_OPUS , STREAM_TYPE_OGG_OPUS , STREAM_TYPE_COUNT } |
| Enum Stream type structure This enum is used as an input to all CCI functions and is used as the index into the function table. More... | |
| enum | codec_error_code_t { CODEC_UNSUPPORTED_FUNCTION = -1 , CODEC_SUCCESS = 0 , CODEC_INIT_ERROR , CODEC_DECODE_ERROR , CODEC_END_OF_DECODE , CODEC_RESET_ERROR , CODEC_SEEK_ERROR , CODEC_MORE_DATA_REQUIRED , CODEC_METADATA_FILETYPE_FAILED , CODEC_METADATA_NOT_FOUND , CODEC_METADATA_UNSUPPORTED_FILE , CODEC_FILE_OPEN_ERROR , CODEC_FSEEK_FAILED , CODEC_MEDIA_READ_ERROR , CODEC_BROKEN_FRAME , CODEC_MEMORY_EXCEED , CODEC_UNSUPPORTED_FILE } |
| Error codes used by CCI. More... | |
| enum | codec_media_sub_type_t { MEDIA_SUBTYPE_UNKNOWN = 0 , MEDIA_SUBTYPE_NONE , MEDIA_SUBTYPE_ADTS , MEDIA_SUBTYPE_M4A , MEDIA_SUBTYPE_ADIF , MEDIA_SUBTYPE_COUNT } |
| codec media sub type structure More... | |
Functions | |
| int32_t | codec_get_io_frame_size (audio_stream_type_t stream_type, int32_t *in_size, int32_t *out_size) |
| codec get input/output frame size in bytes. More... | |
| int32_t | codec_get_mem_info (audio_stream_type_t stream_type) |
| codec get memory information function. More... | |
| int32_t | codec_init (audio_stream_type_t stream_type, int32_t *memory[], int32_t *callback_fn[], int32_t *user_data) |
| codec initialization function. More... | |
| int32_t | codec_decode (audio_stream_type_t stream_type, int32_t *memory[], int32_t *sample_produced, int32_t *buf_out) |
| codec decoding function. More... | |
| int32_t | codec_get_pcm_samples (audio_stream_type_t stream_type, int32_t *memory[], int32_t *sample_produced, int32_t *buf_out) |
| codec get pcm samples function. More... | |
| int32_t | codec_reset (audio_stream_type_t stream_type, int32_t *memory[]) |
| codec reset function. More... | |
| int32_t | codec_seek (audio_stream_type_t stream_type, int32_t *memory[], int32_t byte_to_seek) |
| codec seek function. More... | |
| enum audio_stream_type_t |
| enum codec_error_code_t |
| int32_t codec_get_io_frame_size | ( | audio_stream_type_t | stream_type, |
| int32_t * | in_size, | ||
| int32_t * | out_size | ||
| ) |
| [in] | stream_type | Audio Stream Type. |
| [out] | in_size | Input Frame Size. |
| [out] | out_size | Output Frame Size. |
| 0 | when actual input/output frame size in bytes of the codec is get through in_size, out_size pointers |
| CODEC_UNSUPPORTED_FUNCTION | If this function is not supported for streamtype. |
| int32_t codec_get_mem_info | ( | audio_stream_type_t | stream_type | ) |
| [in] | stream_type | Audio Stream Type. |
| int | Size of the codec. |
| CODEC_UNSUPPORTED_FUNCTION | If this function is not supported for streamtype. |
| int32_t codec_init | ( | audio_stream_type_t | stream_type, |
| int32_t * | memory[], | ||
| int32_t * | callback_fn[], | ||
| int32_t * | user_data | ||
| ) |
| [in] | stream_type | Audio Stream Type. |
| [in] | memory | This is pointer to the decoder memory. |
| [in] | callback_fn | This is pointer to the decoder callback functions. |
| [in] | user_data | This is pointer to the user specific data. |
| CODEC_SUCCESS | if codec initializes successfully. |
| CODEC_INIT_ERROR | if codec fails to initialize. |
| CODEC_UNSUPPORTED_FUNCTION | If this function is not supported for streamtype |
| int32_t codec_decode | ( | audio_stream_type_t | stream_type, |
| int32_t * | memory[], | ||
| int32_t * | sample_produced, | ||
| int32_t * | buf_out | ||
| ) |
| [in] | stream_type | Audio Stream Type. |
| [in] | memory | This is pointer to the decoder memory. |
| [in] | sample_produced | This is pointer to the samples produced by the codec. |
| [in] | buf_out | This is pointer to the decoder output pcm buffer. |
| CODEC_SUCCESS | if codec decodes frame successfully. |
| CODEC_DECODE_ERROR | if codec fails to decode frame. |
| CODEC_END_OF_DECODE | if decoding of input file is done. |
| CODEC_UNSUPPORTED_FUNCTION | If this function is not supported for streamtype |
| int32_t codec_get_pcm_samples | ( | audio_stream_type_t | stream_type, |
| int32_t * | memory[], | ||
| int32_t * | sample_produced, | ||
| int32_t * | buf_out | ||
| ) |
| [in] | stream_type | Audio Stream Type. |
| [in] | memory | This is pointer to the decoder memory. |
| [in] | sample_produced | This is pointer to the samples produced by the codec. |
| [in] | buf_out | This is pointer to the user specific data. |
| int32_t | It returns number of samples got from the codec. |
| int32_t codec_reset | ( | audio_stream_type_t | stream_type, |
| int32_t * | memory[] | ||
| ) |
| [in] | stream_type | Audio Stream Type. |
| [in] | memory | This is pointer to the decoder memory. |
| CODEC_SUCCESS | if codec resets successfully. |
| CODEC_RESET_ERROR | if codec fails to reset. |
| CODEC_UNSUPPORTED_FUNCTION | If this function is not supported for streamtype |
| int32_t codec_seek | ( | audio_stream_type_t | stream_type, |
| int32_t * | memory[], | ||
| int32_t | byte_to_seek | ||
| ) |
| [in] | stream_type | Audio Stream Type. |
| [in] | memory | Pointer to decoder memory allocated based on codec_get_mem_info() and passed in by caller. |
| [in] | byte_to_seek | Number of bytes to seek. |
| int32_t | frame boundary align offset. |
| CODEC_UNSUPPORTED_FUNCTION | If this function is not supported for streamtype |