avdtp_source.c (6535961a1f105e850ecdf294c128b9fc982ee05a) avdtp_source.c (78315a58573f370dd679856042aa32fba14bc84a)
1
2/*
3 * Copyright (C) 2016 BlueKitchen GmbH
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *

--- 162 unchanged lines hidden (view full) ---

171 return;
172 }
173 avdtp_source_context = avdtp_context;
174 avdtp_source_context->stream_endpoints = NULL;
175 avdtp_source_context->connections = NULL;
176 avdtp_source_context->stream_endpoints_id_counter = 0;
177 avdtp_source_context->packet_handler = packet_handler;
178
1
2/*
3 * Copyright (C) 2016 BlueKitchen GmbH
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *

--- 162 unchanged lines hidden (view full) ---

171 return;
172 }
173 avdtp_source_context = avdtp_context;
174 avdtp_source_context->stream_endpoints = NULL;
175 avdtp_source_context->connections = NULL;
176 avdtp_source_context->stream_endpoints_id_counter = 0;
177 avdtp_source_context->packet_handler = packet_handler;
178
179 l2cap_register_service(&packet_handler, BLUETOOTH_PSM_AVDTP, 0xffff, LEVEL_2);
179 l2cap_register_service(&packet_handler, BLUETOOTH_PSM_AVDTP, 0xffff, gap_get_security_level());
180}
181
182
183static void avdtp_source_setup_media_header(uint8_t * media_packet, int size, int *offset, uint8_t marker, uint16_t sequence_number){
184 if (size < AVDTP_MEDIA_PAYLOAD_HEADER_SIZE){
185 log_error("small outgoing buffer");
186 return;
187 }

--- 98 unchanged lines hidden ---
180}
181
182
183static void avdtp_source_setup_media_header(uint8_t * media_packet, int size, int *offset, uint8_t marker, uint16_t sequence_number){
184 if (size < AVDTP_MEDIA_PAYLOAD_HEADER_SIZE){
185 log_error("small outgoing buffer");
186 return;
187 }

--- 98 unchanged lines hidden ---