avdtp_source.h (6a737fb6dffb35739dfc90427773a58b014bc75d) avdtp_source.h (48ce193c1bb43973676c530932628af0332bfb28)
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

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

233/**
234 * @brief Unregister stream endpoint and free it's memory
235 * @param stream_endpoint created by avdtp_sink_create_stream_endpoint
236 */
237void avdtp_source_finalize_stream_endpoint(avdtp_stream_endpoint_t * stream_endpoint);
238
239/**
240 * @brief Send media packet
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

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

233/**
234 * @brief Unregister stream endpoint and free it's memory
235 * @param stream_endpoint created by avdtp_sink_create_stream_endpoint
236 */
237void avdtp_source_finalize_stream_endpoint(avdtp_stream_endpoint_t * stream_endpoint);
238
239/**
240 * @brief Send media packet
241 * @param avdtp_cid AVDTP channel identifyer.
241 * @param avdtp_cid AVDTP channel identifier.
242 * @param local_seid ID of a local stream endpoint.
243 * @param packet
244 * @param size
245 * @return status
246 */
247uint8_t avdtp_source_stream_send_media_packet(uint16_t avdtp_cid, uint8_t local_seid, const uint8_t * packet, uint16_t size);
248
249/**
250 * @brief Send media payload including RTP header
242 * @param local_seid ID of a local stream endpoint.
243 * @param packet
244 * @param size
245 * @return status
246 */
247uint8_t avdtp_source_stream_send_media_packet(uint16_t avdtp_cid, uint8_t local_seid, const uint8_t * packet, uint16_t size);
248
249/**
250 * @brief Send media payload including RTP header
251 * @param avdtp_cid AVDTP channel identifyer.
251 * @param avdtp_cid AVDTP channel identifier.
252 * @param local_seid ID of a local stream endpoint.
253 * @param marker
254 * @param payload
255 * @param size
256 * @return status
257 */
258uint8_t avdtp_source_stream_send_media_payload_rtp(uint16_t avdtp_cid, uint8_t local_seid, uint8_t marker, uint8_t * payload, uint16_t size);
259
260/**
261 * @brief Send media payload including RTP header and the SBC media header
262 * @deprecated Please use avdtp_source_stream_send_media_payload_rtp
252 * @param local_seid ID of a local stream endpoint.
253 * @param marker
254 * @param payload
255 * @param size
256 * @return status
257 */
258uint8_t avdtp_source_stream_send_media_payload_rtp(uint16_t avdtp_cid, uint8_t local_seid, uint8_t marker, uint8_t * payload, uint16_t size);
259
260/**
261 * @brief Send media payload including RTP header and the SBC media header
262 * @deprecated Please use avdtp_source_stream_send_media_payload_rtp
263 * @param avdtp_cid AVDTP channel identifyer.
263 * @param avdtp_cid AVDTP channel identifier.
264 * @param local_seid ID of a local stream endpoint.
265 * @param storage
266 * @param num_bytes_to_copy
267 * @param num_frames
268 * @param marker
269 * @return max_media_payload_size_without_media_header
270 */
271int avdtp_source_stream_send_media_payload(uint16_t avdtp_cid, uint8_t local_seid, uint8_t * storage, int num_bytes_to_copy, uint8_t num_frames, uint8_t marker);
272
264 * @param local_seid ID of a local stream endpoint.
265 * @param storage
266 * @param num_bytes_to_copy
267 * @param num_frames
268 * @param marker
269 * @return max_media_payload_size_without_media_header
270 */
271int avdtp_source_stream_send_media_payload(uint16_t avdtp_cid, uint8_t local_seid, uint8_t * storage, int num_bytes_to_copy, uint8_t num_frames, uint8_t marker);
272
273
274
275/**
276 * @brief Request to send a media packet. Packet can be then sent on reception of AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW event.
273/**
274 * @brief Request to send a media packet. Packet can be then sent on reception of AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW event.
277 * @param avdtp_cid AVDTP channel identifyer.
275 * @param avdtp_cid AVDTP channel identifier.
278 * @param local_seid ID of a local stream endpoint.
279 */
280void avdtp_source_stream_endpoint_request_can_send_now(uint16_t avddp_cid, uint8_t local_seid);
281
282/**
283 * @brief Return maximal media payload size, does not include media header.
276 * @param local_seid ID of a local stream endpoint.
277 */
278void avdtp_source_stream_endpoint_request_can_send_now(uint16_t avddp_cid, uint8_t local_seid);
279
280/**
281 * @brief Return maximal media payload size, does not include media header.
284 * @param avdtp_cid AVDTP channel identifyer.
282 * @param avdtp_cid AVDTP channel identifier.
285 * @param local_seid ID of a local stream endpoint.
286 */
287int avdtp_max_media_payload_size(uint16_t avdtp_cid, uint8_t local_seid);
288
289/**
290 * @brief Register media configuration validator. Can reject insuitable configuration or report stream endpoint as currently busy
291 * @note validator has to return AVDTP error codes like: AVDTP_ERROR_CODE_SEP_IN_USE or AVDTP_ERROR_CODE_UNSUPPORTED_CONFIGURATION
292 * the callback receives the media configuration in the same format as the existing AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION

--- 17 unchanged lines hidden ---
283 * @param local_seid ID of a local stream endpoint.
284 */
285int avdtp_max_media_payload_size(uint16_t avdtp_cid, uint8_t local_seid);
286
287/**
288 * @brief Register media configuration validator. Can reject insuitable configuration or report stream endpoint as currently busy
289 * @note validator has to return AVDTP error codes like: AVDTP_ERROR_CODE_SEP_IN_USE or AVDTP_ERROR_CODE_UNSUPPORTED_CONFIGURATION
290 * the callback receives the media configuration in the same format as the existing AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION

--- 17 unchanged lines hidden ---