avdtp_util.h (93aeaf99fa2ec7afcbe1000b5d6d8a545b8d016d) | avdtp_util.h (335dba6a8f1618f200debbc47e346d04b1c4b468) |
---|---|
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 --- 49 unchanged lines hidden (view full) --- 58#define AVDTP_MEDIA_CONFIG_MPEG_AAC_EVENT_LEN 18 59#define AVDTP_MEDIA_CONFIG_ATRAC_EVENT_LEN 18 60#define AVDTP_MEDIA_CONFIG_OTHER_EVENT_LEN (13 + AVDTP_MAX_MEDIA_CODEC_INFORMATION_LENGTH) 61 62static inline uint8_t avdtp_header(uint8_t tr_label, avdtp_packet_type_t packet_type, avdtp_message_type_t msg_type){ 63 return (tr_label<<4) | ((uint8_t)packet_type<<2) | (uint8_t)msg_type; 64} 65 | 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 --- 49 unchanged lines hidden (view full) --- 58#define AVDTP_MEDIA_CONFIG_MPEG_AAC_EVENT_LEN 18 59#define AVDTP_MEDIA_CONFIG_ATRAC_EVENT_LEN 18 60#define AVDTP_MEDIA_CONFIG_OTHER_EVENT_LEN (13 + AVDTP_MAX_MEDIA_CODEC_INFORMATION_LENGTH) 61 62static inline uint8_t avdtp_header(uint8_t tr_label, avdtp_packet_type_t packet_type, avdtp_message_type_t msg_type){ 63 return (tr_label<<4) | ((uint8_t)packet_type<<2) | (uint8_t)msg_type; 64} 65 |
66avdtp_message_type_t avdtp_get_signaling_packet_type(uint8_t * packet); | 66avdtp_message_type_t avdtp_get_signaling_message_type(uint8_t * packet); |
67 68int avdtp_read_signaling_header(avdtp_signaling_packet_t * signaling_header, uint8_t * packet, uint16_t size); 69 70uint16_t store_bit16(uint16_t bitmap, int position, uint8_t value); 71int get_bit16(uint16_t bitmap, int position); 72 73int avdtp_pack_service_capabilities(uint8_t * buffer, int size, avdtp_capabilities_t caps, avdtp_service_category_t category); 74uint16_t avdtp_unpack_service_capabilities(avdtp_connection_t * connection, avdtp_signal_identifier_t signal_identifier, avdtp_capabilities_t * caps, uint8_t * packet, uint16_t size); --- 67 unchanged lines hidden --- | 67 68int avdtp_read_signaling_header(avdtp_signaling_packet_t * signaling_header, uint8_t * packet, uint16_t size); 69 70uint16_t store_bit16(uint16_t bitmap, int position, uint8_t value); 71int get_bit16(uint16_t bitmap, int position); 72 73int avdtp_pack_service_capabilities(uint8_t * buffer, int size, avdtp_capabilities_t caps, avdtp_service_category_t category); 74uint16_t avdtp_unpack_service_capabilities(avdtp_connection_t * connection, avdtp_signal_identifier_t signal_identifier, avdtp_capabilities_t * caps, uint8_t * packet, uint16_t size); --- 67 unchanged lines hidden --- |