RDK Documentation (Open Sourced RDK Components)
btrMgr_mediaTypes.h
Go to the documentation of this file.
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 btrMgr_mediaTypes.h
21  *
22  * @defgroup Media_types Media Types
23  * This file defines bluetooth manager's mediatypes for internal use.
24  * @ingroup BTR_MGR
25  *
26  */
27 
28 #ifndef __BTR_MGR_MEDIA_TYPES_H__
29 #define __BTR_MGR_MEDIA_TYPES_H__
30 
31 /**
32  * @addtogroup Media_types
33  * @{
34  *
35  */
36 
37 /**
38  * @brief Represents the status of media player.
39  */
40 typedef enum _eBTRMgrState {
41  eBTRMgrStateInitialized,
42  eBTRMgrStateDeInitialized,
43  eBTRMgrStatePaused,
44  eBTRMgrStatePlaying,
45  eBTRMgrStateCompleted,
46  eBTRMgrStateStopped,
47  eBTRMgrStateWarning,
48  eBTRMgrStateError,
49  eBTRMgrStateUnknown
50 } eBTRMgrState;
51 
52 /**
53  * @brief Represents the audio codec types.
54  */
55 typedef enum _eBTRMgrAType {
56  eBTRMgrATypePCM,
57  eBTRMgrATypeSBC,
58  eBTRMgrATypeMPEG,
59  eBTRMgrATypeAAC,
60  eBTRMgrATypeUnknown
61 } eBTRMgrAType;
62 
63 
64 /**
65  * @brief Represents the frequency supported.
66  */
67 typedef enum _eBTRMgrSFreq {
68  eBTRMgrSFreq8K,
69  eBTRMgrSFreq16K,
70  eBTRMgrSFreq32K,
71  eBTRMgrSFreq44_1K,
72  eBTRMgrSFreq48K,
73  eBTRMgrSFreqUnknown
74 } eBTRMgrSFreq;
75 
76 /**
77  * @brief Represents the PCM bits supported.
78  */
79 typedef enum _eBTRMgrSFmt {
80  eBTRMgrSFmt8bit,
81  eBTRMgrSFmt16bit,
82  eBTRMgrSFmt24bit,
83  eBTRMgrSFmt32bit,
84  eBTRMgrSFmtUnknown
85 } eBTRMgrSFmt;
86 
87 /**
88  * @brief Represents the Audio channel supported.
89  */
90 typedef enum _eBTRMgrAChan {
91  eBTRMgrAChanMono,
92  eBTRMgrAChanDualChannel,
93  eBTRMgrAChanStereo,
94  eBTRMgrAChanJStereo,
95  eBTRMgrAChan5_1,
96  eBTRMgrAChan7_1,
97  eBTRMgrAChanUnknown
98 } eBTRMgrAChan;
99 
100 /**
101  * @brief Represents the PCM codec details.
102  */
103 typedef struct _stBTRMgrPCMInfo {
104  eBTRMgrSFreq eBtrMgrSFreq;
105  eBTRMgrSFmt eBtrMgrSFmt;
106  eBTRMgrAChan eBtrMgrAChan;
108 
109 /**
110  * @brief Represents the Subband coding (SBC) audio codec information.
111  *
112  * This technique is used to connect headphones via wireless Bluetooth links.
113  */
114 typedef struct _stBTRMgrSBCInfo {
116  eBTRMgrAChan eBtrMgrSbcAChan; //!< channel_mode
117  unsigned char ui8SbcAllocMethod; //!< allocation_method
118  unsigned char ui8SbcSubbands; //!< subbands
119  unsigned char ui8SbcBlockLength; //!< block_length
120  unsigned char ui8SbcMinBitpool; //!< min_bitpool
121  unsigned char ui8SbcMaxBitpool; //!< max_bitpool
122  unsigned short ui16SbcFrameLen; //!< frameLength
123  unsigned short ui16SbcBitrate; //!< bitrate
125 
126 /**
127  * @brief Represents the MPEG codec details.
128  */
129 typedef struct _stBTRMgrMPEGInfo {
131  eBTRMgrAChan eBtrMgrMpegAChan; //!< channel_mode
132  unsigned char ui8MpegCrc; //!< crc
133  unsigned char ui8MpegLayer; //!< layer
134  unsigned char ui8MpegMpf; //!< mpf
135  unsigned char ui8MpegRfa; //!< rfa
136  unsigned short ui16MpegBitrate; //!< bitrate
138 
139 /**
140  * @brief Represents the audio input settings.
141  */
142 typedef struct _stBTRMgrInASettings {
143  eBTRMgrAType eBtrMgrInAType;
144  void* pstBtrMgrInCodecInfo;
145  int i32BtrMgrInBufMaxSize;
146  int i32BtrMgrDevFd;
147  int i32BtrMgrDevMtu;
149 
150 /**
151  * @brief Represents the audio output settings.
152  */
153 typedef struct _stBTRMgrOutASettings {
154  eBTRMgrAType eBtrMgrOutAType;
155  void* pstBtrMgrOutCodecInfo;
156  int i32BtrMgrOutBufMaxSize;
157  int i32BtrMgrDevFd;
158  int i32BtrMgrDevMtu;
159  unsigned int ui32BtrMgrDevDelay;
161 
162 /**
163  * @brief Represents the media file status.
164  */
165 typedef struct _stBTRMgrMediaStatus {
166  eBTRMgrState eBtrMgrState;
167  eBTRMgrSFreq eBtrMgrSFreq;
168  eBTRMgrSFmt eBtrMgrSFmt;
169  eBTRMgrAChan eBtrMgrAChan;
170  unsigned int ui32OverFlowCnt;
171  unsigned int ui32UnderFlowCnt;
172  unsigned char ui8Volume;
174 
175 /** @} */
176 
177 
178 #endif /* __BTR_MGR_MEDIA_TYPES_H__ */
179 
_stBTRMgrSBCInfo::eBtrMgrSbcSFreq
eBTRMgrSFreq eBtrMgrSbcSFreq
frequency
Definition: btrMgr_mediaTypes.h:115
_stBTRMgrSBCInfo
Represents the Subband coding (SBC) audio codec information.
Definition: btrMgr_mediaTypes.h:114
_stBTRMgrMPEGInfo::ui16MpegBitrate
unsigned short ui16MpegBitrate
bitrate
Definition: btrMgr_mediaTypes.h:136
stBTRMgrMPEGInfo
struct _stBTRMgrMPEGInfo stBTRMgrMPEGInfo
Represents the MPEG codec details.
_eBTRMgrAChan
_eBTRMgrAChan
Represents the Audio channel supported.
Definition: btrMgr_mediaTypes.h:90
stBTRMgrMediaStatus
struct _stBTRMgrMediaStatus stBTRMgrMediaStatus
Represents the media file status.
_stBTRMgrMPEGInfo::ui8MpegMpf
unsigned char ui8MpegMpf
mpf
Definition: btrMgr_mediaTypes.h:134
_stBTRMgrInASettings
Represents the audio input settings.
Definition: btrMgr_mediaTypes.h:142
_eBTRMgrState
_eBTRMgrState
Represents the status of media player.
Definition: btrMgr_mediaTypes.h:40
_stBTRMgrSBCInfo::ui8SbcSubbands
unsigned char ui8SbcSubbands
subbands
Definition: btrMgr_mediaTypes.h:118
_stBTRMgrMPEGInfo::ui8MpegLayer
unsigned char ui8MpegLayer
layer
Definition: btrMgr_mediaTypes.h:133
_stBTRMgrSBCInfo::ui16SbcBitrate
unsigned short ui16SbcBitrate
bitrate
Definition: btrMgr_mediaTypes.h:123
_stBTRMgrSBCInfo::ui16SbcFrameLen
unsigned short ui16SbcFrameLen
frameLength
Definition: btrMgr_mediaTypes.h:122
stBTRMgrSBCInfo
struct _stBTRMgrSBCInfo stBTRMgrSBCInfo
Represents the Subband coding (SBC) audio codec information.
_stBTRMgrSBCInfo::ui8SbcAllocMethod
unsigned char ui8SbcAllocMethod
allocation_method
Definition: btrMgr_mediaTypes.h:117
stBTRMgrInASettings
struct _stBTRMgrInASettings stBTRMgrInASettings
Represents the audio input settings.
_stBTRMgrMediaStatus
Represents the media file status.
Definition: btrMgr_mediaTypes.h:165
_eBTRMgrAType
_eBTRMgrAType
Represents the audio codec types.
Definition: btrMgr_mediaTypes.h:55
_eBTRMgrSFreq
_eBTRMgrSFreq
Represents the frequency supported.
Definition: btrMgr_mediaTypes.h:67
_stBTRMgrMPEGInfo::ui8MpegRfa
unsigned char ui8MpegRfa
rfa
Definition: btrMgr_mediaTypes.h:135
_stBTRMgrOutASettings
Represents the audio output settings.
Definition: btrMgr_mediaTypes.h:153
stBTRMgrPCMInfo
struct _stBTRMgrPCMInfo stBTRMgrPCMInfo
Represents the PCM codec details.
eBTRMgrSFreq
enum _eBTRMgrSFreq eBTRMgrSFreq
Represents the frequency supported.
eBTRMgrAChan
enum _eBTRMgrAChan eBTRMgrAChan
Represents the Audio channel supported.
_stBTRMgrSBCInfo::ui8SbcMaxBitpool
unsigned char ui8SbcMaxBitpool
max_bitpool
Definition: btrMgr_mediaTypes.h:121
_stBTRMgrPCMInfo
Represents the PCM codec details.
Definition: btrMgr_mediaTypes.h:103
_stBTRMgrSBCInfo::ui8SbcBlockLength
unsigned char ui8SbcBlockLength
block_length
Definition: btrMgr_mediaTypes.h:119
_stBTRMgrMPEGInfo
Represents the MPEG codec details.
Definition: btrMgr_mediaTypes.h:129
_stBTRMgrSBCInfo::ui8SbcMinBitpool
unsigned char ui8SbcMinBitpool
min_bitpool
Definition: btrMgr_mediaTypes.h:120
_stBTRMgrSBCInfo::eBtrMgrSbcAChan
eBTRMgrAChan eBtrMgrSbcAChan
channel_mode
Definition: btrMgr_mediaTypes.h:116
_stBTRMgrMPEGInfo::eBtrMgrMpegSFreq
eBTRMgrSFreq eBtrMgrMpegSFreq
frequency
Definition: btrMgr_mediaTypes.h:130
_eBTRMgrSFmt
_eBTRMgrSFmt
Represents the PCM bits supported.
Definition: btrMgr_mediaTypes.h:79
eBTRMgrAType
enum _eBTRMgrAType eBTRMgrAType
Represents the audio codec types.
eBTRMgrSFmt
enum _eBTRMgrSFmt eBTRMgrSFmt
Represents the PCM bits supported.
_stBTRMgrMPEGInfo::eBtrMgrMpegAChan
eBTRMgrAChan eBtrMgrMpegAChan
channel_mode
Definition: btrMgr_mediaTypes.h:131
_stBTRMgrMPEGInfo::ui8MpegCrc
unsigned char ui8MpegCrc
crc
Definition: btrMgr_mediaTypes.h:132
eBTRMgrState
enum _eBTRMgrState eBTRMgrState
Represents the status of media player.
stBTRMgrOutASettings
struct _stBTRMgrOutASettings stBTRMgrOutASettings
Represents the audio output settings.