24 #ifndef __BTR_CORE_AV_MEDIA_H__
25 #define __BTR_CORE_AV_MEDIA_H__
27 #include "btrCoreTypes.h"
33 #define BTR_AV_MEDIA_ELEMENT_MAX 64
36 typedef void* tBTRCoreAVMediaHdl;
37 typedef unsigned int tBTRCoreAVMediaItemId;
39 typedef unsigned long long int tBTRCoreAVMediaElementId;
41 typedef enum _eBTRCoreAVMType {
46 eBTRCoreAVMTypeUnknown
49 typedef enum _eBTRCoreAVMAChan {
51 eBTRCoreAVMAChanDualChannel,
52 eBTRCoreAVMAChanStereo,
53 eBTRCoreAVMAChanJointStereo,
56 eBTRCoreAVMAChanUnknown
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;
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;
114 typedef enum _eBTRCoreAVMediaFlow {
115 eBTRCoreAVMediaFlowIn,
116 eBTRCoreAVMediaFlowOut,
117 eBTRCoreAVMediaFlowInOut,
118 eBTRCoreAVMediaFlowUnknown
119 } eBTRCoreAVMediaFlow;
121 typedef enum _eBTRCoreAVMElementType {
122 eBTRCoreAVMETypeUnknown,
123 eBTRCoreAVMETypeAlbum,
124 eBTRCoreAVMETypeArtist,
125 eBTRCoreAVMETypeGenre,
126 eBTRCoreAVMETypeCompilation,
127 eBTRCoreAVMETypePlayList,
128 eBTRCoreAVMETypeTrackList,
129 eBTRCoreAVMETypeTrack
130 } eBTRCoreAVMElementType;
133 eBTRCoreAVMAChan eAVMAChan;
134 unsigned int ui32AVMAChan;
135 unsigned int ui32AVMSFreq;
136 unsigned int ui32AVMSFmt;
140 eBTRCoreAVMAChan eAVMAChan;
141 unsigned int ui32AVMAChan;
142 unsigned int ui32AVMSFreq;
143 unsigned char ui8AVMSbcAllocMethod;
144 unsigned char ui8AVMSbcSubbands;
145 unsigned char ui8AVMSbcBlockLength;
146 unsigned char ui8AVMSbcMinBitpool;
147 unsigned char ui8AVMSbcMaxBitpool;
148 unsigned short ui16AVMSbcFrameLen;
149 unsigned short ui16AVMSbcBitrate;
153 eBTRCoreAVMAChan eAVMAChan;
154 unsigned int ui32AVMAChan;
155 unsigned int ui32AVMSFreq;
156 unsigned char ui8AVMMpegCrc;
157 unsigned char ui8AVMMpegVersion;
158 unsigned char ui8AVMMpegLayer;
159 unsigned char ui8AVMMpegType;
160 unsigned char ui8AVMMpegMpf;
161 unsigned char ui8AVMMpegRfa;
162 unsigned short ui16AVMMpegFrameLen;
163 unsigned short ui16AVMMpegBitrate;
167 eBTRCoreAVMType eBtrCoreAVMType;
168 eBTRCoreAVMediaFlow eBtrCoreAVMFlow;
169 void* pstBtrCoreAVMCodecInfo;
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;
183 unsigned int ui32Duration;
184 unsigned int ui32Position;
188 eBTRCoreAVMElementType eAVMElementType;
189 tBTRCoreAVMediaElementId ui32AVMediaElementId;
190 unsigned char bIsPlayable;
191 char m_mediaElementName[BTRCORE_MAX_STR_LEN];
196 unsigned short m_numOfElements;
201 eBTRCoreAVMediaStatusUpdate eAVMediaState;
202 eBTRCoreAVMediaFlow eAVMediaDataFlow;
203 unsigned char bIsAVMediaCtrlAvail;
209 char m_mediaPlayerName[BTRCORE_MAX_STR_LEN];
210 unsigned char m_mediaPlayerTransportVolume;
216 unsigned char m_mediaAbsTransportVolume;
232 typedef enBTRCoreRet (*fPtr_BTRCore_AVMediaStatusUpdateCb) (
stBTRCoreAVMediaStatusUpdate* pBTRCoreAVMediaStreamStatus,
const char* apcAVMediaDevAddress,
void* apvUserData);
251 enBTRCoreRet
BTRCore_AVMedia_Init (tBTRCoreAVMediaHdl* phBTRCoreAVM,
void* apBtConn,
const char* apBtAdapter);
264 enBTRCoreRet
BTRCore_AVMedia_DeInit (tBTRCoreAVMediaHdl hBTRCoreAVM,
void* apBtConn,
const char* apBtAdapter);
290 enBTRCoreRet
BTRCore_AVMedia_AcquireDataPath (tBTRCoreAVMediaHdl hBTRCoreAVM,
const char* apBtDevAddr,
int* apDataPath,
int* apDataReadMTU,
int* apDataWriteMTU,
unsigned int* apui32Delay);
363 enBTRCoreRet
BTRCore_AVMedia_GetMediaProperty (tBTRCoreAVMediaHdl hBTRCoreAVM,
const char* apBtDevAddr,
const char* mediaPropertyKey,
void* mediaPropertyValue);
376 enBTRCoreRet
BTRCore_AVMedia_ChangeBrowserLocation (tBTRCoreAVMediaHdl hBTRCoreAVM,
const char* apBtDevAddr, tBTRCoreAVMediaElementId aBtrAVMediaElementId, eBTRCoreAVMElementType aeBtrAVMElementType);
417 enBTRCoreRet
BTRCore_AVMedia_PlayTrack (tBTRCoreAVMediaHdl hBTRCoreAVM,
const char* apBtDevAddr, tBTRCoreAVMediaElementId aBtrAVMediaElementId);
429 enBTRCoreRet
BTRCore_AVMedia_SelectTrack (tBTRCoreAVMediaHdl hBTRCoreAVM,
const char* apBtDevAddr, tBTRCoreAVMediaElementId aBtrAVMediaElementId);
451 #endif // __BTR_CORE_AV_MEDIA_H__