avdtp_util.h (335dba6a8f1618f200debbc47e346d04b1c4b468) avdtp_util.h (24d5fe847f80d6f46ff13a477a6de59ffa59664f)
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

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

52
53#define AVDTP_MAX_MEDIA_CODEC_INFORMATION_LENGTH 30
54
55 // assume AVDTP_MEDIA_CONFIG_OTHER_EVENT_LEN greater or equal to all others
56#define AVDTP_MEDIA_CONFIG_SBC_EVENT_LEN 18
57#define AVDTP_MEDIA_CONFIG_MPEG_AUDIO_EVENT_LEN 18
58#define AVDTP_MEDIA_CONFIG_MPEG_AAC_EVENT_LEN 18
59#define AVDTP_MEDIA_CONFIG_ATRAC_EVENT_LEN 18
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

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

52
53#define AVDTP_MAX_MEDIA_CODEC_INFORMATION_LENGTH 30
54
55 // assume AVDTP_MEDIA_CONFIG_OTHER_EVENT_LEN greater or equal to all others
56#define AVDTP_MEDIA_CONFIG_SBC_EVENT_LEN 18
57#define AVDTP_MEDIA_CONFIG_MPEG_AUDIO_EVENT_LEN 18
58#define AVDTP_MEDIA_CONFIG_MPEG_AAC_EVENT_LEN 18
59#define AVDTP_MEDIA_CONFIG_ATRAC_EVENT_LEN 18
60#define AVDTP_MEDIA_CONFIG_MPEG_D_USAC_EVENT_LEN 18
61
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_message_type(uint8_t * packet);
67

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

128void avdtp_config_sbc_set_sampling_frequency(uint8_t * config, uint16_t sampling_frequency_hz);
129void avdtp_config_sbc_store(uint8_t * config, const avdtp_configuration_sbc_t * configuration);
130void avdtp_config_mpeg_audio_set_sampling_frequency(uint8_t * config, uint16_t sampling_frequency_hz);
131void avdtp_config_mpeg_audio_store(uint8_t * config, const avdtp_configuration_mpeg_audio_t * configuration);
132void avdtp_config_mpeg_aac_set_sampling_frequency(uint8_t * config, uint16_t sampling_frequency_hz);
133void avdtp_config_mpeg_aac_store(uint8_t * config, const avdtp_configuration_mpeg_aac_t * configuration);
134void avdtp_config_atrac_set_sampling_frequency(uint8_t * config, uint16_t sampling_frequency_hz);
135void avdtp_config_atrac_store(uint8_t * config, const avdtp_configuration_atrac_t * configuration);
62#define AVDTP_MEDIA_CONFIG_OTHER_EVENT_LEN (13 + AVDTP_MAX_MEDIA_CODEC_INFORMATION_LENGTH)
63
64static inline uint8_t avdtp_header(uint8_t tr_label, avdtp_packet_type_t packet_type, avdtp_message_type_t msg_type){
65 return (tr_label<<4) | ((uint8_t)packet_type<<2) | (uint8_t)msg_type;
66}
67
68avdtp_message_type_t avdtp_get_signaling_message_type(uint8_t * packet);
69

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

130void avdtp_config_sbc_set_sampling_frequency(uint8_t * config, uint16_t sampling_frequency_hz);
131void avdtp_config_sbc_store(uint8_t * config, const avdtp_configuration_sbc_t * configuration);
132void avdtp_config_mpeg_audio_set_sampling_frequency(uint8_t * config, uint16_t sampling_frequency_hz);
133void avdtp_config_mpeg_audio_store(uint8_t * config, const avdtp_configuration_mpeg_audio_t * configuration);
134void avdtp_config_mpeg_aac_set_sampling_frequency(uint8_t * config, uint16_t sampling_frequency_hz);
135void avdtp_config_mpeg_aac_store(uint8_t * config, const avdtp_configuration_mpeg_aac_t * configuration);
136void avdtp_config_atrac_set_sampling_frequency(uint8_t * config, uint16_t sampling_frequency_hz);
137void avdtp_config_atrac_store(uint8_t * config, const avdtp_configuration_atrac_t * configuration);
138void avdtp_config_mpegd_usac_set_sampling_frequency(uint8_t * config, uint16_t sampling_frequency_hz);
139void avdtp_config_mpegd_usac_store(uint8_t * config, const avdtp_configuration_mpegd_usac_t * configuration);
136
137#if defined __cplusplus
138}
139#endif
140
141#endif // AVDTP_UITL_H
140
141#if defined __cplusplus
142}
143#endif
144
145#endif // AVDTP_UITL_H