dotstack API Reference
1.10.37
|
The Advanced Audio Distribution Profile (A2DP) defines the protocols and procedures that realize distribution of audio content of high-quality in mono or stereo on ACL channels. More...
Data Structures | |
struct | bt_a2dp_evt_open_and_start_stream_completed_t |
Parameter to A2DP_EVT_OPEN_AND_START_STREAM_COMPLETED event. More... | |
union | bt_a2dp_event_t |
Parameter to an application callback. More... | |
struct | bt_a2dp_mgr_t |
A2DP manager. More... | |
Macros | |
#define | bt_a2dp_find_codec(mgr, codec_type) bt_avdtp_find_codec(mgr->avdtp_mgr, codec_type) |
Find a codec. More... | |
#define | bt_a2dp_connect(mgr, remote_addr) bt_avdtp_connect(mgr->avdtp_mgr, remote_addr) |
Connect to a remote device. More... | |
#define | bt_a2dp_connect_ex(mgr, remote_addr, acl_config) bt_avdtp_connect_ex(mgr->avdtp_mgr, remote_addr, acl_config) |
Connect to a remote device. More... | |
#define | bt_a2dp_disconnect(mgr, remote_addr) bt_avdtp_disconnect(mgr->avdtp_mgr, remote_addr) |
Disconnect from a remote device. More... | |
#define | bt_a2dp_register_sink(mgr, caps) bt_avdtp_register_sep(mgr->avdtp_mgr, AVDTP_SEP_TYPE_SINK, caps) |
Register a Sink SEP with the local A2DP manager. More... | |
#define | bt_a2dp_register_source(mgr, caps) bt_avdtp_register_sep(mgr->avdtp_mgr, AVDTP_SEP_TYPE_SOURCE, caps) |
Register a Source SEP with the local A2DP manager. More... | |
#define | bt_a2dp_get_sep(mgr, sep_id) bt_avdtp_get_sep(mgr->avdtp_mgr, sep_id) |
Get a SEP info by its ID. More... | |
#define | bt_a2dp_discover(mgr, remote_addr) bt_avdtp_discover(mgr->avdtp_mgr, remote_addr) |
Discover SEPs on a remote device. More... | |
#define | bt_a2dp_get_capabilities(mgr, remote_addr, seid_acp) bt_avdtp_get_capabilities(mgr->avdtp_mgr, remote_addr, seid_acp) |
Get remote SEP capabilities. More... | |
#define | bt_a2dp_get_all_capabilities(mgr, remote_addr, seid_acp) bt_avdtp_get_all_capabilities(mgr->avdtp_mgr, remote_addr, seid_acp) |
Get remote SEP capabilities. More... | |
#define | bt_a2dp_create_stream(mgr) bt_avdtp_create_stream(mgr->avdtp_mgr) |
Create a stream. More... | |
#define | bt_a2dp_destroy_stream(mgr, strm_handle) bt_avdtp_destroy_stream(mgr->avdtp_mgr, strm_handle) |
Destroy a stream. More... | |
#define | bt_a2dp_listen(mgr, strm_handle, sep_id) bt_avdtp_listen(mgr->avdtp_mgr, strm_handle, sep_id) |
Listen for incoming connections. More... | |
#define | bt_a2dp_cancel_listen(mgr, strm_handle, sep_id) bt_avdtp_cancel_listen(mgr->avdtp_mgr, strm_handle, sep_id) |
Cancel listening for incoming connections. More... | |
#define | bt_a2dp_reconfigure_stream(mgr, strm_handle, caps) bt_avdtp_reconfigure_stream(mgr->avdtp_mgr, strm_handle, caps) |
Reconfigure stream. More... | |
#define | bt_a2dp_get_stream_state(mgr, strm_handle) bt_avdtp_get_stream_state(mgr->avdtp_mgr, strm_handle) |
Get local stream state. More... | |
#define | bt_a2dp_get_stream_local_sep_id(mgr, strm_handle) bt_avdtp_get_stream_local_sep_id(mgr->avdtp_mgr, strm_handle) |
Get stream's local SEP ID. More... | |
#define | bt_a2dp_get_stream_remote_sep_id(mgr, strm_handle) bt_avdtp_get_stream_remote_sep_id(mgr->avdtp_mgr, strm_handle) |
Get stream's remote SEP ID. More... | |
#define | bt_a2dp_get_stream_remote_address(mgr, strm_handle) bt_avdtp_get_stream_remote_address(mgr->avdtp_mgr, strm_handle) |
Get stream's remote BT address. More... | |
#define | bt_a2dp_get_stream_codec_type(mgr, strm_handle) bt_avdtp_get_stream_codec_type(mgr->avdtp_mgr, strm_handle) |
Get the type of the codec currently used with the stream. More... | |
#define | bt_a2dp_get_stream_codec_config(mgr, strm_handle) bt_avdtp_get_stream_codec_config(mgr->avdtp_mgr, strm_handle) |
Get the configuration of the codec currently used with the stream. More... | |
#define | bt_a2dp_get_stream_config(mgr, strm_handle) bt_avdtp_get_stream_config(mgr->avdtp_mgr, strm_handle) |
Get stream's configuration. More... | |
#define | bt_a2dp_start_stream(mgr, strm_handle) bt_avdtp_start_stream(mgr->avdtp_mgr, strm_handle) |
Start a stream. More... | |
#define | bt_a2dp_close_stream(mgr, strm_handle) bt_avdtp_close_stream(mgr->avdtp_mgr, strm_handle) |
Close a stream. More... | |
#define | bt_a2dp_suspend_stream(mgr, strm_handle) bt_avdtp_suspend_stream(mgr->avdtp_mgr, strm_handle) |
Suspend a stream. More... | |
#define | bt_a2dp_abort_stream(mgr, strm_handle) bt_avdtp_abort_stream(mgr->avdtp_mgr, strm_handle) |
Suspend a stream. More... | |
#define | bt_a2dp_get_hci_connection(mgr, strm_handle) bt_avdtp_get_hci_connection(mgr->avdtp_mgr, strm_handle) |
Get HCI connection for a stream. More... | |
#define | bt_a2dp_add_media_rx_buffer(mgr, strm_handle, buffer) bt_avdtp_add_media_rx_buffer(mgr->avdtp_mgr, strm_handle, buffer) |
Add a media packet buffer to a receive queue. More... | |
#define | bt_a2dp_remove_media_rx_buffer(mgr, strm_handle, buffer) bt_avdtp_remove_media_rx_buffer(mgr->avdtp_mgr, strm_handle, buffer) |
Remove a media packet buffer from a receive queue. More... | |
#define | bt_a2dp_add_media_tx_buffer(mgr, strm_handle, buffer) bt_avdtp_add_media_tx_buffer(mgr->avdtp_mgr, strm_handle, buffer) |
Add a media packet buffer to a send queue. More... | |
#define | bt_a2dp_remove_media_tx_buffer(mgr, strm_handle, buffer) bt_avdtp_remove_media_tx_buffer(mgr->avdtp_mgr, strm_handle, buffer) |
Remove a media packet buffer from a send queue. More... | |
#define | bt_a2dp_clear_media_tx_queue(mgr, strm_handle) bt_avdtp_clear_media_tx_queue(mgr->avdtp_mgr, strm_handle) |
Clear send queue. More... | |
#define | bt_a2dp_set_media_tx_queue_limit(mgr, strm_handle, limit) bt_avdtp_set_media_tx_queue_limit(mgr->avdtp_mgr, strm_handle, limit) |
Set limit on the send queue. More... | |
Typedefs | |
typedef void(* | bt_a2dp_find_server_callback_fp) (bt_uint supported_features, bt_bool found, void *param) |
Notify the application of the result of searching for a remote A2DP entity (sourse or sink) More... | |
typedef void(* | bt_a2dp_mgr_callback_fp) (bt_a2dp_mgr_t *mgr, bt_byte evt, bt_a2dp_event_t *evt_param, void *callback_param) |
A2DP application callback. More... | |
Functions | |
bt_a2dp_mgr_t * | bt_a2dp_get_mgr (void) |
Return a pointer to an instance of the A2DP manager. More... | |
void | bt_a2dp_init (void) |
Initialize the A2DP layer. More... | |
bt_bool | bt_a2dp_start (bt_a2dp_mgr_t *mgr) |
Start the A2DP layer. More... | |
void | bt_a2dp_register_callback (bt_a2dp_mgr_t *mgr, bt_a2dp_mgr_callback_fp callback, void *callback_param) |
Register a A2DP application callback. More... | |
bt_bool | bt_a2dp_open_and_start_stream (bt_a2dp_mgr_t *mgr, bt_byte strm_handle, bt_bdaddr_t *remote_addr, bt_byte seid_int, bt_byte seid_acp, const bt_avdtp_sep_capabilities_t *caps) |
Open & start a stream. More... | |
bt_bool | bt_a2dp_find_source (bt_bdaddr_t *deviceAddress, bt_a2dp_find_server_callback_fp callback, bt_sdp_client_callback_fp client_callback, void *callback_param) |
Find source. More... | |
bt_bool | bt_a2dp_find_sink (bt_bdaddr_t *deviceAddress, bt_a2dp_find_server_callback_fp callback, bt_sdp_client_callback_fp client_callback, void *callback_param) |
Find sink. More... | |
void | bt_a2dp_register_mpeg_codec (bt_a2dp_mgr_t *mgr) |
Register default MPEG codec. More... | |
void | bt_a2dp_register_aac_codec (bt_a2dp_mgr_t *mgr) |
Register default AAC codec. More... | |
Source features | |
The following is a list of features a source can support. The supported features are specified in the corresponding SDP service record and can be retrieved with bt_a2dp_find_source. | |
#define | A2DP_SOURCE_FEATURE_PLAYER 1 |
Player. | |
#define | A2DP_SOURCE_FEATURE_MICROPHONE 2 |
Mic. | |
#define | A2DP_SOURCE_FEATURE_TUNER 4 |
Tuner. | |
#define | A2DP_SOURCE_FEATURE_MIXER 8 |
Mixer. | |
Sink features | |
The following is a list of features a sink can support. The supported features are specified in the corresponding SDP service record and can be retrieved with bt_a2dp_find_sink. | |
#define | A2DP_SINK_FEATURE_HEADPHONE 1 |
Headphone. | |
#define | A2DP_SINK_FEATURE_SPEAKER 2 |
Speaker. | |
#define | A2DP_SINK_FEATURE_RECORDER 4 |
Recorder. | |
#define | A2DP_SINK_FEATURE_AMPLIFIER 8 |
Amplifier. | |
Events | |
The following is a list of events A2DP layer generates and can report to the upper layer when it completes executing an operation initiated by either local or remote device. | |
#define | A2DP_EVT_CTRL_CHANNEL_CONNECTED AVDTP_EVT_CTRL_CHANNEL_CONNECTED |
This event is generated when a control channel between two AVDTP entities has been established. | |
#define | A2DP_EVT_CTRL_CHANNEL_DISCONNECTED AVDTP_EVT_CTRL_CHANNEL_DISCONNECTED |
This event is generated when a control channel between two AVDTP entities has been terminated. | |
#define | A2DP_EVT_CTRL_CONNECTION_FAILED AVDTP_EVT_CTRL_CONNECTION_FAILED |
This event is generated when a local device failed to create a control channel between two AVDTP entities. | |
#define | A2DP_EVT_DISCOVER_SEP_COMPLETED AVDTP_EVT_DISCOVER_COMPLETED |
This event is generated when a local device received a response (either positive or negative) to a "discover" request. | |
#define | A2DP_EVT_GET_SEP_CAPABILITIES_COMPLETED AVDTP_EVT_GET_SEP_CAPABILITIES_COMPLETED |
This event is generated when a local device received a response (either positive or negative) to a "get SEP capabilities" request. | |
#define | A2DP_EVT_SET_STREAM_CONFIGURATION_COMPLETED AVDTP_EVT_SET_STREAM_CONFIGURATION_COMPLETED |
This event is generated when a local device received a response (either positive or negative) to a "set stream configuration" request. | |
#define | A2DP_EVT_GET_STREAM_CONFIGURATION_COMPLETED AVDTP_EVT_GET_STREAM_CONFIGURATION_COMPLETED |
This event is generated when a local device received a response (either positive or negative) to a "get stream configuration" request. | |
#define | A2DP_EVT_RECONFIGURE_STREAM_COMPLETED AVDTP_EVT_STREAM_RECONFIGURE_COMPLETED |
This event is generated when a local device received a response (either positive or negative) to a "change stream configuration" request. | |
#define | A2DP_EVT_OPEN_STREAM_COMPLETED AVDTP_EVT_OPEN_STREAM_COMPLETED |
This event is generated when a local device received a response (either positive or negative) to a "open stream" request. | |
#define | A2DP_EVT_START_STREAM_COMPLETED AVDTP_EVT_START_STREAM_COMPLETED |
This event is generated when a local device received a response (either positive or negative) to a "start stream" request. | |
#define | A2DP_EVT_CLOSE_STREAM_COMPLETED AVDTP_EVT_CLOSE_STREAM_COMPLETED |
This event is generated when a local device received a response (either positive or negative) to a "close stream" request. | |
#define | A2DP_EVT_SUSPEND_STREAM_COMPLETED AVDTP_EVT_SUSPEND_STREAM_COMPLETED |
This event is generated when a local device received a response (either positive or negative) to a "suspend stream" request. | |
#define | A2DP_EVT_STREAM_SECURITY_CONTROL_COMPLETED AVDTP_EVT_STREAM_SECURITY_CONTROL_COMPLETED |
This event is generated when a local device received a response (either positive or negative) to a "exchange content protection control data" request. | |
#define | A2DP_EVT_ABORT_STREAM_COMPLETED AVDTP_EVT_ABORT_STREAM_COMPLETED |
This event is generated when a local device received a response (either positive or negative) to a "abort stream" request. | |
#define | A2DP_EVT_SEP_INFO_RECEIVED AVDTP_EVT_SEP_INFO_RECEIVED |
This event is generated for each SEP contained in a positive response to a "discover" request. | |
#define | A2DP_EVT_SEP_CAPABILITIES_RECEIVED AVDTP_EVT_SEP_CAPABILITIES_RECEIVED |
This event is generated when a local device received a positive response to a "get SEP capabilities" request. | |
#define | A2DP_EVT_STREAM_CONFIGURATION_RECEIVED AVDTP_EVT_STREAM_CONFIGURATION_RECEIVED |
This event is generated when a local device received a positive response to a "get stream configuration" request. | |
#define | A2DP_EVT_SET_STREAM_CONFIGURATION AVDTP_EVT_SET_STREAM_CONFIGURATION |
#define | A2DP_EVT_DISCOVER_REQUESTED AVDTP_EVT_DISCOVER_REQUESTED |
This event is generated when a local device received "stream end point discovery" request. | |
#define | A2DP_EVT_SET_STREAM_CONFIGURATION_REQUESTED AVDTP_EVT_SET_STREAM_CONFIGURATION_REQUESTED |
This event is generated when a local device received "set stream configuration" request. | |
#define | A2DP_EVT_OPEN_STREAM_REQUESTED AVDTP_EVT_OPEN_STREAM_REQUESTED |
This event is generated when a local device received "open stream" request. | |
#define | A2DP_EVT_START_STREAM_REQUESTED AVDTP_EVT_START_STREAM_REQUESTED |
This event is generated when a local device received "start stream" request. | |
#define | A2DP_EVT_CLOSE_STREAM_REQUESTED AVDTP_EVT_CLOSE_STREAM_REQUESTED |
This event is generated when a local device received "close stream" request. | |
#define | A2DP_EVT_SUSPEND_STREAM_REQUESTED AVDTP_EVT_SUSPEND_STREAM_REQUESTED |
This event is generated when a local device received "suspend stream" request. | |
#define | A2DP_EVT_ABORT_STREAM_REQUESTED AVDTP_EVT_ABORT_STREAM_REQUESTED |
This event is generated when a local device received "abort stream" request. | |
#define | A2DP_EVT_RECONFIGURE_STREAM_REQUESTED AVDTP_EVT_RECONFIGURE_STREAM_REQUESTED |
This event is generated when a local device received "change stream configuration" request. | |
#define | A2DP_EVT_MEDIA_PACKET_RECEIVED AVDTP_EVT_MEDIA_PACKET_RECEIVED |
This event is generated when a local device received a media packet. | |
#define | A2DP_EVT_STREAM_CONFIGURED AVDTP_EVT_STREAM_CONFIGURED |
This event is generated when a local device has successfully configured a stream. More... | |
#define | A2DP_EVT_STREAM_RECONFIGURED AVDTP_EVT_STREAM_RECONFIGURED |
This event is generated when a local device has successfully reconfigured a stream. More... | |
#define | A2DP_EVT_STREAM_OPENED AVDTP_EVT_STREAM_OPENED |
This event is generated when a local device has successfully opened a stream. More... | |
#define | A2DP_EVT_STREAM_STARTED AVDTP_EVT_STREAM_STARTED |
This event is generated when a local device has successfully started a stream. More... | |
#define | A2DP_EVT_STREAM_CLOSED AVDTP_EVT_STREAM_CLOSED |
This event is generated when a local device has successfully closed a stream. More... | |
#define | A2DP_EVT_STREAM_SUSPENDED AVDTP_EVT_STREAM_SUSPENDED |
This event is generated when a local device has successfully suspended a stream. More... | |
#define | A2DP_EVT_STREAM_ABORTED AVDTP_EVT_STREAM_ABORTED |
This event is generated when a local device has successfully aborted a stream. More... | |
#define | A2DP_EVT_MEDIA_PACKET_SENT AVDTP_EVT_MEDIA_PACKET_SENT |
This event is generated when a local device sent a media packet. | |
#define | A2DP_EVT_MEDIA_PACKET_SEND_FAILED AVDTP_EVT_MEDIA_PACKET_SEND_FAILED |
This event is generated when a local device failed to send a media packet. | |
#define | A2DP_EVT_OPEN_AND_START_STREAM_COMPLETED (AVDTP_EVT_LAST + 1) |
This event is generated when a local device completed "open and start" request. | |
The Advanced Audio Distribution Profile (A2DP) defines the protocols and procedures that realize distribution of audio content of high-quality in mono or stereo on ACL channels.
#define A2DP_EVT_STREAM_ABORTED AVDTP_EVT_STREAM_ABORTED |
This event is generated when a local device has successfully aborted a stream.
This event follows the A2DP_EVT_ABORT_STREAM_REQUESTED if the upper layer has accepted it. This event is not generated if stream abortion was initiated by the local device.
#define A2DP_EVT_STREAM_CLOSED AVDTP_EVT_STREAM_CLOSED |
This event is generated when a local device has successfully closed a stream.
This event follows the A2DP_EVT_CLOSE_STREAM_REQUESTED if the upper layer has accepted it. This event is not generated if stream closing was initiated by the local device.
#define A2DP_EVT_STREAM_CONFIGURED AVDTP_EVT_STREAM_CONFIGURED |
This event is generated when a local device has successfully configured a stream.
This event follows the A2DP_EVT_SET_STREAM_CONFIGURATION_REQUESTED if the upper layer has accepted it. This event is not generated if stream configuration was initiated by the local device.
#define A2DP_EVT_STREAM_OPENED AVDTP_EVT_STREAM_OPENED |
This event is generated when a local device has successfully opened a stream.
This event follows the A2DP_EVT_OPEN_STREAM_REQUESTED if the upper layer has accepted it. This event is not generated if stream opening was initiated by the local device.
#define A2DP_EVT_STREAM_RECONFIGURED AVDTP_EVT_STREAM_RECONFIGURED |
This event is generated when a local device has successfully reconfigured a stream.
This event follows the A2DP_EVT_RECONFIGURE_STREAM_REQUESTED if the upper layer has accepted it. This event is not generated if stream reconfiguration was initiated by the local device.
#define A2DP_EVT_STREAM_STARTED AVDTP_EVT_STREAM_STARTED |
This event is generated when a local device has successfully started a stream.
This event follows the A2DP_EVT_START_STREAM_REQUESTED if the upper layer has accepted it. This event is not generated if stream starting was initiated by the local device.
#define A2DP_EVT_STREAM_SUSPENDED AVDTP_EVT_STREAM_SUSPENDED |
This event is generated when a local device has successfully suspended a stream.
This event follows the A2DP_EVT_SUSPEND_STREAM_REQUESTED if the upper layer has accepted it. This event is not generated if stream suspension was initiated by the local device.
#define bt_a2dp_abort_stream | ( | mgr, | |
strm_handle | |||
) | bt_avdtp_abort_stream(mgr->avdtp_mgr, strm_handle) |
Suspend a stream.
This function tries to suspend a stream by sending a request to the remote party. The stream can be in any state state except AVDTP_STREAM_STATE_IDLE. As a result of this operation the A2DP_EVT_ABORT_STREAM_COMPLETED event will be generated. This operation cannot be rejected. The evt_param.abort_stream_requested.err_code
is always == AVDTP_ERROR_SUCCESS.
mgr | A2DP manager. |
strm_handle | Stream handle. |
TRUE
if the function succeeds, i.e. the actual request has been sent to the remote party. FALSE
otherwise. No events will be generated. #define bt_a2dp_add_media_rx_buffer | ( | mgr, | |
strm_handle, | |||
buffer | |||
) | bt_avdtp_add_media_rx_buffer(mgr->avdtp_mgr, strm_handle, buffer) |
Add a media packet buffer to a receive queue.
The consumer of A2DP is responsible for allocating and supplying A2DP with buffers used to store received packets. A2DP itself only has a queue for storing pointers to buffers supplied by the consumer. When a packet comes in A2DP finds the first buffer large enough to hold the received packet, copies the packet to the buffer and generates a A2DP_EVT_MEDIA_PACKET_RECEIVED event. The consumer then has to process the data in the buffer and return it back to the queue. If there is no buffers in the queue or none of the buffers is large enough the received packets is dropped. Each buffer has a field (data_len) that holds the length of the received buffer. This field is never 0 if the buffer contains a packet. If a channel closed regardless of what has caused that and there are still buffers in the queue A2DP generates a A2DP_EVT_MEDIA_PACKET_RECEIVED event for each buffer and sets the data_len to 0. This is to inform the A2DP consumer that the buffer has not been used and can be, for example, deallocated. This function adds a buffer to the receive queue.
mgr | A2DP manager. |
strm_handle | Stream handle. |
buffer | Pointer to a structure that holds the buffer and its parameters. |
TRUE
if the function succeeds. FALSE
otherwise. The function fails only if a stream specified by the strm_handle
parameter #define bt_a2dp_add_media_tx_buffer | ( | mgr, | |
strm_handle, | |||
buffer | |||
) | bt_avdtp_add_media_tx_buffer(mgr->avdtp_mgr, strm_handle, buffer) |
Add a media packet buffer to a send queue.
When the consumer of A2DP wants to send a packet to a remote device it calls this function. The function adds the packet to a queue and tells A2DP that it has something to send. The packet will be send as soon as the stream goes to A2DP_STREAM_STATE_STREAMING state. When the packet has been successfully sent a A2DP_EVT_MEDIA_PACKET_SENT is generated. Otherwise a A2DP_EVT_MEDIA_PACKET_SEND_FAILED is generated. Regardless of the event generated the consumer can re-use the buffer as A2DP has removed it from the queue and gave up control over it. As in the case of received buffers, if a channel closed regardless of what has caused that and there are still buffers in the queue A2DP generates a A2DP_EVT_MEDIA_PACKET_SENT event for each buffer and sets the data_len field to 0. This is to inform the AVDTP consumer that the buffer has not been used and can be, for example, deallocated.
mgr | A2DP manager. |
strm_handle | Stream handle. |
buffer | Pointer to a structure that holds the buffer and its parameters. |
TRUE
if the function succeeds. FALSE
otherwise. The function fails only if a stream specified by the strm_handle
parameter #define bt_a2dp_cancel_listen | ( | mgr, | |
strm_handle, | |||
sep_id | |||
) | bt_avdtp_cancel_listen(mgr->avdtp_mgr, strm_handle, sep_id) |
Cancel listening for incoming connections.
This function removes a SEP from a list of SEPS which a stream can use for incoming requests.
mgr | A2DP manager. |
strm_handle | Stream handle. |
sep_id | Local SEP ID. |
TRUE
if the function succeeds. FALSE
otherwise. #define bt_a2dp_clear_media_tx_queue | ( | mgr, | |
strm_handle | |||
) | bt_avdtp_clear_media_tx_queue(mgr->avdtp_mgr, strm_handle) |
Clear send queue.
When the consumer of A2DP wants to send a packet to a remote device it calls bt_avdtp_add_media_tx_buffer function. The function adds the packet to a queue and tells A2DP that it has something to send. The packet will be send as soon as the stream goes to A2DP_STREAM_STATE_STREAMING state. The consumer can remove all packets from the queue before they have been sent to a remote device by calling bt_a2dp_clear_media_tx_queue.
mgr | A2DP manager. |
strm_handle | Stream handle. |
TRUE
if the function succeeds. FALSE
otherwise. The function fails only if a stream specified by the strm_handle
parameter #define bt_a2dp_close_stream | ( | mgr, | |
strm_handle | |||
) | bt_avdtp_close_stream(mgr->avdtp_mgr, strm_handle) |
Close a stream.
This function tries to close a stream by sending a request to the remote party. The stream has to be in AVDTP_STREAM_STATE_OPEN or AVDTP_STREAM_STATE_STREAMING state. As a result of this operation the A2DP_EVT_CLOSE_STREAM_COMPLETED event will be generated. If the stream has been closed the evt_param.bt_avdtp_evt_close_stream_completed_t.err_code
== AVDTP_ERROR_SUCCESS. Otherwise, if the remote device for any reason cannot or does not wish to close the stream, the evt_param.bt_avdtp_evt_close_stream_completed_t.err_code
== the error code sent by the remote.
mgr | A2DP manager. |
strm_handle | Stream handle. |
TRUE
if the function succeeds, i.e. the actual request has been sent to the remote party. FALSE
otherwise. No events will be generated. #define bt_a2dp_connect | ( | mgr, | |
remote_addr | |||
) | bt_avdtp_connect(mgr->avdtp_mgr, remote_addr) |
Connect to a remote device.
This function opens a control channel connection to a remote device specified by the remote_addr
. If connection cannot be initiated for some reason, for example, there is not enough resources, it returns FALSE and not events are generated. Otherwise the result of an attempt to connect to the remote device is reported via the AVDTP callback. The events generated will either be A2DP_EVT_CTRL_CHANNEL_CONNECTED or A2DP_EVT_CTRL_CHANNEL_CONNECTION_FAILED.
mgr | A2DP manager. |
remote_addr | The address of a remote device. |
TRUE
if connection establishment has been started. FALSE
otherwise. #define bt_a2dp_connect_ex | ( | mgr, | |
remote_addr, | |||
acl_config | |||
) | bt_avdtp_connect_ex(mgr->avdtp_mgr, remote_addr, acl_config) |
Connect to a remote device.
This function opens a control channel connection to a remote device specified by the remote_addr
. If connection cannot be initiated for some reason, for example, there is not enough resources, it returns FALSE and not events are generated. Otherwise the result of an attempt to connect to the remote device is reported via the AVDTP callback. The events generated will either be A2DP_EVT_CTRL_CHANNEL_CONNECTED or A2DP_EVT_CTRL_CHANNEL_CONNECTION_FAILED.
mgr | A2DP manager. |
remote_addr | The address of a remote device. |
acl_config | ACL link configuration. This can be a combination of the following values:
|
TRUE
if connection establishment has been started. FALSE
otherwise. #define bt_a2dp_create_stream | ( | mgr | ) | bt_avdtp_create_stream(mgr->avdtp_mgr) |
Create a stream.
This function allocates memory for storing stream's data and assigns a stream handle. The stream handle is used to manipulate the stream - open, close, configure, suspend, abort.
mgr | A2DP manager. |
Stream
handle if the function succeeds. 0
otherwise. #define bt_a2dp_destroy_stream | ( | mgr, | |
strm_handle | |||
) | bt_avdtp_destroy_stream(mgr->avdtp_mgr, strm_handle) |
Destroy a stream.
This function frees memory used by the stream. The stream has to exist and be in the "idle" state for this function to succeed. I.e. the stream has to be closed or aborted before this function can be called.
mgr | A2DP manager. |
strm_handle | Stream handle. |
TRUE
if the function succeeds. FALSE
otherwise. #define bt_a2dp_disconnect | ( | mgr, | |
remote_addr | |||
) | bt_avdtp_disconnect(mgr->avdtp_mgr, remote_addr) |
Disconnect from a remote device.
This function closes a control and transport channels on all streams associated with the remote device specified by the remote_addr
. As a result of this operation the following events will be generated:
mgr | A2DP manager. |
remote_addr | The address of a remote device. |
TRUE
if disconnection has been started. FALSE
otherwise. No events will be generated. #define bt_a2dp_discover | ( | mgr, | |
remote_addr | |||
) | bt_avdtp_discover(mgr->avdtp_mgr, remote_addr) |
Discover SEPs on a remote device.
This function asks the remote device to send a list of all available SEPs. As a result of this operation the following events will be generated:
evt_param.sep_info_received
contains SEP information. evt_param.discover_completed.err_code
== AVDTP_ERROR_SUCCESS. if the remote rejected the request the evt_param.discover_completed.err_code
== the error code sent by the remote.mgr | A2DP manager. |
remote_addr | The address of a remote device. |
TRUE
if discover request has been sent. FALSE
otherwise. No events will be generated. #define bt_a2dp_find_codec | ( | mgr, | |
codec_type | |||
) | bt_avdtp_find_codec(mgr->avdtp_mgr, codec_type) |
Find a codec.
A2DP in theory can support any type of codec. Each codec uses its own format for exchanging capabilities and configuration information. In order to make our implementation do not care about these formats we use a simple way of telling AVDTP how to parse and serialize codec's configuration. The consumer of A2DP has to register a callback function (one per codec type) for each codec it wishes to support. That callback has to perform two function. The first one is to read the configuration received from the remote device and store it in a structure defined by the consumer. The second one is to serialize the data from a structure to a format (in case of standard A2DP codecs the format is defined in A2DP specification, vendor specific codecs can define their own formats) suitable for sending as a part of a AVDTP request. This function returns a pointer to a structure that holds a pointer to a codec's callback function.
mgr | A2DP manager. |
codec_type | Codec type. The codec_type can be one of the following values:
|
TRUE
if the function succeeds. FALSE
otherwise. The function fails if a callback for a codec type specified in the codec
parameter #define bt_a2dp_get_all_capabilities | ( | mgr, | |
remote_addr, | |||
seid_acp | |||
) | bt_avdtp_get_all_capabilities(mgr->avdtp_mgr, remote_addr, seid_acp) |
Get remote SEP capabilities.
This function asks the remote device to send capabilities of a SEP specified by the seid_acp
. As a result of this operation the following events will be generated:
evt_param.sep_capabilities_received
contains SEP capabilities. evt_param.get_sep_capabilities_completed.err_code
== AVDTP_ERROR_SUCCESS. if the remote rejected the request the evt_param.get_sep_capabilities_completed.err_code
== the error code sent by the remote.mgr | A2DP manager. |
remote_addr | The address of a remote device. |
seid_acp | The ID of a remote SEP. |
TRUE
if discover request has been sent. FALSE
otherwise. No events will be generated. #define bt_a2dp_get_capabilities | ( | mgr, | |
remote_addr, | |||
seid_acp | |||
) | bt_avdtp_get_capabilities(mgr->avdtp_mgr, remote_addr, seid_acp) |
Get remote SEP capabilities.
This function asks the remote device to send capabilities of a SEP specified by the seid_acp
. As a result of this operation the following events will be generated:
evt_param.sep_capabilities_received
contains SEP capabilities. evt_param.get_sep_capabilities_completed.err_code
== AVDTP_ERROR_SUCCESS. if the remote rejected the request the evt_param.get_sep_capabilities_completed.err_code
== the error code sent by the remote.mgr | A2DP manager. |
remote_addr | The address of a remote device. |
seid_acp | The ID of a remote SEP. |
TRUE
if discover request has been sent. FALSE
otherwise. No events will be generated. #define bt_a2dp_get_hci_connection | ( | mgr, | |
strm_handle | |||
) | bt_avdtp_get_hci_connection(mgr->avdtp_mgr, strm_handle) |
Get HCI connection for a stream.
This function returns a pointer to a structure that describes an HCI connection a stream is open on. The return value can be used to call various function from the HCI layer. For example, if an app wants to force disconnection from a remote device it can call bt_hci_disconnect.
mgr | A2DP manager. |
strm_handle | Stream handle. |
Pointer
to a structure that describes an HCI connection if the function succeeds. NULL
otherwise. The function fails only if a stream specified by the strm_handle
parameter #define bt_a2dp_get_sep | ( | mgr, | |
sep_id | |||
) | bt_avdtp_get_sep(mgr->avdtp_mgr, sep_id) |
Get a SEP info by its ID.
This function returns a pointer to bt_avdtp_sep_t structure that describes a SEP previously registered with bt_a2dp_register_sink or bt_a2dp_register_source.
mgr | A2DP manager. |
sep_id | The ID of a SEP. |
Pointer
to bt_avdtp_sep_t if the SEP is in the list of registered SEPs. NULL
otherwise. #define bt_a2dp_get_stream_codec_config | ( | mgr, | |
strm_handle | |||
) | bt_avdtp_get_stream_codec_config(mgr->avdtp_mgr, strm_handle) |
Get the configuration of the codec currently used with the stream.
This function returns a pointer to a structure that contains configuration of the codec currently used with the stream. The structure returned depends on the codec. The dotstack defines structures only for SBC, MPEG-1,2 and MPEG-2,4 AAC codecs:
mgr | A2DP manager. |
strm_handle | Stream handle. |
AVDTP_STREAM_STATE_CONFIGURED AVDTP_STREAM_STATE_OPEN AVDTP_STREAM_STATE_STREAMING \li NULL otherwise.
#define bt_a2dp_get_stream_codec_type | ( | mgr, | |
strm_handle | |||
) | bt_avdtp_get_stream_codec_type(mgr->avdtp_mgr, strm_handle) |
Get the type of the codec currently used with the stream.
This function returns the type of the codec currently used with the stream.
mgr | A2DP manager. |
strm_handle | Stream handle. |
AVDTP_STREAM_STATE_CONFIGURED AVDTP_STREAM_STATE_OPEN AVDTP_STREAM_STATE_STREAMING @arg The result will be one of the following values: AVDTP_CODEC_TYPE_SBC: SBC AVDTP_CODEC_TYPE_MPEG1_2_AUDIO: MPEG-1,2 (used in MP3 files) AVDTP_CODEC_TYPE_MPEG2_4_AAC: MPEG-2,4 AAC (used in Apple products) AVDTP_CODEC_TYPE_ATRAC: ATRAC (used in Sony products) AVDTP_CODEC_TYPE_NON_A2DP: Non-A2DP Codec @arg 0xFF otherwise.
#define bt_a2dp_get_stream_config | ( | mgr, | |
strm_handle | |||
) | bt_avdtp_get_stream_config(mgr->avdtp_mgr, strm_handle) |
Get stream's configuration.
This function returns a pointer to a structure holding current configuration of the stream.
mgr | A2DP manager. |
strm_handle | Stream handle. |
AVDTP_STREAM_STATE_CONFIGURED AVDTP_STREAM_STATE_OPEN AVDTP_STREAM_STATE_STREAMING \li NULL otherwise.
#define bt_a2dp_get_stream_local_sep_id | ( | mgr, | |
strm_handle | |||
) | bt_avdtp_get_stream_local_sep_id(mgr->avdtp_mgr, strm_handle) |
Get stream's local SEP ID.
This function returns the ID of the local SEP associated with the stream.
mgr | A2DP manager. |
strm_handle | Stream handle. |
#define bt_a2dp_get_stream_remote_address | ( | mgr, | |
strm_handle | |||
) | bt_avdtp_get_stream_remote_address(mgr->avdtp_mgr, strm_handle) |
Get stream's remote BT address.
This function returns the address of the remote device associated with the stream.
mgr | A2DP manager. |
strm_handle | Stream handle. |
#define bt_a2dp_get_stream_remote_sep_id | ( | mgr, | |
strm_handle | |||
) | bt_avdtp_get_stream_remote_sep_id(mgr->avdtp_mgr, strm_handle) |
Get stream's remote SEP ID.
This function returns the ID of the remote SEP associated with the stream.
mgr | A2DP manager. |
strm_handle | Stream handle. |
#define bt_a2dp_get_stream_state | ( | mgr, | |
strm_handle | |||
) | bt_avdtp_get_stream_state(mgr->avdtp_mgr, strm_handle) |
Get local stream state.
This function returns local state of a stream specified by the strm_handle
. No request is sent to the remote party.
mgr | A2DP manager. |
strm_handle | Stream handle. |
strm_handle
does not exist or the stream is closed. #define bt_a2dp_listen | ( | mgr, | |
strm_handle, | |||
sep_id | |||
) | bt_avdtp_listen(mgr->avdtp_mgr, strm_handle, sep_id) |
Listen for incoming connections.
This function tells a stream that it can use a particular SEP to accept incoming requests to open it. The SEP can be associated with multiple streams but used with only one. The stream has to be closed before the SEP can be used with another stream. For outgoing connections this is not needed. Any SEP can be used with any stream given that the SEP is not already in use by another stream.
mgr | A2DP manager. |
strm_handle | Stream handle. |
sep_id | Local SEP ID. |
TRUE
if the function succeeds. FALSE
otherwise. #define bt_a2dp_reconfigure_stream | ( | mgr, | |
strm_handle, | |||
caps | |||
) | bt_avdtp_reconfigure_stream(mgr->avdtp_mgr, strm_handle, caps) |
Reconfigure stream.
This function tries to change the stream's configuration. For this function to succeed the stream has to be open. As a result of this operation the A2DP_EVT_STREAM_RECONFIGURE_COMPLETED event will be generated. If reconfiguration was a success the evt_param.stream_reconfigure_completed.err_code
== AVDTP_ERROR_SUCCESS. Otherwise the evt_param.stream_reconfigure_completed.err_code
== the error code sent by the remote.
mgr | A2DP manager. |
strm_handle | Stream handle. |
caps | New stream configuration. |
TRUE
if the function succeeds, i.e. the actual request has been sent to the remote party. FALSE
otherwise. No events will be generated. #define bt_a2dp_register_sink | ( | mgr, | |
caps | |||
) | bt_avdtp_register_sep(mgr->avdtp_mgr, AVDTP_SEP_TYPE_SINK, caps) |
Register a Sink SEP with the local A2DP manager.
This function is used to add a sink SEP to a list of SEPs supported by the local A2DP entity.
mgr | A2DP manager. |
caps | The capabilities of a SEP. |
ID
of a SEP if the function succeeds. FALSE
otherwise. #define bt_a2dp_register_source | ( | mgr, | |
caps | |||
) | bt_avdtp_register_sep(mgr->avdtp_mgr, AVDTP_SEP_TYPE_SOURCE, caps) |
Register a Source SEP with the local A2DP manager.
This function is used to add a source SEP to a list of SEPs supported by the local A2DP entity.
mgr | A2DP manager. |
caps | The capabilities of a SEP. |
ID
of a SEP if the function succeeds. FALSE
otherwise. #define bt_a2dp_remove_media_rx_buffer | ( | mgr, | |
strm_handle, | |||
buffer | |||
) | bt_avdtp_remove_media_rx_buffer(mgr->avdtp_mgr, strm_handle, buffer) |
Remove a media packet buffer from a receive queue.
The consumer of A2DP is responsible for allocating and supplying A2DP with buffers used to store received packets. A2DP itself only has a queue for storing pointers to buffers supplied by the consumer. When a packet comes in A2DP finds the first buffer large enough to hold the received packet, copies the packet to the buffer and generates a A2DP_EVT_MEDIA_PACKET_RECEIVED event. The consumer then has to process the data in the buffer and return it back to the queue. If there is no buffers in the queue or none of the buffers is large enough the received packets is dropped. Each buffer has a field (data_len) that holds the length of the received buffer. This field is never 0 if the buffer contains a packet. If a channel closed regardless of what has caused that and there are still buffers in the queue A2DP generates a A2DP_EVT_MEDIA_PACKET_RECEIVED event for each buffer and sets the data_len to 0. This is to inform the A2DP consumer that the buffer has not been used and can be, for example, deallocated. This function removes a buffer from the receive queue.
mgr | A2DP manager. |
strm_handle | Stream handle. |
buffer | Pointer to a structure that holds the buffer and its parameters. |
TRUE
if the function succeeds. FALSE
otherwise. The function fails only if a stream specified by the strm_handle
parameter #define bt_a2dp_remove_media_tx_buffer | ( | mgr, | |
strm_handle, | |||
buffer | |||
) | bt_avdtp_remove_media_tx_buffer(mgr->avdtp_mgr, strm_handle, buffer) |
Remove a media packet buffer from a send queue.
When the consumer of A2DP wants to send a packet to a remote device it calls bt_avdtp_add_media_tx_buffer function. The function adds the packet to a queue and tells A2DP that it has something to send. The packet will be send as soon as the stream goes to A2DP_STREAM_STATE_STREAMING state. The consumer has a chance to remove a packet from the queue before it has been sent to a remote device by calling bt_a2dp_remove_media_tx_buffer.
mgr | A2DP manager. |
strm_handle | Stream handle. |
buffer | Pointer to a structure that holds the buffer and its parameters. |
TRUE
if the function succeeds. FALSE
otherwise. The function fails only if a stream specified by the strm_handle
parameter #define bt_a2dp_set_media_tx_queue_limit | ( | mgr, | |
strm_handle, | |||
limit | |||
) | bt_avdtp_set_media_tx_queue_limit(mgr->avdtp_mgr, strm_handle, limit) |
Set limit on the send queue.
When the consumer of A2DP wants to send a packet to a remote device it calls bt_avdtp_add_media_tx_buffer function. The function adds the packet to a queue and tells A2DP that it has something to send. The packet will be send as soon as the stream goes to A2DP_STREAM_STATE_STREAMING state. By default the send queue can contain unlimited number of packets. The consumer can set a limit on how many packets are held in the queue. In this case when new packet is added to the queue and the length of the queue exceeds the set limit the first packet is removed from the queue. The removed packet is not send to the remote device.
mgr | A2DP manager. |
strm_handle | Stream handle. |
limit | Queue limit. |
TRUE
if the function succeeds. FALSE
otherwise. The function fails only if a stream specified by the strm_handle
parameter #define bt_a2dp_start_stream | ( | mgr, | |
strm_handle | |||
) | bt_avdtp_start_stream(mgr->avdtp_mgr, strm_handle) |
Start a stream.
This function tries to start a stream by sending a request to the remote party. The stream has to be in AVDTP_STREAM_STATE_OPEN state. The stream goes to this state as a result of successful configuration or suspension (both can be initiated by either party). As a result of this operation the A2DP_EVT_START_STREAM_COMPLETED event will be generated. If the stream has been open the evt_param.start_stream_requested.err_code
== AVDTP_ERROR_SUCCESS. Otherwise, if the remote device for any reason cannot or does not wish to start the stream, the evt_param.start_stream_requested.err_code
== the error code sent by the remote.
mgr | A2DP manager. |
strm_handle | Stream handle. |
TRUE
if the function succeeds, i.e. the actual request has been sent to the remote party. FALSE
otherwise. No events will be generated. #define bt_a2dp_suspend_stream | ( | mgr, | |
strm_handle | |||
) | bt_avdtp_suspend_stream(mgr->avdtp_mgr, strm_handle) |
Suspend a stream.
This function tries to suspend a stream by sending a request to the remote party. The stream has to be in AVDTP_STREAM_STATE_STREAMING state. As a result of this operation the A2DP_EVT_SUSPEND_STREAM_COMPLETED event will be generated. If the stream has been suspended the evt_param.bt_avdtp_evt_suspend_stream_requested_t.err_code
== AVDTP_ERROR_SUCCESS. Otherwise, if the remote device for any reason cannot or does not wish to suspend the stream, the evt_param.bt_avdtp_evt_suspend_stream_requested_t.err_code
== the error code sent by the remote.
mgr | A2DP manager. |
strm_handle | Stream handle. |
TRUE
if the function succeeds, i.e. the actual request has been sent to the remote party. FALSE
otherwise. No events will be generated. typedef void(* bt_a2dp_find_server_callback_fp) (bt_uint supported_features, bt_bool found, void *param) |
Notify the application of the result of searching for a remote A2DP entity (sourse or sink)
This function is called by the A2DP layer when searching for an A2DP entity on a remote device has completed.
supported_features | Features supported by a remote A2DP entity. |
found | TRUE if an A2DP entity has been found on the remote device. FALSE otherwise. |
param | pointer to arbitrary data passed to the bt_a2dp_find_source() or bt_a2dp_find_sink function through its callback_param parameter. |
typedef void(* bt_a2dp_mgr_callback_fp) (bt_a2dp_mgr_t *mgr, bt_byte evt, bt_a2dp_event_t *evt_param, void *callback_param) |
A2DP application callback.
In order to be notified of various events a consumer of the A2DP layer has to register a callback function. The stack will call that function whenever a new event has been generated.
mgr | A2DP manager. |
evt | A2DP event. The event can be one of the following values:
|
evt_param | Event parameter. Which member of the bt_a2dp_event_t union is valid depends on the event:
|
callback_param | A pointer to an arbitrary data set by a call to bt_avdtp_register_callback. |
bt_bool bt_a2dp_find_sink | ( | bt_bdaddr_t * | deviceAddress, |
bt_a2dp_find_server_callback_fp | callback, | ||
bt_sdp_client_callback_fp | client_callback, | ||
void * | callback_param | ||
) |
Find sink.
This function looks for a sink on a remote device specified by deviceAddress
and, if found, returns features supported by the sink.
deviceAddress | The address of a remote device. |
callback | The callback function that will be called when search has completed. |
client_callback | The optional callback function that an application can set if it wants to be notified of state changes of the SDP client. The evt parameter of the callback can be one of the following values:
|
callback_param | A pointer to arbitrary data to be passed to the callback and client_callback callbacks. |
TRUE
if the function succeeds. FALSE
otherwise. bt_bool bt_a2dp_find_source | ( | bt_bdaddr_t * | deviceAddress, |
bt_a2dp_find_server_callback_fp | callback, | ||
bt_sdp_client_callback_fp | client_callback, | ||
void * | callback_param | ||
) |
Find source.
This function looks for a source on a remote device specified by deviceAddress
and, if found, returns features supported by the source.
deviceAddress | The address of a remote device. |
callback | The callback function that will be called when search has completed. |
client_callback | The optional callback function that an application can set if it wants to be notified of state changes of the SDP client. The evt parameter of the callback can be one of the following values:
|
callback_param | A pointer to arbitrary data to be passed to the callback and client_callback callbacks. |
TRUE
if the function succeeds. FALSE
otherwise. bt_a2dp_mgr_t* bt_a2dp_get_mgr | ( | void | ) |
Return a pointer to an instance of the A2DP manager.
This function returns a pointer to an instance of the A manager. There is only one instance of the manager allocated by the stack. The pointer is passed as the first parameter to all A2DP functions.
void bt_a2dp_init | ( | void | ) |
Initialize the A2DP layer.
This function initializes the A2DP layer of the stack. It must be called prior to any other A2DP function can be called.
bt_bool bt_a2dp_open_and_start_stream | ( | bt_a2dp_mgr_t * | mgr, |
bt_byte | strm_handle, | ||
bt_bdaddr_t * | remote_addr, | ||
bt_byte | seid_int, | ||
bt_byte | seid_acp, | ||
const bt_avdtp_sep_capabilities_t * | caps | ||
) |
Open & start a stream.
Opening a stream involves sending 3 requests to a remote device - "set configuration", "open stream" and "start stream". Each event generates its own event which must be handled and acted accordingly by the application. To make the use of API easier dotstack combines all these requests in one request called "open & start stream". dotstack sends necessary requests in a proper sequence, handles responses and generates only one event (A2DP_EVT_OPEN_AND_START_STREAM_COMPLETED) at the end. If any of the individual requests has failed the event's parameter bt_a2dp_event_t::open_and_start_stream_completed is populated with the error code and request id which caused it.
mgr | A2DP manager. |
strm_handle | Stream handle. |
remote_addr | The address of a remote device. |
seid_int | Local SEP ID. |
seid_acp | Remote SEP ID. |
caps | Stream configuration. |
TRUE
if the function succeeds. FALSE
otherwise. No events will be generated. void bt_a2dp_register_aac_codec | ( | bt_a2dp_mgr_t * | mgr | ) |
Register default AAC codec.
This function adds AAC codec implemented by dotstack to the list of known codecs. For more information about codecs see description of bt_avdtp_register_codec. The only codec A2DP is mandatory to support is SBC. All other codecs are optional. If an application wants to use AAC codec it must call this function when it is initializing.
mgr | A2DP manager. |
void bt_a2dp_register_callback | ( | bt_a2dp_mgr_t * | mgr, |
bt_a2dp_mgr_callback_fp | callback, | ||
void * | callback_param | ||
) |
Register a A2DP application callback.
In order to be notified of various events a consumer of the A2DP layer has to register a callback function. The stack will call this function whenever a new event has been generated passing the code of the event as the second parameter. The event can be one of the following values:
mgr | AVDTP manager. |
callback | The callback function that will be called when the AVDTP generates an event. |
callback_param | A pointer to arbitrary data to be passed to the callback callback. |
void bt_a2dp_register_mpeg_codec | ( | bt_a2dp_mgr_t * | mgr | ) |
Register default MPEG codec.
This function adds MPEG codec implemented by dotstack to the list of known codecs. For more information about codecs see description of bt_avdtp_register_codec. The only codec A2DP is mandatory to support is SBC. All other codecs are optional. If an application wants to use MPEG-1,2 codec it must call this function when it is initializing.
mgr | A2DP manager. |
bt_bool bt_a2dp_start | ( | bt_a2dp_mgr_t * | mgr | ) |
Start the A2DP layer.
This function makes the A2DP layer ready to accept connection requests from remote device. To make an outgoing connection calling this function is not required.
mgr | AVDTP manager. |
TRUE
if the function succeeds. FALSE
otherwise.