RDK Documentation (Open Sourced RDK Components)
btrCore_avMedia.h
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 /*
20  * @file btrCore_avMedia.h
21  * Includes information for Audio, Video & Media functionality over BT
22  */
23 
24 #ifndef __BTR_CORE_AV_MEDIA_H__
25 #define __BTR_CORE_AV_MEDIA_H__
26 
27 #include "btrCoreTypes.h"
28 
29 /**
30  * @addtogroup BLUETOOTH_TYPES
31  * @{
32  */
33 #define BTR_AV_MEDIA_ELEMENT_MAX 64
34 
35 
36 typedef void* tBTRCoreAVMediaHdl;
37 typedef unsigned int tBTRCoreAVMediaItemId;
38 
39 typedef unsigned long long int tBTRCoreAVMediaElementId;
40 
41 typedef enum _eBTRCoreAVMType {
42  eBTRCoreAVMTypePCM,
43  eBTRCoreAVMTypeSBC,
44  eBTRCoreAVMTypeMPEG,
45  eBTRCoreAVMTypeAAC,
46  eBTRCoreAVMTypeUnknown
47 } eBTRCoreAVMType;
48 
49 typedef enum _eBTRCoreAVMAChan {
50  eBTRCoreAVMAChanMono,
51  eBTRCoreAVMAChanDualChannel,
52  eBTRCoreAVMAChanStereo,
53  eBTRCoreAVMAChanJointStereo,
54  eBTRCoreAVMAChan5_1,
55  eBTRCoreAVMAChan7_1,
56  eBTRCoreAVMAChanUnknown
57 } eBTRCoreAVMAChan;
58 
59 typedef enum _enBTRCoreAVMediaCtrl {
60  enBTRCoreAVMediaCtrlPlay,
61  enBTRCoreAVMediaCtrlPause,
62  enBTRCoreAVMediaCtrlStop,
63  enBTRCoreAVMediaCtrlNext,
64  enBTRCoreAVMediaCtrlPrevious,
65  enBTRCoreAVMediaCtrlFastForward,
66  enBTRCoreAVMediaCtrlRewind,
67  enBTRCoreAVMediaCtrlVolumeUp,
68  enBTRCoreAVMediaCtrlVolumeDown,
69  enBTRcoreAVMediaCtrlEqlzrOff,
70  enBTRcoreAVMediaCtrlEqlzrOn,
71  enBTRCoreAVMediaCtrlShflOff,
72  enBTRCoreAVMediaCtrlShflAllTracks,
73  enBTRCoreAVMediaCtrlShflGroup,
74  enBTRCoreAVMediaCtrlRptOff,
75  enBTRCoreAVMediaCtrlRptSingleTrack,
76  enBTRCoreAVMediaCtrlRptAllTracks,
77  enBTRCoreAVMediaCtrlRptGroup,
78  enBTRcoreAVMediaCtrlScanOff,
79  enBTRcoreAVMediaCtrlScanAllTracks,
80  enBTRcoreAVMediaCtrlScanGroup,
81  enBTRCoreAVMediaCtrlUnknown
82 } enBTRCoreAVMediaCtrl;
83 
84 typedef enum _eBTRCoreAVMediaStatusUpdate {
85  eBTRCoreAVMediaTrkStStarted,
86  eBTRCoreAVMediaTrkStPlaying,
87  eBTRCoreAVMediaTrkStForwardSeek,
88  eBTRCoreAVMediaTrkStReverseSeek,
89  eBTRCoreAVMediaTrkStPaused,
90  eBTRCoreAVMediaTrkStStopped,
91  eBTRCoreAVMediaTrkStChanged,
92  eBTRCoreAVMediaTrkPosition,
93  eBTRCoreAVMediaPlaybackEnded,
94  eBTRCoreAVMediaPlaybackError,
95  eBTRCoreAVMediaPlyrName,
96  eBTRCoreAVMediaPlyrEqlzrStOff,
97  eBTRCoreAVMediaPlyrEqlzrStOn,
98  eBTRCoreAVMediaPlyrShflStOff,
99  eBTRCoreAVMediaPlyrShflStAllTracks,
100  eBTRCoreAVMediaPlyrShflStGroup,
101  eBTRCoreAVMediaPlyrRptStOff,
102  eBTRCoreAVMediaPlyrRptStSingleTrack,
103  eBTRCoreAVMediaPlyrRptStAllTracks,
104  eBTRCoreAVMediaPlyrRptStGroup,
105  eBTRCoreAVMediaPlyrScanStOff,
106  eBTRCoreAVMediaPlyrScanStAllTracks,
107  eBTRCoreAVMediaPlyrScanStGroup,
108  eBTRCoreAVMediaPlyrVolume,
109  eBTRCoreAVMediaElementAdded,
110  eBTRCoreAVMediaElementRemoved,
111  eBTRCoreAVMediaStUnknown
112 } eBTRCoreAVMediaStatusUpdate;
113 
114 typedef enum _eBTRCoreAVMediaFlow {
115  eBTRCoreAVMediaFlowIn,
116  eBTRCoreAVMediaFlowOut,
117  eBTRCoreAVMediaFlowInOut,
118  eBTRCoreAVMediaFlowUnknown
119 } eBTRCoreAVMediaFlow;
120 
121 typedef enum _eBTRCoreAVMElementType {
122  eBTRCoreAVMETypeUnknown,
123  eBTRCoreAVMETypeAlbum,
124  eBTRCoreAVMETypeArtist,
125  eBTRCoreAVMETypeGenre,
126  eBTRCoreAVMETypeCompilation,
127  eBTRCoreAVMETypePlayList,
128  eBTRCoreAVMETypeTrackList,
129  eBTRCoreAVMETypeTrack
130 } eBTRCoreAVMElementType;
131 
132 typedef struct _stBTRMgrAVMediaPcmInfo {
133  eBTRCoreAVMAChan eAVMAChan;
134  unsigned int ui32AVMAChan; // num audio Channels
135  unsigned int ui32AVMSFreq;
136  unsigned int ui32AVMSFmt;
138 
139 typedef struct _stBTRCoreAVMediaSbcInfo {
140  eBTRCoreAVMAChan eAVMAChan; // channel_mode
141  unsigned int ui32AVMAChan; // num audio Channels
142  unsigned int ui32AVMSFreq; // frequency
143  unsigned char ui8AVMSbcAllocMethod; // allocation_method
144  unsigned char ui8AVMSbcSubbands; // subbands
145  unsigned char ui8AVMSbcBlockLength; // block_length
146  unsigned char ui8AVMSbcMinBitpool; // min_bitpool
147  unsigned char ui8AVMSbcMaxBitpool; // max_bitpool
148  unsigned short ui16AVMSbcFrameLen; // frameLength
149  unsigned short ui16AVMSbcBitrate; // bitrate
151 
153  eBTRCoreAVMAChan eAVMAChan; // channel_mode
154  unsigned int ui32AVMAChan; // num audio Channels
155  unsigned int ui32AVMSFreq; // frequency
156  unsigned char ui8AVMMpegCrc; // crc
157  unsigned char ui8AVMMpegVersion; // version
158  unsigned char ui8AVMMpegLayer; // layer
159  unsigned char ui8AVMMpegType; // type
160  unsigned char ui8AVMMpegMpf; // mpf
161  unsigned char ui8AVMMpegRfa; // rfa
162  unsigned short ui16AVMMpegFrameLen; // frameLength
163  unsigned short ui16AVMMpegBitrate; // bitrate
165 
166 typedef struct _stBTRCoreAVMediaInfo {
167  eBTRCoreAVMType eBtrCoreAVMType;
168  eBTRCoreAVMediaFlow eBtrCoreAVMFlow;
169  void* pstBtrCoreAVMCodecInfo;
171 
173  char pcAlbum[BTRCORE_MAX_STR_LEN];
174  char pcGenre[BTRCORE_MAX_STR_LEN];
175  char pcTitle[BTRCORE_MAX_STR_LEN];
176  char pcArtist[BTRCORE_MAX_STR_LEN];
177  unsigned int ui32TrackNumber;
178  unsigned int ui32Duration;
179  unsigned int ui32NumberOfTracks;
181 
183  unsigned int ui32Duration;
184  unsigned int ui32Position;
186 
188  eBTRCoreAVMElementType eAVMElementType;
189  tBTRCoreAVMediaElementId ui32AVMediaElementId;
190  unsigned char bIsPlayable;
191  char m_mediaElementName[BTRCORE_MAX_STR_LEN];
192  stBTRCoreAVMediaTrackInfo m_mediaTrackInfo;
194 
196  unsigned short m_numOfElements;
197  stBTRCoreAVMediaElementInfo m_mediaElementInfo[BTR_AV_MEDIA_ELEMENT_MAX];
199 
201  eBTRCoreAVMediaStatusUpdate eAVMediaState;
202  eBTRCoreAVMediaFlow eAVMediaDataFlow;
203  unsigned char bIsAVMediaCtrlAvail;
204 
205  union {
206  stBTRCoreAVMediaTrackInfo m_mediaTrackInfo;
207  stBTRCoreAVMediaPositionInfo m_mediaPositionInfo;
208  stBTRCoreAVMediaElementInfo m_mediaElementInfo;
209  char m_mediaPlayerName[BTRCORE_MAX_STR_LEN];
210  unsigned char m_mediaPlayerTransportVolume;
211  };
213 
214 
215 typedef struct _stBTRCoreAVMediaCtData {
216  unsigned char m_mediaAbsTransportVolume;
217  //TODO: When we implement a Player for Audio-Out check if you can use a common union
218  // similar to one use in stBTRCoreAVMediaStatusUpdate
219  // union {
220  // stBTRCoreAVMediaTrackInfo m_mediaTrackInfo;
221  // stBTRCoreAVMediaPositionInfo m_mediaPositionInfo;
222  // stBTRCoreAVMediaElementInfo m_mediaElementInfo;
223  // char m_mediaPlayerName[BTRCORE_MAX_STR_LEN];
224  // unsigned char m_mediaPlayerTransportVolume;
225  // };
227 
228 /* @} */ // End of group BLUETOOTH_TYPES
229 
230 
231 /* Fptr Callbacks types */
232 typedef enBTRCoreRet (*fPtr_BTRCore_AVMediaStatusUpdateCb) (stBTRCoreAVMediaStatusUpdate* pBTRCoreAVMediaStreamStatus, const char* apcAVMediaDevAddress, void* apvUserData);
233 
234 /**
235  * @addtogroup BLUETOOTH_APIS
236  * @{
237  */
238 
239 /* Interfaces */
240 /**
241  * @brief This API Initializes the media device by registering both source and sink.
242  *
243  * @param[in] phBTRCoreAVM Bluetooth core AV media handle.
244  * @param[in] apBtConn The Dbus connection handle as returned by BtrCore_BTDeInitReleaseConnection. NULL is valid for this API.
245  * @param[in] apBtAdapter Bluetooth adapter path.
246  *
247  * @return Returns the status of the operation.
248  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
249  *
250  */
251 enBTRCoreRet BTRCore_AVMedia_Init (tBTRCoreAVMediaHdl* phBTRCoreAVM, void* apBtConn, const char* apBtAdapter);
252 
253 /**
254  * @brief This API DeInitializes the media device by unregistering both source and sink.
255  *
256  * @param[in] hBTRCoreAVM Bluetooth core AV media handle.
257  * @param[in] apBtConn The Dbus connection handle as returned by BtrCore_BTDeInitReleaseConnection. NULL is valid for this API.
258  * @param[in] apBtAdapter Bluetooth adapter path.
259  *
260  * @return Returns the status of the operation.
261  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
262  *
263  */
264 enBTRCoreRet BTRCore_AVMedia_DeInit (tBTRCoreAVMediaHdl hBTRCoreAVM, void* apBtConn, const char* apBtAdapter);
265 /**
266  * @brief This API gets current media information of the media device by unregistering both source and sink.
267  *
268  * @param[in] hBTRCoreAVM Bluetooth core AV media handle.
269  * @param[in] apBtDevAddr Bluetooth device address..
270  * @param[out] apstBtrCoreAVMediaInfo A structure pointer that fetches media information.
271  *
272  * @return Returns the status of the operation.
273  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
274  *
275  */
276 enBTRCoreRet BTRCore_AVMedia_GetCurMediaInfo (tBTRCoreAVMediaHdl hBTRCoreAVM, const char* apBtDevAddr, stBTRCoreAVMediaInfo* apstBtrCoreAVMediaInfo);
277 /**
278  * @brief This API acquires the data path and MTU of a media device.
279  *
280  * @param[in] hBTRCoreAVM Bluetooth core AV media handle.
281  * @param[in] apBtDevAddr Bluetooth device address.
282  * @param[out] apDataPath Data path that has to be fetched.
283  * @param[out] apDataReadMTU Fetches MTU of data reading.
284  * @param[out] apDataWriteMTU Fetches MTU of data writing.
285  *
286  * @return Returns the status of the operation.
287  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
288  *
289  */
290 enBTRCoreRet BTRCore_AVMedia_AcquireDataPath (tBTRCoreAVMediaHdl hBTRCoreAVM, const char* apBtDevAddr, int* apDataPath, int* apDataReadMTU, int* apDataWriteMTU, unsigned int* apui32Delay);
291 /**
292  * @brief This API releases the acquired data path of the media device.
293  *
294  * @param[in] hBTRCoreAVM Bluetooth core AV media handle.
295  * @param[in] apBtDevAddr Bluetooth device address.
296  *
297  * @return Returns the status of the operation.
298  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
299  */
300 enBTRCoreRet BTRCore_AVMedia_ReleaseDataPath (tBTRCoreAVMediaHdl hBTRCoreAVM, const char* apBtDevAddr);
301 /**
302  * @brief This API is used to control the media device. BTRCore_MediaControl() invokes this API.
303  *
304  * @param[in] hBTRCoreAVM Bluetooth core AV media handle.
305  * @param[in] apBtDevAddr Bluetooth device address.
306  * @param[in] aenBTRCoreAVMediaCtrl Indicates which operation needs to be performed.
307  *
308  * @return Returns the status of the operation.
309  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
310  *
311  */
312 enBTRCoreRet BTRCore_AVMedia_MediaControl (tBTRCoreAVMediaHdl hBTRCoreAVM, const char* apBtDevAddr, enBTRCoreAVMediaCtrl aenBTRCoreAVMediaCtrl, eBTRCoreAVMediaFlow aenBTRCoreAVMediaFlow, stBTRCoreAVMediaCtData* apstBTRCoreAVMediaCtrlData);
313 /**
314  * @brief This API is used to retrieve the information about the track that is being played on the media device.
315  *
316  * @param[in] hBTRCoreAVM Bluetooth core AV media handle.
317  * @param[in] apBtDevAddr Bluetooth device address.
318  * @param[out] apstBTAVMediaTrackInfo Track information that has to be retrieved.
319  *
320  * @return Returns the status of the operation.
321  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
322  */
323 enBTRCoreRet BTRCore_AVMedia_GetTrackInfo (tBTRCoreAVMediaHdl hBTRCoreAVM, const char* apBtDevAddr, stBTRCoreAVMediaTrackInfo* apstBTAVMediaTrackInfo);
324 
325 
326 /**
327  * @brief This API is used to retrieve the information about the track that is being played on the media device.
328  *
329  * @param[in] hBTRCoreAVM Bluetooth core AV media handle.
330  * @param[in] apBtDevAddr Bluetooth device address.
331  * @param[in] aBtrAVMediaElementId target browsing locations' media element id.
332  * @param[out] apstBTAVMediaTrackInfo Track information that has to be retrieved.
333  *
334  * @return Returns the status of the operation.
335  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
336  */
337 enBTRCoreRet BTRCore_AVMedia_GetElementTrackInfo (tBTRCoreAVMediaHdl hBTRCoreAVM, const char* apBtDevAddr, tBTRCoreAVMediaElementId aBtrAVMediaElementId, stBTRCoreAVMediaTrackInfo* apstBTAVMediaTrackInfo);
338 
339 
340 /**
341  * @brief This API is used to retrieve the position information about the media device.
342  *
343  * @param[in] hBTRCoreAVM Bluetooth core AV media handle.
344  * @param[in] apBtDevAddr Bluetooth device address.
345  * @param[out] apstBTAVMediaPositionInfo Position information that has to be retrieved.
346  *
347  * @return Returns the status of the operation.
348  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
349  */
350 enBTRCoreRet BTRCore_AVMedia_GetPositionInfo (tBTRCoreAVMediaHdl hBTRCoreAVM, const char* apBtDevAddr, stBTRCoreAVMediaPositionInfo* apstBTAVMediaPositionInfo);
351 
352 /**
353  * @brief This API is used to get media property value using the device address and media property key.
354  *
355  * @param[in] hBTRCoreAVM Bluetooth core AV media handle.
356  * @param[in] apBtDevAddr Bluetooth device address.
357  * @param[in] mediaPropertyKey Property key of the Mediaplayer.
358  * @param[out] mediaPropertyValue Property keyvalue of media player.
359  *
360  * @return Returns the status of the operation.
361  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
362 */
363 enBTRCoreRet BTRCore_AVMedia_GetMediaProperty (tBTRCoreAVMediaHdl hBTRCoreAVM, const char* apBtDevAddr, const char* mediaPropertyKey, void* mediaPropertyValue);
364 
365 /**
366  * @brief This API is used to change the media browsing location in the connected AudioIn device.
367  *
368  * @param[in] hBTRCoreAVM Bluetooth core AV media handle
369  * @param[in] apBtDevAddr Bluetooth device address.
370  * @param[in] aBtrAVMediaElementId target browsing locations' media element id
371  * @param[in] aeBtrAVMElementType media element type (Albums, Artist, ...)
372  *
373  * @return Returns the status of the operation.
374  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
375 */
376 enBTRCoreRet BTRCore_AVMedia_ChangeBrowserLocation (tBTRCoreAVMediaHdl hBTRCoreAVM, const char* apBtDevAddr, tBTRCoreAVMediaElementId aBtrAVMediaElementId, eBTRCoreAVMElementType aeBtrAVMElementType);
377 
378 /**
379  * @brief This API is used to List(implicitly) the media elements in the current browsing location of the connected AudioIn device.
380  *
381  * @param[in] hBTRCoreAVM Bluetooth core AV media handle
382  * @param[in] apBtDevAddr Bluetooth device address.
383  * @param[in] aui16StartIdx Starting index of the list to retrive.
384  * @param[in] aui16EndIdx Ending index of the list to retrive.
385  *
386  * @return Returns the status of the operation.
387  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
388 */
389 enBTRCoreRet BTRCore_AVMedia_SelectMediaBrowserElements (tBTRCoreAVMediaHdl hBTRCoreAVM, const char* apBtDevAddr, unsigned short aui16StartIdx, unsigned short aui16EndIdx);
390 
391 /**
392  * @brief This API is used to fetch the media item list.
393  *
394  * @param[in] hBTRCoreAVM Bluetooth core AV media handle
395  * @param[in] apBtDevAddr Bluetooth device address.
396  * @param[in] aBtrAVMediaElementId target browsing locations' media element id
397  * @param[in] aui16StartIdx Starting index of the list to retrive.
398  * @param[in] aui16EndIdx Ending index of the list to retrive.
399  * @param[in] aeBtrAVMElementType media element type (Albums, Artist, ...)
400  * @param[out] aAVMediaElementInfoList Fetched media element list
401  *
402  * @return Returns the status of the operation.
403  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
404 */
405 enBTRCoreRet BTRCore_AVMedia_GetMediaElementList (tBTRCoreAVMediaHdl hBTRCoreAVM, const char* apBtDevAddr, tBTRCoreAVMediaElementId aBtrAVMediaElementId, unsigned short aui16StartIdx, unsigned short aui16EndIdx, eBTRCoreAVMElementType aeBtrAVMElementType, stBTRCoreAVMediaElementInfoList* aAVMediaElementInfoList);
406 
407 /**
408  * @brief This API starts playing the mentioned media item.
409  *
410  * @param[in] hBTRCoreAVM Bluetooth core AV media handle
411  * @param[in] apBtDevAddr Bluetooth device address.
412  * @param[in] aBtrAVMediaElementId target browsing locations' media element id
413  *
414  * @return Returns the status of the operation.
415  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
416 */
417 enBTRCoreRet BTRCore_AVMedia_PlayTrack (tBTRCoreAVMediaHdl hBTRCoreAVM, const char* apBtDevAddr, tBTRCoreAVMediaElementId aBtrAVMediaElementId);
418 
419 /**
420  * @brief This API select track the mentioned media item.
421  *
422  * @param[in] hBTRCoreAVM Bluetooth core AV media handle
423  * @param[in] apBtDevAddr Bluetooth device address.
424  * @param[in] aBtrAVMediaElementId target browsing locations' media element id
425  *
426  * @return Returns the status of the operation.
427  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
428 */
429 enBTRCoreRet BTRCore_AVMedia_SelectTrack (tBTRCoreAVMediaHdl hBTRCoreAVM, const char* apBtDevAddr, tBTRCoreAVMediaElementId aBtrAVMediaElementId);
430 
431 /**
432  * @brief This API is used to find if a MediaElement is Playable or Non-Playable
433  *
434  * @param[in] hBTRCoreAVM Bluetooth core AV media handle
435  * @param[in] apBtDevAddr Bluetooth device address.
436  * @param[in] aBtrAVMediaElementId target browsing locations' media element id
437  * @Param[out] isPlayable Playable/Non-Playable state
438  *
439  * @return Returns the status of the operation.
440  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
441  */
442 enBTRCoreRet BTRCore_AVMedia_IsMediaElementPlayable (tBTRCoreAVMediaHdl hBTRCoreAVM, const char* apBtDevAddr, tBTRCoreAVMediaElementId aBtrAVMediaElementId, char* isPlayable);
443 
444 // Outgoing callbacks Registration Interfaces
445 /** Callback to notify the BT Core about Mediaplayer path and its Userdata */
446 enBTRCoreRet BTRCore_AVMedia_RegisterMediaStatusUpdateCb (tBTRCoreAVMediaHdl hBTRCoreAVM, fPtr_BTRCore_AVMediaStatusUpdateCb afpcBBTRCoreAVMediaStatusUpdate, void* apcBMediaStatusUserData);
447 
448 /* @} */ //BLUETOOTH_APIS
449 
450 
451 #endif // __BTR_CORE_AV_MEDIA_H__
_stBTRMgrAVMediaPcmInfo
Definition: btrCore_avMedia.h:132
BTRCore_AVMedia_IsMediaElementPlayable
enBTRCoreRet BTRCore_AVMedia_IsMediaElementPlayable(tBTRCoreAVMediaHdl hBTRCoreAVM, const char *apBtDevAddr, tBTRCoreAVMediaElementId aBtrAVMediaElementId, char *isPlayable)
This API is used to find if a MediaElement is Playable or Non-Playable.
Definition: btrCore_avMedia.c:2330
_stBTRCoreAVMediaElementInfoList
Definition: btrCore_avMedia.h:195
BTRCore_AVMedia_GetMediaElementList
enBTRCoreRet BTRCore_AVMedia_GetMediaElementList(tBTRCoreAVMediaHdl hBTRCoreAVM, const char *apBtDevAddr, tBTRCoreAVMediaElementId aBtrAVMediaElementId, unsigned short aui16StartIdx, unsigned short aui16EndIdx, eBTRCoreAVMElementType aeBtrAVMElementType, stBTRCoreAVMediaElementInfoList *aAVMediaElementInfoList)
This API is used to fetch the media item list.
Definition: btrCore_avMedia.c:2121
BTRCore_AVMedia_GetElementTrackInfo
enBTRCoreRet BTRCore_AVMedia_GetElementTrackInfo(tBTRCoreAVMediaHdl hBTRCoreAVM, const char *apBtDevAddr, tBTRCoreAVMediaElementId aBtrAVMediaElementId, stBTRCoreAVMediaTrackInfo *apstBTAVMediaTrackInfo)
This API is used to retrieve the information about the track that is being played on the media device...
Definition: btrCore_avMedia.c:1797
BTRCore_AVMedia_GetTrackInfo
enBTRCoreRet BTRCore_AVMedia_GetTrackInfo(tBTRCoreAVMediaHdl hBTRCoreAVM, const char *apBtDevAddr, stBTRCoreAVMediaTrackInfo *apstBTAVMediaTrackInfo)
This API is used to retrieve the information about the track that is being played on the media device...
Definition: btrCore_avMedia.c:1763
BTRCore_AVMedia_ChangeBrowserLocation
enBTRCoreRet BTRCore_AVMedia_ChangeBrowserLocation(tBTRCoreAVMediaHdl hBTRCoreAVM, const char *apBtDevAddr, tBTRCoreAVMediaElementId aBtrAVMediaElementId, eBTRCoreAVMElementType aeBtrAVMElementType)
This API is used to change the media browsing location in the connected AudioIn device.
Definition: btrCore_avMedia.c:1931
BTRCore_AVMedia_DeInit
enBTRCoreRet BTRCore_AVMedia_DeInit(tBTRCoreAVMediaHdl hBTRCoreAVM, void *apBtConn, const char *apBtAdapter)
This API DeInitializes the media device by unregistering both source and sink.
Definition: btrCore_avMedia.c:1097
BTRCore_AVMedia_Init
enBTRCoreRet BTRCore_AVMedia_Init(tBTRCoreAVMediaHdl *phBTRCoreAVM, void *apBtConn, const char *apBtAdapter)
This API Initializes the media device by registering both source and sink.
Definition: btrCore_avMedia.c:912
BTRCore_AVMedia_GetPositionInfo
enBTRCoreRet BTRCore_AVMedia_GetPositionInfo(tBTRCoreAVMediaHdl hBTRCoreAVM, const char *apBtDevAddr, stBTRCoreAVMediaPositionInfo *apstBTAVMediaPositionInfo)
This API is used to retrieve the position information about the media device.
Definition: btrCore_avMedia.c:1846
_stBTRCoreAVMediaCtData
Definition: btrCore_avMedia.h:215
BTRCore_AVMedia_GetCurMediaInfo
enBTRCoreRet BTRCore_AVMedia_GetCurMediaInfo(tBTRCoreAVMediaHdl hBTRCoreAVM, const char *apBtDevAddr, stBTRCoreAVMediaInfo *apstBtrCoreAVMediaInfo)
This API gets current media information of the media device by unregistering both source and sink.
Definition: btrCore_avMedia.c:1214
_stBTRCoreAVMediaPositionInfo
Definition: btrCore_avMedia.h:182
BTRCore_AVMedia_ReleaseDataPath
enBTRCoreRet BTRCore_AVMedia_ReleaseDataPath(tBTRCoreAVMediaHdl hBTRCoreAVM, const char *apBtDevAddr)
This API releases the acquired data path of the media device.
Definition: btrCore_avMedia.c:1592
BTRCore_AVMedia_PlayTrack
enBTRCoreRet BTRCore_AVMedia_PlayTrack(tBTRCoreAVMediaHdl hBTRCoreAVM, const char *apBtDevAddr, tBTRCoreAVMediaElementId aBtrAVMediaElementId)
This API starts playing the mentioned media item.
Definition: btrCore_avMedia.c:2212
_stBTRCoreAVMediaMpegInfo
Definition: btrCore_avMedia.h:152
_stBTRCoreAVMediaSbcInfo
Definition: btrCore_avMedia.h:139
_stBTRCoreAVMediaInfo
Definition: btrCore_avMedia.h:166
_stBTRCoreAVMediaElementInfo
Definition: btrCore_avMedia.h:187
_stBTRCoreAVMediaTrackInfo
Definition: btrCore_avMedia.h:172
_stBTRCoreAVMediaStatusUpdate
Definition: btrCore_avMedia.h:200
BTRCore_AVMedia_GetMediaProperty
enBTRCoreRet BTRCore_AVMedia_GetMediaProperty(tBTRCoreAVMediaHdl hBTRCoreAVM, const char *apBtDevAddr, const char *mediaPropertyKey, void *mediaPropertyValue)
This API is used to get media property value using the device address and media property key.
Definition: btrCore_avMedia.c:1895
BTRCore_AVMedia_SelectTrack
enBTRCoreRet BTRCore_AVMedia_SelectTrack(tBTRCoreAVMediaHdl hBTRCoreAVM, const char *apBtDevAddr, tBTRCoreAVMediaElementId aBtrAVMediaElementId)
This API select track the mentioned media item.
Definition: btrCore_avMedia.c:2267
BTRCore_AVMedia_SelectMediaBrowserElements
enBTRCoreRet BTRCore_AVMedia_SelectMediaBrowserElements(tBTRCoreAVMediaHdl hBTRCoreAVM, const char *apBtDevAddr, unsigned short aui16StartIdx, unsigned short aui16EndIdx)
This API is used to List(implicitly) the media elements in the current browsing location of the conne...
Definition: btrCore_avMedia.c:2052
BTRCore_AVMedia_MediaControl
enBTRCoreRet BTRCore_AVMedia_MediaControl(tBTRCoreAVMediaHdl hBTRCoreAVM, const char *apBtDevAddr, enBTRCoreAVMediaCtrl aenBTRCoreAVMediaCtrl, eBTRCoreAVMediaFlow aenBTRCoreAVMediaFlow, stBTRCoreAVMediaCtData *apstBTRCoreAVMediaCtrlData)
This API is used to control the media device. BTRCore_MediaControl() invokes this API.
Definition: btrCore_avMedia.c:1629
BTRCore_AVMedia_RegisterMediaStatusUpdateCb
enBTRCoreRet BTRCore_AVMedia_RegisterMediaStatusUpdateCb(tBTRCoreAVMediaHdl hBTRCoreAVM, fPtr_BTRCore_AVMediaStatusUpdateCb afpcBBTRCoreAVMediaStatusUpdate, void *apcBMediaStatusUserData)
Definition: btrCore_avMedia.c:2388
BTRCore_AVMedia_AcquireDataPath
enBTRCoreRet BTRCore_AVMedia_AcquireDataPath(tBTRCoreAVMediaHdl hBTRCoreAVM, const char *apBtDevAddr, int *apDataPath, int *apDataReadMTU, int *apDataWriteMTU, unsigned int *apui32Delay)
This API acquires the data path and MTU of a media device.
Definition: btrCore_avMedia.c:1538