Select one of the symbols to view example projects that use it.
 
Outline
#define __BTC_A2DP_SOURCE_H__
#include <stdbool.h>
#include "common/bt_target.h"
#include "bta/bta_api.h"
#include "btc_av_api.h"
#include "esp_a2dp_api.h"
Files
loading...
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/bt/host/bluedroid/btc/profile/std/include/btc_a2dp_source.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */ /******************************************************************************* * * Filename: btc_a2dp_source.h * *******************************************************************************//* ... */ #ifndef __BTC_A2DP_SOURCE_H__ #define __BTC_A2DP_SOURCE_H__ #include <stdbool.h> #include "common/bt_target.h" #include "bta/bta_api.h" #include "btc_av_api.h" #include "esp_a2dp_api.h"5 includes #if BTC_AV_SRC_INCLUDED /******************************************************************************* ** Data types *******************************************************************************//* ... */ /* tBTC_MEDIA_INIT_AUDIO msg structure */ typedef struct { BT_HDR hdr; UINT16 SamplingFreq; /* 16k, 32k, 44.1k or 48k*/ UINT8 ChannelMode; /* mono, dual, stereo or joint stereo*/ UINT8 NumOfSubBands; /* 4 or 8 */ UINT8 NumOfBlocks; /* 4, 8, 12 or 16*/ UINT8 AllocationMethod; /* loudness or SNR*/ UINT16 MtuSize; /* peer mtu size */ }{...} tBTC_MEDIA_INIT_AUDIO; /* tBTC_MEDIA_UPDATE_AUDIO msg structure */ typedef struct { BT_HDR hdr; UINT16 MinMtuSize; /* Minimum peer mtu size */ UINT8 MaxBitPool; /* Maximum peer bitpool */ UINT8 MinBitPool; /* Minimum peer bitpool */ }{...} tBTC_MEDIA_UPDATE_AUDIO; /* tBTC_MEDIA_INIT_AUDIO_FEEDING msg structure */ typedef struct { BT_HDR hdr; tBTC_AV_FEEDING_MODE feeding_mode; tBTC_AV_MEDIA_FEEDINGS feeding; }{...} tBTC_MEDIA_INIT_AUDIO_FEEDING; /******************************************************************************* ** Public functions *******************************************************************************//* ... */ /******************************************************************************* ** ** Function btc_a2dp_source_startup ** ** Description Initialize and startup the A2DP source module. This function ** should be called by the BTC AV state machine prior to using ** the module ** ** Returns TRUE is success ** *******************************************************************************//* ... */ bool btc_a2dp_source_startup(void); /******************************************************************************* ** ** Function btc_a2dp_source_shutdown ** ** Description Shutdown and cleanup the A2DP source module. ** *******************************************************************************//* ... */ void btc_a2dp_source_shutdown(void); /******************************************************************************* ** ** Function btc_a2dp_source_enc_init_req ** ** Description Request to initialize the media task encoder ** ** Returns TRUE is success ** *******************************************************************************//* ... */ BOOLEAN btc_a2dp_source_enc_init_req(tBTC_MEDIA_INIT_AUDIO *p_msg); /******************************************************************************* ** ** Function btc_a2dp_source_enc_udpate_req ** ** Description Request to update the media task encoder ** ** Returns TRUE is success ** *******************************************************************************//* ... */ BOOLEAN btc_a2dp_source_enc_update_req(tBTC_MEDIA_UPDATE_AUDIO *p_msg); /******************************************************************************* ** ** Function btc_a2dp_source_start_audio_req ** ** Description Request to start audio encoding task ** ** Returns TRUE is success ** *******************************************************************************//* ... */ BOOLEAN btc_a2dp_source_start_audio_req(void); /******************************************************************************* ** ** Function btc_a2dp_source_stop_audio_req ** ** Description Request to stop audio encoding task ** ** Returns TRUE is success ** *******************************************************************************//* ... */ BOOLEAN btc_a2dp_source_stop_audio_req(void); /******************************************************************************* ** ** Function btc_a2dp_source_tx_flush_req ** ** Description Request to flush audio encoding pipe ** ** Returns TRUE is success ** *******************************************************************************//* ... */ BOOLEAN btc_a2dp_source_tx_flush_req(void); /******************************************************************************* ** ** Function btc_a2dp_source_audio_readbuf ** ** Description Read an audio buffer from the BTC media TX queue ** ** Returns pointer on a aa buffer ready to send ** *******************************************************************************//* ... */ BT_HDR *btc_a2dp_source_audio_readbuf(void); /******************************************************************************* ** ** Function btc_a2dp_source_audio_feeding_init_req ** ** Description Request to initialize audio feeding ** ** Returns TRUE if success ** *******************************************************************************//* ... */ BOOLEAN btc_a2dp_source_audio_feeding_init_req(tBTC_MEDIA_INIT_AUDIO_FEEDING *p_msg); /******************************************************************************* ** ** Function btc_a2dp_source_is_streaming ** ** Description Check whether A2DP source is in streaming state ** *******************************************************************************//* ... */ bool btc_a2dp_source_is_streaming(void); /******************************************************************************* ** ** Function btc_a2dp_source_is_task_shutting_down ** ** Description Check whether A2DP source media task is shutting down ** *******************************************************************************//* ... */ bool btc_a2dp_source_is_task_shutting_down(void); /******************************************************************************* ** ** Function btc_a2dp_source_on_idle ** ** Description Request 'idle' request from BTC AV state machine during ** initialization ** *******************************************************************************//* ... */ void btc_a2dp_source_on_idle(void); /******************************************************************************* ** ** Function btc_a2dp_source_on_stopped ** ** Description Process 'stop' request from the BTC AV state machine to stop ** A2DP streaming ** *******************************************************************************//* ... */ void btc_a2dp_source_on_stopped(tBTA_AV_SUSPEND *p_av); /******************************************************************************* ** ** Function btc_a2dp_source_on_suspended ** ** Description Process 'suspend' request from the BTC AV state machine to stop ** A2DP streaming ** *******************************************************************************//* ... */ void btc_a2dp_source_on_suspended(tBTA_AV_SUSPEND *p_av); /******************************************************************************* ** ** Function btc_a2dp_source_setup_codec ** ** Description initialize the encoder parameters ** *******************************************************************************//* ... */ void btc_a2dp_source_setup_codec(void); /******************************************************************************* ** ** Function btc_a2dp_source_set_tx_flush ** ** Description enable/disable discarding of transmitted frames ** *******************************************************************************//* ... */ void btc_a2dp_source_set_tx_flush(BOOLEAN enable); /******************************************************************************* ** ** Function btc_a2dp_source_encoder_update ** ** Description update changed SBC encoder parameters ** *******************************************************************************//* ... */ void btc_a2dp_source_encoder_update(void); /***************************************************************************** ** ** Function btc_source_report_delay_value ** ** Description Report sink delay report value ** *******************************************************************************//* ... */ void btc_source_report_delay_value(UINT16 delay_value); /* ... */ #endif /* #if BTC_AV_SRC_INCLUDED */ /* ... */ #endif /* __BTC_A2DP_SOURCE_H__ */
Details
Show:
from
Types: Columns:
This file uses the notable symbols shown below. Click anywhere in the file to view more details.