Home
last modified time | relevance | path

Searched refs:stream_endpoint (Results 1 – 19 of 19) sorted by relevance

/btstack/src/classic/
H A Davdtp_initiator.c78 avdtp_stream_endpoint_t * stream_endpoint = NULL; in avdtp_initiator_stream_config_subsm() local
85 stream_endpoint = avdtp_get_stream_endpoint_for_seid(connection->initiator_local_seid); in avdtp_initiator_stream_config_subsm()
86 if (stream_endpoint == NULL) { in avdtp_initiator_stream_config_subsm()
90 …log_debug("using stream endpoint %p for local seid %u", stream_endpoint, connection->initiator_loc… in avdtp_initiator_stream_config_subsm()
94 if (stream_endpoint->initiator_config_state != AVDTP_INITIATOR_W4_ANSWER) { in avdtp_initiator_stream_config_subsm()
95 …log_error("initiator_config_state is in wrong state %d, expected %d", stream_endpoint->initiator_c… in avdtp_initiator_stream_config_subsm()
98 stream_endpoint->initiator_config_state = AVDTP_INITIATOR_STREAM_CONFIG_IDLE; in avdtp_initiator_stream_config_subsm()
143 if (!stream_endpoint){ in avdtp_initiator_stream_config_subsm()
147 stream_endpoint_for_event = stream_endpoint; in avdtp_initiator_stream_config_subsm()
148stream_endpoint->remote_sep.configured_service_categories |= stream_endpoint->remote_configuration… in avdtp_initiator_stream_config_subsm()
[all …]
H A Davdtp.c63 static uint8_t (*avdtp_sink_media_config_validator)(const avdtp_stream_endpoint_t * stream_endpoint
64 …avdtp_source_media_config_validator)(const avdtp_stream_endpoint_t * stream_endpoint, const uint8_…
88 avdtp_packet_handler_for_stream_endpoint(const avdtp_stream_endpoint_t *stream_endpoint) { in avdtp_packet_handler_for_stream_endpoint() argument
89 … return (stream_endpoint->sep.type == AVDTP_SOURCE) ? avdtp_source_callback : avdtp_sink_callback; in avdtp_packet_handler_for_stream_endpoint()
142 …avdtp_stream_endpoint_t * stream_endpoint = (avdtp_stream_endpoint_t *)btstack_linked_list_iterato… in avdtp_get_stream_endpoint_for_seid() local
143 if (stream_endpoint->sep.seid == seid){ in avdtp_get_stream_endpoint_for_seid()
144 return stream_endpoint; in avdtp_get_stream_endpoint_for_seid()
154 …avdtp_stream_endpoint_t * stream_endpoint = (avdtp_stream_endpoint_t *)btstack_linked_list_iterato… in avdtp_get_source_stream_endpoint_for_media_codec_and_type() local
155 if (stream_endpoint->sep.type != sep_type) continue; in avdtp_get_source_stream_endpoint_for_media_codec_and_type()
156 if (stream_endpoint->sep.media_type != AVDTP_AUDIO) continue; in avdtp_get_source_stream_endpoint_for_media_codec_and_type()
[all …]
H A Davdtp_acceptor.c101 …ection_t *connection, int offset, uint16_t packet_size, avdtp_stream_endpoint_t *stream_endpoint) { in avdtp_acceptor_handle_configuration_command() argument
103 stream_endpoint->state = AVDTP_STREAM_ENDPOINT_CONFIGURATION_SUBSTATEMACHINE; in avdtp_acceptor_handle_configuration_command()
104 stream_endpoint->connection = connection; in avdtp_acceptor_handle_configuration_command()
114 if (stream_endpoint->sep.in_use != 0){ in avdtp_acceptor_handle_configuration_command()
124 …uint8_t error_code = avdtp_validate_media_configuration(stream_endpoint, connection->avdtp_cid, 0,… in avdtp_acceptor_handle_configuration_command()
135 stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_REJECT_CATEGORY_WITH_ERROR_CODE; in avdtp_acceptor_handle_configuration_command()
139 stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_ACCEPT_SET_CONFIGURATION; in avdtp_acceptor_handle_configuration_command()
144 if (is_avdtp_remote_seid_registered(stream_endpoint)){ in avdtp_acceptor_handle_configuration_command()
145 if (stream_endpoint->remote_sep.in_use){ in avdtp_acceptor_handle_configuration_command()
158stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_W2_REJECT_CATEGORY_WITH_ERROR_CODE; in avdtp_acceptor_handle_configuration_command()
[all …]
H A Davdtp_source.c58 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(seid); in avdtp_source_register_media_transport_category() local
59 avdtp_register_media_transport_category(stream_endpoint); in avdtp_source_register_media_transport_category()
63 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(seid); in avdtp_source_register_reporting_category() local
64 avdtp_register_reporting_category(stream_endpoint); in avdtp_source_register_reporting_category()
68 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(seid); in avdtp_source_register_delay_reporting_category() local
69 avdtp_register_delay_reporting_category(stream_endpoint); in avdtp_source_register_delay_reporting_category()
73 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(seid); in avdtp_source_register_recovery_category() local
74 …avdtp_register_recovery_category(stream_endpoint, maximum_recovery_window_size, maximum_number_med… in avdtp_source_register_recovery_category()
78 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(seid); in avdtp_source_register_content_protection_category() local
79 …avdtp_register_content_protection_category(stream_endpoint, cp_type, cp_type_value, cp_type_value_… in avdtp_source_register_content_protection_category()
[all …]
H A Davdtp_sink.c56 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(seid); in avdtp_sink_register_media_transport_category() local
57 avdtp_register_media_transport_category(stream_endpoint); in avdtp_sink_register_media_transport_category()
61 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(seid); in avdtp_sink_register_reporting_category() local
62 avdtp_register_reporting_category(stream_endpoint); in avdtp_sink_register_reporting_category()
66 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(seid); in avdtp_sink_register_delay_reporting_category() local
67 avdtp_register_delay_reporting_category(stream_endpoint); in avdtp_sink_register_delay_reporting_category()
71 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(seid); in avdtp_sink_register_recovery_category() local
72 …avdtp_register_recovery_category(stream_endpoint, maximum_recovery_window_size, maximum_number_med… in avdtp_sink_register_recovery_category()
76 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(seid); in avdtp_sink_register_content_protection_category() local
77 …avdtp_register_content_protection_category(stream_endpoint, cp_type, cp_type_value, cp_type_value_… in avdtp_sink_register_content_protection_category()
[all …]
H A Davdtp_util.c157 void avdtp_reset_stream_endpoint(avdtp_stream_endpoint_t * stream_endpoint){ in avdtp_reset_stream_endpoint() argument
158 stream_endpoint->media_con_handle = 0; in avdtp_reset_stream_endpoint()
159 stream_endpoint->l2cap_media_cid = 0; in avdtp_reset_stream_endpoint()
160 stream_endpoint->l2cap_reporting_cid = 0; in avdtp_reset_stream_endpoint()
161 stream_endpoint->l2cap_recovery_cid = 0; in avdtp_reset_stream_endpoint()
163 stream_endpoint->state = AVDTP_STREAM_ENDPOINT_IDLE; in avdtp_reset_stream_endpoint()
164 stream_endpoint->acceptor_config_state = AVDTP_ACCEPTOR_STREAM_CONFIG_IDLE; in avdtp_reset_stream_endpoint()
165 stream_endpoint->initiator_config_state = AVDTP_INITIATOR_STREAM_CONFIG_IDLE; in avdtp_reset_stream_endpoint()
167 stream_endpoint->connection = NULL; in avdtp_reset_stream_endpoint()
169 stream_endpoint->sep.in_use = 0; in avdtp_reset_stream_endpoint()
[all …]
H A Davdtp.h665 …handler_t avdtp_packet_handler_for_stream_endpoint(const avdtp_stream_endpoint_t *stream_endpoint);
669 void avdtp_register_media_transport_category(avdtp_stream_endpoint_t * stream_endpoint);
670 void avdtp_register_reporting_category(avdtp_stream_endpoint_t * stream_endpoint);
671 void avdtp_register_delay_reporting_category(avdtp_stream_endpoint_t * stream_endpoint);
672 void avdtp_register_recovery_category(avdtp_stream_endpoint_t * stream_endpoint, uint8_t maximum_re…
673 void avdtp_register_content_protection_category(avdtp_stream_endpoint_t * stream_endpoint, uint16_t…
674 void avdtp_register_header_compression_category(avdtp_stream_endpoint_t * stream_endpoint, uint8_t …
675 void avdtp_register_media_codec_category(avdtp_stream_endpoint_t * stream_endpoint, avdtp_media_typ…
676 void avdtp_register_multiplexing_category(avdtp_stream_endpoint_t * stream_endpoint, uint8_t fragme…
683 void avdtp_finalize_stream_endpoint(avdtp_stream_endpoint_t * stream_endpoint);
[all …]
H A Da2dp_source.c71 …*a2dp_source_media_config_validator)(const avdtp_stream_endpoint_t * stream_endpoint, const uint8_…
128 …avdtp_stream_endpoint_t * stream_endpoint = avdtp_source_create_stream_endpoint(AVDTP_SOURCE, medi… in a2dp_source_create_stream_endpoint() local
129 if (!stream_endpoint){ in a2dp_source_create_stream_endpoint()
132 avdtp_source_register_media_transport_category(avdtp_stream_endpoint_seid(stream_endpoint)); in a2dp_source_create_stream_endpoint()
133 …avdtp_source_register_media_codec_category(avdtp_stream_endpoint_seid(stream_endpoint), media_type… in a2dp_source_create_stream_endpoint()
135 avdtp_source_register_delay_reporting_category(avdtp_stream_endpoint_seid(stream_endpoint)); in a2dp_source_create_stream_endpoint()
138 stream_endpoint->media_codec_type = media_codec_type; in a2dp_source_create_stream_endpoint()
139 stream_endpoint->media_codec_configuration_info = codec_configuration; in a2dp_source_create_stream_endpoint()
140 stream_endpoint->media_codec_configuration_len = codec_configuration_len; in a2dp_source_create_stream_endpoint()
142 return stream_endpoint; in a2dp_source_create_stream_endpoint()
[all …]
H A Davdtp_util.h91 void avdtp_signaling_emit_accept_for_stream_endpoint(avdtp_stream_endpoint_t * stream_endpoint, uin…
105 avdtp_signaling_emit_configuration(avdtp_stream_endpoint_t *stream_endpoint, uint16_t avdtp_cid, ui…
108 …a_codec_config_event(uint8_t *event, uint16_t size, const avdtp_stream_endpoint_t *stream_endpoint,
112 void avdtp_streaming_emit_connection_established(avdtp_stream_endpoint_t *stream_endpoint, uint8_t …
114 void avdtp_streaming_emit_connection_released(avdtp_stream_endpoint_t *stream_endpoint, uint16_t av…
116 void avdtp_streaming_emit_can_send_media_packet_now(avdtp_stream_endpoint_t *stream_endpoint, uint1…
122 void avdtp_reset_stream_endpoint(avdtp_stream_endpoint_t * stream_endpoint);
125 uint8_t avdtp_local_seid(const avdtp_stream_endpoint_t * stream_endpoint);
126 uint8_t avdtp_remote_seid(const avdtp_stream_endpoint_t * stream_endpoint);
H A Da2dp_sink.c59 static uint8_t (*a2dp_sink_media_config_validator)(const avdtp_stream_endpoint_t * stream_endpoint,…
122 void a2dp_sink_finalize_stream_endpoint(avdtp_stream_endpoint_t * stream_endpoint){ in a2dp_sink_finalize_stream_endpoint() argument
123 avdtp_sink_finalize_stream_endpoint(stream_endpoint); in a2dp_sink_finalize_stream_endpoint()
167 …sink_media_config_validator_callback(const avdtp_stream_endpoint_t * stream_endpoint, const uint8_… in a2dp_sink_media_config_validator_callback() argument
175 error = (*a2dp_sink_media_config_validator)(stream_endpoint, event, size); in a2dp_sink_media_config_validator_callback()
181 …config_validator(uint8_t (*callback)(const avdtp_stream_endpoint_t * stream_endpoint, const uint8_… in a2dp_sink_register_media_config_validator() argument
H A Da2dp.c449 avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_stream_endpoint_for_seid(local_seid); in a2dp_config_process_config_init() local
450 if (stream_endpoint == NULL){ in a2dp_config_process_config_init()
467stream_endpoint->remote_configuration_bitmap = store_bit16(stream_endpoint->remote_configuration_b… in a2dp_config_process_config_init()
468 stream_endpoint->remote_configuration.media_codec.media_type = AVDTP_AUDIO; in a2dp_config_process_config_init()
469 stream_endpoint->remote_configuration.media_codec.media_codec_type = codec_type; in a2dp_config_process_config_init()
471 stream_endpoint->set_config_remote_seid = remote_seid; in a2dp_config_process_config_init()
474stream_endpoint->remote_configuration_bitmap = store_bit16(stream_endpoint->remote_configuration_b… in a2dp_config_process_config_init()
478 config_process->local_stream_endpoint = stream_endpoint; in a2dp_config_process_config_init()
607 …avdtp_stream_endpoint_t * stream_endpoint = avdtp_get_source_stream_endpoint_for_media_codec_and_t… in a2dp_config_process_avdtp_event_handler() local
608 if (stream_endpoint != NULL){ in a2dp_config_process_avdtp_event_handler()
[all …]
H A Da2dp_sink.h91 void a2dp_sink_finalize_stream_endpoint(avdtp_stream_endpoint_t * stream_endpoint);
203 …config_validator(uint8_t (*callback)(const avdtp_stream_endpoint_t * stream_endpoint, const uint8_…
H A Da2dp_source.h91 void a2dp_source_finalize_stream_endpoint(avdtp_stream_endpoint_t * stream_endpoint);
245 …config_validator(uint8_t (*callback)(const avdtp_stream_endpoint_t * stream_endpoint, const uint8_…
H A Davdtp_sink.h70 void avdtp_sink_finalize_stream_endpoint(avdtp_stream_endpoint_t * stream_endpoint);
186 …config_validator(uint8_t (*callback)(const avdtp_stream_endpoint_t * stream_endpoint, const uint8_…
H A Davdtp_source.h237 void avdtp_source_finalize_stream_endpoint(avdtp_stream_endpoint_t * stream_endpoint);
283 …config_validator(uint8_t (*callback)(const avdtp_stream_endpoint_t * stream_endpoint, const uint8_…
H A Davdtp_initiator.h55 …_stream_config_subsm_handle_can_send_now_stream_endpoint(avdtp_stream_endpoint_t *stream_endpoint);
/btstack/test/avdtp/
H A Dsine_encode_decode_ring_buffer_test.c87 …o_ring_buffer(void *userData, int num_samples_to_write, avdtp_stream_endpoint_t * stream_endpoint){ in fill_audio_ring_buffer() argument
90 …while (btstack_ring_buffer_bytes_free(&stream_endpoint->audio_ring_buffer) >= BYTES_PER_AUDIO_SAMP… in fill_audio_ring_buffer()
95 …btstack_ring_buffer_write(&stream_endpoint->audio_ring_buffer, write_data, BYTES_PER_AUDIO_SAMPLE); in fill_audio_ring_buffer()
109 …r_transmission(uint8_t * sbc_frame, int sbc_frame_size, avdtp_stream_endpoint_t * stream_endpoint){ in store_sbc_frame_for_transmission() argument
110 if (btstack_ring_buffer_bytes_free(&stream_endpoint->sbc_ring_buffer) >= (sbc_frame_size + 1)){ in store_sbc_frame_for_transmission()
113 btstack_ring_buffer_write(&stream_endpoint->sbc_ring_buffer, &size_buffer, 1); in store_sbc_frame_for_transmission()
114 btstack_ring_buffer_write(&stream_endpoint->sbc_ring_buffer, sbc_frame, sbc_frame_size); in store_sbc_frame_for_transmission()
121 static void avdtp_source_stream_endpoint_run(avdtp_stream_endpoint_t * stream_endpoint){ in avdtp_source_stream_endpoint_run() argument
128 …io buf, bytes available: %d\n", btstack_ring_buffer_bytes_available(&stream_endpoint->audio_ring_b… in avdtp_source_stream_endpoint_run()
129 …printf(" sbc buf, bytes free: %d\n", btstack_ring_buffer_bytes_free(&stream_endpoint->s… in avdtp_source_stream_endpoint_run()
[all …]
/btstack/test/avdtp_util/
H A Davdtp_util_test.cpp67 …andler_t avdtp_packet_handler_for_stream_endpoint(const avdtp_stream_endpoint_t * stream_endpoint){ in avdtp_packet_handler_for_stream_endpoint() argument
68 UNUSED(stream_endpoint); in avdtp_packet_handler_for_stream_endpoint()
/btstack/example/
H A Da2dp_sink_demo.c283 a2dp_sink_demo_stream_endpoint_t * stream_endpoint = &a2dp_sink_demo_stream_endpoint; in setup_demo() local
286stream_endpoint->media_sbc_codec_configuration, sizeof(stream_endpoint->media_sbc_codec_configurat… in setup_demo()
289 stream_endpoint->a2dp_local_seid = avdtp_local_seid(local_stream_endpoint); in setup_demo()