![]() |
MT2523 API Reference
LinkIt SDK v4
|
MP3 codec handle structure. More...
#include <mp3_codec.h>
Data Fields | |
| mp3_codec_state_t | state |
| The MP3 codec state. More... | |
| mp3_codec_audio_buffer_t | share_buff |
| The shared buffer information for the MP3 codec. More... | |
| bool | underflow |
| The MP3 codec data underflow occurred. More... | |
| bool | waiting |
| The MP3 codec is waiting to fill data. More... | |
| bool | linear_buff |
| The MP3 codec use linear buffer or not. More... | |
| uint16_t | audio_id |
| The audio ID of the MP3 codec. More... | |
| uint32_t | jump_file_to_specified_position |
| mp3_codec_mp3_id3v2_information_t | id3v2_information |
| < MP3 codec uses the event MP3_CODEC_MEDIA_JUMP_FILE_TO to jump to a specified location (in bytes) in the file. More... | |
| int32_t | flush_data_flag |
| The flag to flush data. More... | |
| void * | private_data |
| Internal use only. | |
| void(* | handler )(mp3_codec_media_handle_t *handle, mp3_codec_event_t event_id) |
| The MP3 codec handler. More... | |
| void(* | set_share_buffer )(mp3_codec_media_handle_t *handle, uint8_t *buffer, uint32_t length) |
| Set the shared buffer for bitstream. More... | |
| void(* | get_write_buffer )(mp3_codec_media_handle_t *handle, uint8_t **buffer, uint32_t *length) |
| Get the available length to write into a shared buffer and a pointer to the shared buffer. More... | |
| void(* | get_read_buffer )(mp3_codec_media_handle_t *handle, uint8_t **buffer, uint32_t *length) |
| Get the available length to read from a shared buffer and a pointer to the shared buffer. More... | |
| void(* | write_data_done )(mp3_codec_media_handle_t *handle, uint32_t length) |
| Update the write pointer to the shared buffer. More... | |
| void(* | finish_write_data )(mp3_codec_media_handle_t *handle) |
| Indicate last data transfer. More... | |
| void(* | flush )(mp3_codec_media_handle_t *handle, int32_t flush_data_flag) |
| Flush the shared buffer to decode. More... | |
| void(* | reset_share_buffer )(mp3_codec_media_handle_t *handle) |
| Reset the shared buffer's information. More... | |
| void(* | read_data_done )(mp3_codec_media_handle_t *handle, uint32_t length) |
| Update the read pointer to the shared buffer. More... | |
| int32_t(* | get_free_space )(mp3_codec_media_handle_t *handle) |
| Get the free space length available in the shared buffer. More... | |
| int32_t(* | get_data_count )(mp3_codec_media_handle_t *handle) |
| Get available data amount of the shared buffer. More... | |
| void(* | get_data_status )(mp3_codec_media_handle_t *handle, mp3_codec_data_type_t data_type, int32_t *data_status) |
| Get data status. More... | |
| int32_t(* | get_silence_frame_information )(mp3_codec_media_handle_t *handle, int32_t *byte_count) |
| Get silence frame information. More... | |
| int32_t(* | set_silence_frame_information )(mp3_codec_media_handle_t *handle, silence_frame_information_t *frm_info) |
| Get silence frame information. More... | |
| int32_t(* | fill_silence_frame )(mp3_codec_media_handle_t *handle, uint8_t *buffer) |
| Fill silence frame. More... | |
| mp3_codec_function_return_state_t(* | play )(mp3_codec_media_handle_t *handle) |
| The MP3 codec play function. More... | |
| mp3_codec_function_return_state_t(* | pause )(mp3_codec_media_handle_t *handle) |
| The MP3 codec pause function. More... | |
| mp3_codec_function_return_state_t(* | resume )(mp3_codec_media_handle_t *handle) |
| The MP3 codec resume function. More... | |
| mp3_codec_function_return_state_t(* | process )(mp3_codec_media_handle_t *handle, mp3_codec_event_t event_id) |
| The MP3 codec process function. More... | |
| mp3_codec_function_return_state_t(* | stop )(mp3_codec_media_handle_t *handle) |
| The MP3 codec stop function. More... | |
| mp3_codec_function_return_state_t(* | close_codec )(mp3_codec_media_handle_t *handle) |
| The MP3 codec close_codec function. More... | |
| mp3_codec_function_return_state_t(* | skip_id3v2_and_reach_next_frame )(mp3_codec_media_handle_t *handle, uint32_t file_size) |
| Skip id3v2 header and reach next frame. More... | |
| mp3_codec_function_return_state_t(* | set_bitstream_buffer )(mp3_codec_media_handle_t *handle, uint8_t *bitstrean_buffer, uint32_t length) |
| Set the bitstream buffer(constant array). More... | |
MP3 codec handle structure.
| uint16_t audio_id |
The audio ID of the MP3 codec.
| mp3_codec_function_return_state_t(* close_codec) (mp3_codec_media_handle_t *handle) |
The MP3 codec close_codec function.
| int32_t(* fill_silence_frame) (mp3_codec_media_handle_t *handle, uint8_t *buffer) |
Fill silence frame.
| void(* finish_write_data) (mp3_codec_media_handle_t *handle) |
Indicate last data transfer.
| void(* flush) (mp3_codec_media_handle_t *handle, int32_t flush_data_flag) |
Flush the shared buffer to decode.
| int32_t flush_data_flag |
The flag to flush data.
| int32_t(* get_data_count) (mp3_codec_media_handle_t *handle) |
Get available data amount of the shared buffer.
| void(* get_data_status) (mp3_codec_media_handle_t *handle, mp3_codec_data_type_t data_type, int32_t *data_status) |
Get data status.
| int32_t(* get_free_space) (mp3_codec_media_handle_t *handle) |
Get the free space length available in the shared buffer.
| void(* get_read_buffer) (mp3_codec_media_handle_t *handle, uint8_t **buffer, uint32_t *length) |
Get the available length to read from a shared buffer and a pointer to the shared buffer.
| int32_t(* get_silence_frame_information) (mp3_codec_media_handle_t *handle, int32_t *byte_count) |
Get silence frame information.
| void(* get_write_buffer) (mp3_codec_media_handle_t *handle, uint8_t **buffer, uint32_t *length) |
Get the available length to write into a shared buffer and a pointer to the shared buffer.
| void(* handler) (mp3_codec_media_handle_t *handle, mp3_codec_event_t event_id) |
The MP3 codec handler.
| mp3_codec_mp3_id3v2_information_t id3v2_information |
< MP3 codec uses the event MP3_CODEC_MEDIA_JUMP_FILE_TO to jump to a specified location (in bytes) in the file.
| bool linear_buff |
The MP3 codec use linear buffer or not.
| mp3_codec_function_return_state_t(* pause) (mp3_codec_media_handle_t *handle) |
The MP3 codec pause function.
| mp3_codec_function_return_state_t(* play) (mp3_codec_media_handle_t *handle) |
The MP3 codec play function.
| mp3_codec_function_return_state_t(* process) (mp3_codec_media_handle_t *handle, mp3_codec_event_t event_id) |
The MP3 codec process function.
| void(* read_data_done) (mp3_codec_media_handle_t *handle, uint32_t length) |
Update the read pointer to the shared buffer.
| void(* reset_share_buffer) (mp3_codec_media_handle_t *handle) |
Reset the shared buffer's information.
| mp3_codec_function_return_state_t(* resume) (mp3_codec_media_handle_t *handle) |
The MP3 codec resume function.
| mp3_codec_function_return_state_t(* set_bitstream_buffer) (mp3_codec_media_handle_t *handle, uint8_t *bitstrean_buffer, uint32_t length) |
Set the bitstream buffer(constant array).
| void(* set_share_buffer) (mp3_codec_media_handle_t *handle, uint8_t *buffer, uint32_t length) |
Set the shared buffer for bitstream.
| int32_t(* set_silence_frame_information) (mp3_codec_media_handle_t *handle, silence_frame_information_t *frm_info) |
Get silence frame information.
| mp3_codec_audio_buffer_t share_buff |
The shared buffer information for the MP3 codec.
| mp3_codec_function_return_state_t(* skip_id3v2_and_reach_next_frame) (mp3_codec_media_handle_t *handle, uint32_t file_size) |
Skip id3v2 header and reach next frame.
| mp3_codec_state_t state |
The MP3 codec state.
| mp3_codec_function_return_state_t(* stop) (mp3_codec_media_handle_t *handle) |
The MP3 codec stop function.
| bool underflow |
The MP3 codec data underflow occurred.
| bool waiting |
The MP3 codec is waiting to fill data.
| void(* write_data_done) (mp3_codec_media_handle_t *handle, uint32_t length) |
Update the write pointer to the shared buffer.