![]() |
MT2523 API Reference
LinkIt SDK v4
|
A2DP audio handle structure type. More...
#include <bt_codec.h>
Data Fields | |
| bt_codec_state_t | state |
| The Bluetooth codec state. More... | |
| bt_audio_buffer_t | buffer_info |
| The shared buffer information for the Bluetooth codec. More... | |
| bool | underflow |
| The Bluetooth codec data underflow occurred. More... | |
| bool | waiting |
| The Bluetooth codec is waiting to fill data. More... | |
| uint16_t | audio_id |
| The audio ID of the Bluetooth codec. More... | |
| void(* | handler )(struct _bt_media_handle_t *handle, bt_codec_media_event_t event_id) |
| The Bluetooth codec handler. More... | |
| void(* | set_buffer )(struct _bt_media_handle_t *handle, uint8_t *buffer, uint32_t length) |
| Set the shared buffer for bitstream. More... | |
| void(* | set_get_data_function )(struct _bt_media_handle_t *handle, bt_codec_get_data func) |
| Set the callback function for bitstream. More... | |
| void(* | set_get_data_count_function )(struct _bt_media_handle_t *handle, bt_codec_get_data_count func) |
| Set the callback function for bitstream. More... | |
| void(* | get_write_buffer )(struct _bt_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 )(struct _bt_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 )(struct _bt_media_handle_t *handle, uint32_t length) |
| Update the write pointer to the shared buffer. More... | |
| void(* | finish_write_data )(struct _bt_media_handle_t *handle) |
| Indicate the last data transfer. More... | |
| void(* | reset_share_buffer )(struct _bt_media_handle_t *handle) |
| Reset the shared buffer's information. More... | |
| void(* | read_data_done )(struct _bt_media_handle_t *handle, uint32_t length) |
| Update the read pointer to the shared buffer. More... | |
| int32_t(* | get_free_space )(struct _bt_media_handle_t *handle) |
| Get the free space length available in the shared buffer. More... | |
| int32_t(* | get_data_count )(struct _bt_media_handle_t *handle) |
| Get the available data amount of the shared buffer. More... | |
| bt_codec_get_data | directly_access_dsp_function |
| Set function to access DSP buffer directly. More... | |
| bt_codec_get_data_count | get_data_count_function |
| Set function to get available data amount of the uplayer total buffer size. More... | |
| uint32_t(* | query_memory_size )(struct _bt_media_handle_t *handle) |
| Query A2DP source total memory usage. More... | |
| uint32_t(* | set_bit_rate )(struct _bt_media_handle_t *handle, uint32_t bit_rate) |
| For A2DP source runtime change bit rate. More... | |
| uint32_t(* | get_payload )(struct _bt_media_handle_t *handle, uint8_t *buffer, uint32_t buffer_size, uint32_t *sample_count) |
| Get payload for A2DP source. More... | |
| void(* | get_payload_done )(struct _bt_media_handle_t *handle) |
| Prepare for next BT_CODEC_MEDIA_GET_PAYLOAD notification. More... | |
| void(* | query_payload_size )(struct _bt_media_handle_t *handle, uint32_t *minimum, uint32_t *total) |
| Get minimum payload size and current total payload size . More... | |
| bt_codec_media_status_t(* | play )(struct _bt_media_handle_t *handle) |
| The Bluetooth codec play function. More... | |
| bt_codec_media_status_t(* | process )(struct _bt_media_handle_t *handle, bt_codec_media_event_t event_id) |
| The Bluetooth codec process function. More... | |
| bt_codec_media_status_t(* | stop )(struct _bt_media_handle_t *handle) |
| The Bluetooth codec stop function. More... | |
A2DP audio handle structure type.
| uint16_t audio_id |
The audio ID of the Bluetooth codec.
| bt_audio_buffer_t buffer_info |
The shared buffer information for the Bluetooth codec.
| bt_codec_get_data directly_access_dsp_function |
Set function to access DSP buffer directly.
| void(* finish_write_data) (struct _bt_media_handle_t *handle) |
Indicate the last data transfer.
| int32_t(* get_data_count) (struct _bt_media_handle_t *handle) |
Get the available data amount of the shared buffer.
| bt_codec_get_data_count get_data_count_function |
Set function to get available data amount of the uplayer total buffer size.
| int32_t(* get_free_space) (struct _bt_media_handle_t *handle) |
Get the free space length available in the shared buffer.
| uint32_t(* get_payload) (struct _bt_media_handle_t *handle, uint8_t *buffer, uint32_t buffer_size, uint32_t *sample_count) |
Get payload for A2DP source.
| void(* get_payload_done) (struct _bt_media_handle_t *handle) |
Prepare for next BT_CODEC_MEDIA_GET_PAYLOAD notification.
| void(* get_read_buffer) (struct _bt_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.
| void(* get_write_buffer) (struct _bt_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) (struct _bt_media_handle_t *handle, bt_codec_media_event_t event_id) |
The Bluetooth codec handler.
| bt_codec_media_status_t(* play) (struct _bt_media_handle_t *handle) |
The Bluetooth codec play function.
| bt_codec_media_status_t(* process) (struct _bt_media_handle_t *handle, bt_codec_media_event_t event_id) |
The Bluetooth codec process function.
| uint32_t(* query_memory_size) (struct _bt_media_handle_t *handle) |
Query A2DP source total memory usage.
| void(* query_payload_size) (struct _bt_media_handle_t *handle, uint32_t *minimum, uint32_t *total) |
Get minimum payload size and current total payload size .
| void(* read_data_done) (struct _bt_media_handle_t *handle, uint32_t length) |
Update the read pointer to the shared buffer.
| void(* reset_share_buffer) (struct _bt_media_handle_t *handle) |
Reset the shared buffer's information.
| uint32_t(* set_bit_rate) (struct _bt_media_handle_t *handle, uint32_t bit_rate) |
For A2DP source runtime change bit rate.
| void(* set_buffer) (struct _bt_media_handle_t *handle, uint8_t *buffer, uint32_t length) |
Set the shared buffer for bitstream.
The audio streaming data can be filled through a shared buffer or through a callback function.
| void(* set_get_data_count_function) (struct _bt_media_handle_t *handle, bt_codec_get_data_count func) |
Set the callback function for bitstream.
The amount of streaming data can be queried.
| void(* set_get_data_function) (struct _bt_media_handle_t *handle, bt_codec_get_data func) |
Set the callback function for bitstream.
The audio streaming data can be filled through a shared buffer or through a callback function.
| bt_codec_state_t state |
The Bluetooth codec state.
| bt_codec_media_status_t(* stop) (struct _bt_media_handle_t *handle) |
The Bluetooth codec stop function.
| bool underflow |
The Bluetooth codec data underflow occurred.
| bool waiting |
The Bluetooth codec is waiting to fill data.
| void(* write_data_done) (struct _bt_media_handle_t *handle, uint32_t length) |
Update the write pointer to the shared buffer.