mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-17 20:42:47 +00:00
add media con handle to stream endpoint
This commit is contained in:
parent
9e42cfcc12
commit
57f317a13d
@ -234,7 +234,8 @@ static void stream_endpoint_state_machine(avdtp_connection_t * connection, avdtp
|
|||||||
stream_endpoint->state = AVDTP_STREAM_ENDPOINT_OPENED;
|
stream_endpoint->state = AVDTP_STREAM_ENDPOINT_OPENED;
|
||||||
stream_endpoint->connection = connection;
|
stream_endpoint->connection = connection;
|
||||||
stream_endpoint->l2cap_media_cid = l2cap_event_channel_opened_get_local_cid(packet);
|
stream_endpoint->l2cap_media_cid = l2cap_event_channel_opened_get_local_cid(packet);
|
||||||
printf(" -> AVDTP_STREAM_ENDPOINT_OPENED, stream endpoint %p, connection %p\n", stream_endpoint, connection);
|
stream_endpoint->media_con_handle = l2cap_event_channel_opened_get_handle(packet);
|
||||||
|
printf(" -> AVDTP_STREAM_ENDPOINT_OPENED, media con handle 0x%02x, l2cap_media_cid 0x%02x\n", stream_endpoint->media_con_handle, stream_endpoint->l2cap_media_cid);
|
||||||
avdtp_streaming_emit_connection_established(context->avdtp_callback, stream_endpoint->l2cap_media_cid, 0);
|
avdtp_streaming_emit_connection_established(context->avdtp_callback, stream_endpoint->l2cap_media_cid, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -689,7 +690,7 @@ void avdtp_reconfigure(uint16_t con_handle, uint8_t acp_seid, uint16_t configure
|
|||||||
if (connection->state < AVDTP_SIGNALING_CONNECTION_OPENED) return;
|
if (connection->state < AVDTP_SIGNALING_CONNECTION_OPENED) return;
|
||||||
if (connection->initiator_connection_state != AVDTP_SIGNALING_CONNECTION_INITIATOR_IDLE) return;
|
if (connection->initiator_connection_state != AVDTP_SIGNALING_CONNECTION_INITIATOR_IDLE) return;
|
||||||
avdtp_stream_endpoint_t * stream_endpoint = avdtp_stream_endpoint_associated_with_acp_seid(acp_seid, context);
|
avdtp_stream_endpoint_t * stream_endpoint = avdtp_stream_endpoint_associated_with_acp_seid(acp_seid, context);
|
||||||
|
|
||||||
if (!stream_endpoint) return;
|
if (!stream_endpoint) return;
|
||||||
if (stream_endpoint->remote_sep_index == 0xFF) return;
|
if (stream_endpoint->remote_sep_index == 0xFF) return;
|
||||||
connection->initiator_transaction_label++;
|
connection->initiator_transaction_label++;
|
||||||
|
@ -434,6 +434,7 @@ typedef struct avdtp_stream_endpoint {
|
|||||||
|
|
||||||
// original capabilities
|
// original capabilities
|
||||||
avdtp_sep_t sep;
|
avdtp_sep_t sep;
|
||||||
|
hci_con_handle_t media_con_handle;
|
||||||
uint16_t l2cap_media_cid;
|
uint16_t l2cap_media_cid;
|
||||||
uint16_t l2cap_reporting_cid;
|
uint16_t l2cap_reporting_cid;
|
||||||
uint16_t l2cap_recovery_cid;
|
uint16_t l2cap_recovery_cid;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user