#include <stdint.h>
Functions | |
void | a2dp_sink_create_sdp_record (uint8_t *service, uint32_t service_record_handle, uint16_t supported_features, const char *service_name, const char *service_provider_name) |
Create A2DP Sink service record. More... | |
uint8_t | a2dp_sink_create_stream_endpoint (avdtp_media_type_t media_type, avdtp_media_codec_type_t media_codec_type, uint8_t *codec_capabilities, uint16_t codec_capabilities_len, uint8_t *codec_configuration, uint16_t codec_configuration_len, uint8_t *out_local_seid) |
Create a stream endpoint of type SINK, and register media codec by specifying its capabilities and the default configuration. More... | |
void | a2dp_sink_disconnect (uint16_t a2dp_cid) |
Release stream and disconnect from remote. More... | |
uint8_t | a2dp_sink_establish_stream (bd_addr_t remote, uint8_t local_seid, uint16_t *out_a2dp_cid) |
Establish stream. More... | |
void | a2dp_sink_init (void) |
Initialize up A2DP Sink device. More... | |
void | a2dp_sink_register_media_handler (void(*callback)(uint8_t local_seid, uint8_t *packet, uint16_t size)) |
Register media handler for the A2DP Sink client. More... | |
void | a2dp_sink_register_packet_handler (btstack_packet_handler_t callback) |
Register callback for the A2DP Sink client. More... | |
void a2dp_sink_create_sdp_record | ( | uint8_t * | service, |
uint32_t | service_record_handle, | ||
uint16_t | supported_features, | ||
const char * | service_name, | ||
const char * | service_provider_name | ||
) |
Create A2DP Sink service record.
service | |
service_record_handle | |
supported_features | 16-bit bitmap, see AVDTP_SINK_SF_* values in avdtp.h |
service_name | |
service_provider_name |
uint8_t a2dp_sink_create_stream_endpoint | ( | avdtp_media_type_t | media_type, |
avdtp_media_codec_type_t | media_codec_type, | ||
uint8_t * | codec_capabilities, | ||
uint16_t | codec_capabilities_len, | ||
uint8_t * | codec_configuration, | ||
uint16_t | codec_configuration_len, | ||
uint8_t * | out_local_seid | ||
) |
Create a stream endpoint of type SINK, and register media codec by specifying its capabilities and the default configuration.
media_type | see avdtp_media_type_t values in avdtp.h (audio, video or multimedia) |
media_codec_type | see avdtp_media_codec_type_t values in avdtp.h |
codec_capabilities | media codec capabilities as defined in A2DP spec, section 4 - Audio Codec Interoperability Requirements. |
codec_capabilities_len | media codec capabilities length |
codec_configuration | default media codec configuration |
codec_configuration_len | media codec configuration length |
out_local_seid | Assigned stream endpoint ID used in further A2DP commands. |
void a2dp_sink_disconnect | ( | uint16_t | a2dp_cid | ) |
Release stream and disconnect from remote.
a2dp_cid | A2DP channel identifyer. |
uint8_t a2dp_sink_establish_stream | ( | bd_addr_t | remote, |
uint8_t | local_seid, | ||
uint16_t * | out_a2dp_cid | ||
) |
Establish stream.
remote | |
local_seid | ID of a local stream endpoint. |
out_a2dp_cid | Assigned A2DP channel identifyer used for furhter A2DP commands. |
void a2dp_sink_init | ( | void | ) |
Initialize up A2DP Sink device.
void a2dp_sink_register_media_handler | ( | void(*)(uint8_t local_seid, uint8_t *packet, uint16_t size) | callback | ) |
Register media handler for the A2DP Sink client.
callback | |
packet | |
size |
void a2dp_sink_register_packet_handler | ( | btstack_packet_handler_t | callback | ) |
Register callback for the A2DP Sink client.
It will receive following subevents of HCI_EVENT_A2DP_META HCI event type:
callback |