avdtp.c (2d9d000f0d11d477d59a9de47a953eafddb31c49) | avdtp.c (61fb88e19d4865881ff85bb84d6ffbc95339ce1c) |
---|---|
1/* 2 * Copyright (C) 2016 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 132 unchanged lines hidden (view full) --- 141 little_endian_store_16(event, pos, avdtp_cid); 142 pos += 2; 143 event[pos++] = local_seid; 144 little_endian_store_16(event, pos, delay); 145 pos += 2; 146 (*avdtp_source_callback)(HCI_EVENT_PACKET, 0, event, sizeof(event)); 147} 148 | 1/* 2 * Copyright (C) 2016 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 132 unchanged lines hidden (view full) --- 141 little_endian_store_16(event, pos, avdtp_cid); 142 pos += 2; 143 event[pos++] = local_seid; 144 little_endian_store_16(event, pos, delay); 145 pos += 2; 146 (*avdtp_source_callback)(HCI_EVENT_PACKET, 0, event, sizeof(event)); 147} 148 |
149void avdtp_emit_configuration(avdtp_stream_endpoint_t *stream_endpoint, uint16_t avdtp_cid, 150 avdtp_capabilities_t *configuration, uint16_t configured_service_categories) { 151 152 uint8_t local_seid = avdtp_local_seid(stream_endpoint); 153 uint8_t remote_seid = avdtp_remote_seid(stream_endpoint); 154 btstack_packet_handler_t packet_handler = avdtp_packet_handler_for_stream_endpoint(stream_endpoint); 155 156 if (get_bit16(configured_service_categories, AVDTP_MEDIA_CODEC)){ 157 switch (configuration->media_codec.media_codec_type){ 158 case AVDTP_CODEC_SBC: 159 avdtp_signaling_emit_media_codec_sbc_configuration(packet_handler, avdtp_cid, local_seid, remote_seid, 160 configuration->media_codec.media_type, configuration->media_codec.media_codec_information); 161 break; 162 default: 163 avdtp_signaling_emit_media_codec_other_configuration(packet_handler, avdtp_cid, local_seid, remote_seid, configuration->media_codec); 164 break; 165 } 166 } 167} 168 |
|
149btstack_linked_list_t * avdtp_get_stream_endpoints(void){ 150 return &stream_endpoints; 151} 152 153static avdtp_connection_t * avdtp_get_connection_for_bd_addr(bd_addr_t addr){ 154 btstack_linked_list_iterator_t it; 155 btstack_linked_list_iterator_init(&it, &connections); 156 while (btstack_linked_list_iterator_has_next(&it)){ --- 1274 unchanged lines hidden --- | 169btstack_linked_list_t * avdtp_get_stream_endpoints(void){ 170 return &stream_endpoints; 171} 172 173static avdtp_connection_t * avdtp_get_connection_for_bd_addr(bd_addr_t addr){ 174 btstack_linked_list_iterator_t it; 175 btstack_linked_list_iterator_init(&it, &connections); 176 while (btstack_linked_list_iterator_has_next(&it)){ --- 1274 unchanged lines hidden --- |