OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright (c) 2008 The Khronos Group Inc. | |
3 * | |
4 * Permission is hereby granted, free of charge, to any person obtaining | |
5 * a copy of this software and associated documentation files (the | |
6 * "Software"), to deal in the Software without restriction, including | |
7 * without limitation the rights to use, copy, modify, merge, publish, | |
8 * distribute, sublicense, and/or sell copies of the Software, and to | |
9 * permit persons to whom the Software is furnished to do so, subject | |
10 * to the following conditions: | |
11 * The above copyright notice and this permission notice shall be included | |
12 * in all copies or substantial portions of the Software. | |
13 * | |
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | |
15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |
17 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | |
18 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | |
19 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | |
20 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
21 * | |
22 */ | |
23 | |
24 /** @file OMX_Audio.h - OpenMax IL version 1.1.2 | |
25 * The structures needed by Audio components to exchange | |
26 * parameters and configuration data with the componenmilts. | |
27 */ | |
28 | |
29 #ifndef OMX_Audio_h | |
30 #define OMX_Audio_h | |
31 | |
32 #ifdef __cplusplus | |
33 extern "C" { | |
34 #endif /* __cplusplus */ | |
35 | |
36 | |
37 /* Each OMX header must include all required header files to allow the | |
38 * header to compile without errors. The includes below are required | |
39 * for this header file to compile successfully | |
40 */ | |
41 | |
42 #include <OMX_Core.h> | |
43 | |
44 /** @defgroup midi MIDI | |
45 * @ingroup audio | |
46 */ | |
47 | |
48 /** @defgroup effects Audio effects | |
49 * @ingroup audio | |
50 */ | |
51 | |
52 /** @defgroup audio OpenMAX IL Audio Domain | |
53 * Structures for OpenMAX IL Audio domain | |
54 * @{ | |
55 */ | |
56 | |
57 /** Enumeration used to define the possible audio codings. | |
58 * If "OMX_AUDIO_CodingUnused" is selected, the coding selection must | |
59 * be done in a vendor specific way. Since this is for an audio | |
60 * processing element this enum is relevant. However, for another | |
61 * type of component other enums would be in this area. | |
62 */ | |
63 typedef enum OMX_AUDIO_CODINGTYPE { | |
64 OMX_AUDIO_CodingUnused = 0, /**< Placeholder value when coding is N/A */ | |
65 OMX_AUDIO_CodingAutoDetect, /**< auto detection of audio format */ | |
66 OMX_AUDIO_CodingPCM, /**< Any variant of PCM coding */ | |
67 OMX_AUDIO_CodingADPCM, /**< Any variant of ADPCM encoded data */ | |
68 OMX_AUDIO_CodingAMR, /**< Any variant of AMR encoded data */ | |
69 OMX_AUDIO_CodingGSMFR, /**< Any variant of GSM fullrate (i.e. GSM610)
*/ | |
70 OMX_AUDIO_CodingGSMEFR, /**< Any variant of GSM Enhanced Fullrate encod
ed data*/ | |
71 OMX_AUDIO_CodingGSMHR, /**< Any variant of GSM Halfrate encoded data *
/ | |
72 OMX_AUDIO_CodingPDCFR, /**< Any variant of PDC Fullrate encoded data *
/ | |
73 OMX_AUDIO_CodingPDCEFR, /**< Any variant of PDC Enhanced Fullrate encod
ed data */ | |
74 OMX_AUDIO_CodingPDCHR, /**< Any variant of PDC Halfrate encoded data *
/ | |
75 OMX_AUDIO_CodingTDMAFR, /**< Any variant of TDMA Fullrate encoded data
(TIA/EIA-136-420) */ | |
76 OMX_AUDIO_CodingTDMAEFR, /**< Any variant of TDMA Enhanced Fullrate enco
ded data (TIA/EIA-136-410) */ | |
77 OMX_AUDIO_CodingQCELP8, /**< Any variant of QCELP 8kbps encoded data */ | |
78 OMX_AUDIO_CodingQCELP13, /**< Any variant of QCELP 13kbps encoded data *
/ | |
79 OMX_AUDIO_CodingEVRC, /**< Any variant of EVRC encoded data */ | |
80 OMX_AUDIO_CodingSMV, /**< Any variant of SMV encoded data */ | |
81 OMX_AUDIO_CodingG711, /**< Any variant of G.711 encoded data */ | |
82 OMX_AUDIO_CodingG723, /**< Any variant of G.723 dot 1 encoded data */ | |
83 OMX_AUDIO_CodingG726, /**< Any variant of G.726 encoded data */ | |
84 OMX_AUDIO_CodingG729, /**< Any variant of G.729 encoded data */ | |
85 OMX_AUDIO_CodingAAC, /**< Any variant of AAC encoded data */ | |
86 OMX_AUDIO_CodingMP3, /**< Any variant of MP3 encoded data */ | |
87 OMX_AUDIO_CodingSBC, /**< Any variant of SBC encoded data */ | |
88 OMX_AUDIO_CodingVORBIS, /**< Any variant of VORBIS encoded data */ | |
89 OMX_AUDIO_CodingWMA, /**< Any variant of WMA encoded data */ | |
90 OMX_AUDIO_CodingRA, /**< Any variant of RA encoded data */ | |
91 OMX_AUDIO_CodingMIDI, /**< Any variant of MIDI encoded data */ | |
92 OMX_AUDIO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for int
roducing Khronos Standard Extensions */ | |
93 OMX_AUDIO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for int
roducing Vendor Extensions */ | |
94 OMX_AUDIO_CodingMax = 0x7FFFFFFF | |
95 } OMX_AUDIO_CODINGTYPE; | |
96 | |
97 | |
98 /** The PortDefinition structure is used to define all of the parameters | |
99 * necessary for the compliant component to setup an input or an output audio | |
100 * path. If additional information is needed to define the parameters of the | |
101 * port (such as frequency), additional structures must be sent such as the | |
102 * OMX_AUDIO_PARAM_PCMMODETYPE structure to supply the extra parameters for the
port. | |
103 */ | |
104 typedef struct OMX_AUDIO_PORTDEFINITIONTYPE { | |
105 OMX_STRING cMIMEType; /**< MIME type of data for the port */ | |
106 OMX_NATIVE_DEVICETYPE pNativeRender; /** < platform specific reference | |
107 for an output device, | |
108 otherwise this field is 0 */ | |
109 OMX_BOOL bFlagErrorConcealment; /**< Turns on error concealment if it is | |
110 supported by the OMX component */ | |
111 OMX_AUDIO_CODINGTYPE eEncoding; /**< Type of data expected for this | |
112 port (e.g. PCM, AMR, MP3, etc) */ | |
113 } OMX_AUDIO_PORTDEFINITIONTYPE; | |
114 | |
115 | |
116 /** Port format parameter. This structure is used to enumerate | |
117 * the various data input/output format supported by the port. | |
118 */ | |
119 typedef struct OMX_AUDIO_PARAM_PORTFORMATTYPE { | |
120 OMX_U32 nSize; /**< size of the structure in bytes */ | |
121 OMX_VERSIONTYPE nVersion; /**< OMX specification version information *
/ | |
122 OMX_U32 nPortIndex; /**< Indicates which port to set */ | |
123 OMX_U32 nIndex; /**< Indicates the enumeration index for the
format from 0x0 to N-1 */ | |
124 OMX_AUDIO_CODINGTYPE eEncoding; /**< Type of data expected for this port (e.
g. PCM, AMR, MP3, etc) */ | |
125 } OMX_AUDIO_PARAM_PORTFORMATTYPE; | |
126 | |
127 | |
128 /** PCM mode type */ | |
129 typedef enum OMX_AUDIO_PCMMODETYPE { | |
130 OMX_AUDIO_PCMModeLinear = 0, /**< Linear PCM encoded data */ | |
131 OMX_AUDIO_PCMModeALaw, /**< A law PCM encoded data (G.711) */ | |
132 OMX_AUDIO_PCMModeMULaw, /**< Mu law PCM encoded data (G.711) */ | |
133 OMX_AUDIO_PCMModeKhronosExtensions = 0x6F000000, /**< Reserved region for in
troducing Khronos Standard Extensions */ | |
134 OMX_AUDIO_PCMModeVendorStartUnused = 0x7F000000, /**< Reserved region for in
troducing Vendor Extensions */ | |
135 OMX_AUDIO_PCMModeMax = 0x7FFFFFFF | |
136 } OMX_AUDIO_PCMMODETYPE; | |
137 | |
138 | |
139 typedef enum OMX_AUDIO_CHANNELTYPE { | |
140 OMX_AUDIO_ChannelNone = 0x0, /**< Unused or empty */ | |
141 OMX_AUDIO_ChannelLF = 0x1, /**< Left front */ | |
142 OMX_AUDIO_ChannelRF = 0x2, /**< Right front */ | |
143 OMX_AUDIO_ChannelCF = 0x3, /**< Center front */ | |
144 OMX_AUDIO_ChannelLS = 0x4, /**< Left surround */ | |
145 OMX_AUDIO_ChannelRS = 0x5, /**< Right surround */ | |
146 OMX_AUDIO_ChannelLFE = 0x6, /**< Low frequency effects */ | |
147 OMX_AUDIO_ChannelCS = 0x7, /**< Back surround */ | |
148 OMX_AUDIO_ChannelLR = 0x8, /**< Left rear. */ | |
149 OMX_AUDIO_ChannelRR = 0x9, /**< Right rear. */ | |
150 OMX_AUDIO_ChannelKhronosExtensions = 0x6F000000, /**< Reserved region for in
troducing Khronos Standard Extensions */ | |
151 OMX_AUDIO_ChannelVendorStartUnused = 0x7F000000, /**< Reserved region for in
troducing Vendor Extensions */ | |
152 OMX_AUDIO_ChannelMax = 0x7FFFFFFF | |
153 } OMX_AUDIO_CHANNELTYPE; | |
154 | |
155 #define OMX_AUDIO_MAXCHANNELS 16 /**< maximum number distinct audio channels th
at a buffer may contain */ | |
156 #define OMX_MIN_PCMPAYLOAD_MSEC 5 /**< Minimum audio buffer payload size for unc
ompressed (PCM) audio */ | |
157 | |
158 /** PCM format description */ | |
159 typedef struct OMX_AUDIO_PARAM_PCMMODETYPE { | |
160 OMX_U32 nSize; /**< Size of this structure, in Bytes */ | |
161 OMX_VERSIONTYPE nVersion; /**< OMX specification version information
*/ | |
162 OMX_U32 nPortIndex; /**< port that this structure applies to *
/ | |
163 OMX_U32 nChannels; /**< Number of channels (e.g. 2 for stereo
) */ | |
164 OMX_NUMERICALDATATYPE eNumData; /**< indicates PCM data as signed or unsig
ned */ | |
165 OMX_ENDIANTYPE eEndian; /**< indicates PCM data as little or big e
ndian */ | |
166 OMX_BOOL bInterleaved; /**< True for normal interleaved data; fal
se for | |
167 non-interleaved data (e.g. block data
) */ | |
168 OMX_U32 nBitPerSample; /**< Bit per sample */ | |
169 OMX_U32 nSamplingRate; /**< Sampling rate of the source data. Us
e 0 for | |
170 variable or unknown sampling rate. */
| |
171 OMX_AUDIO_PCMMODETYPE ePCMMode; /**< PCM mode enumeration */ | |
172 OMX_AUDIO_CHANNELTYPE eChannelMapping[OMX_AUDIO_MAXCHANNELS]; /**< Slot i co
ntains channel defined by eChannelMap[i] */ | |
173 | |
174 } OMX_AUDIO_PARAM_PCMMODETYPE; | |
175 | |
176 | |
177 /** Audio channel mode. This is used by both AAC and MP3, although the names ar
e more appropriate | |
178 * for the MP3. For example, JointStereo for MP3 is CouplingChannels for AAC. | |
179 */ | |
180 typedef enum OMX_AUDIO_CHANNELMODETYPE { | |
181 OMX_AUDIO_ChannelModeStereo = 0, /**< 2 channels, the bitrate allocation be
tween those | |
182 two channels changes accordingly to ea
ch channel information */ | |
183 OMX_AUDIO_ChannelModeJointStereo, /**< mode that takes advantage of what is
common between | |
184 2 channels for higher compression gai
n */ | |
185 OMX_AUDIO_ChannelModeDual, /**< 2 mono-channels, each channel is enco
ded with half | |
186 the bitrate of the overall bitrate */ | |
187 OMX_AUDIO_ChannelModeMono, /**< Mono channel mode */ | |
188 OMX_AUDIO_ChannelModeKhronosExtensions = 0x6F000000, /**< Reserved region fo
r introducing Khronos Standard Extensions */ | |
189 OMX_AUDIO_ChannelModeVendorStartUnused = 0x7F000000, /**< Reserved region fo
r introducing Vendor Extensions */ | |
190 OMX_AUDIO_ChannelModeMax = 0x7FFFFFFF | |
191 } OMX_AUDIO_CHANNELMODETYPE; | |
192 | |
193 | |
194 typedef enum OMX_AUDIO_MP3STREAMFORMATTYPE { | |
195 OMX_AUDIO_MP3StreamFormatMP1Layer3 = 0, /**< MP3 Audio MPEG 1 Layer 3 Stream
format */ | |
196 OMX_AUDIO_MP3StreamFormatMP2Layer3, /**< MP3 Audio MPEG 2 Layer 3 Stream
format */ | |
197 OMX_AUDIO_MP3StreamFormatMP2_5Layer3, /**< MP3 Audio MPEG2.5 Layer 3 Strea
m format */ | |
198 OMX_AUDIO_MP3StreamFormatKhronosExtensions = 0x6F000000, /**< Reserved regio
n for introducing Khronos Standard Extensions */ | |
199 OMX_AUDIO_MP3StreamFormatVendorStartUnused = 0x7F000000, /**< Reserved regio
n for introducing Vendor Extensions */ | |
200 OMX_AUDIO_MP3StreamFormatMax = 0x7FFFFFFF | |
201 } OMX_AUDIO_MP3STREAMFORMATTYPE; | |
202 | |
203 /** MP3 params */ | |
204 typedef struct OMX_AUDIO_PARAM_MP3TYPE { | |
205 OMX_U32 nSize; /**< size of the structure in bytes */ | |
206 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
207 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
208 OMX_U32 nChannels; /**< Number of channels */ | |
209 OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for v
ariable | |
210 rate or unknown bit rates */ | |
211 OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0
for | |
212 variable or unknown sampling rate. */ | |
213 OMX_U32 nAudioBandWidth; /**< Audio band width (in Hz) to which an enc
oder should | |
214 limit the audio signal. Use 0 to let enc
oder decide */ | |
215 OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */ | |
216 OMX_AUDIO_MP3STREAMFORMATTYPE eFormat; /**< MP3 stream format */ | |
217 } OMX_AUDIO_PARAM_MP3TYPE; | |
218 | |
219 | |
220 typedef enum OMX_AUDIO_AACSTREAMFORMATTYPE { | |
221 OMX_AUDIO_AACStreamFormatMP2ADTS = 0, /**< AAC Audio Data Transport Stream 2
format */ | |
222 OMX_AUDIO_AACStreamFormatMP4ADTS, /**< AAC Audio Data Transport Stream 4
format */ | |
223 OMX_AUDIO_AACStreamFormatMP4LOAS, /**< AAC Low Overhead Audio Stream for
mat */ | |
224 OMX_AUDIO_AACStreamFormatMP4LATM, /**< AAC Low overhead Audio Transport
Multiplex */ | |
225 OMX_AUDIO_AACStreamFormatADIF, /**< AAC Audio Data Interchange Format
*/ | |
226 OMX_AUDIO_AACStreamFormatMP4FF, /**< AAC inside MPEG-4/ISO File Format
*/ | |
227 OMX_AUDIO_AACStreamFormatRAW, /**< AAC Raw Format */ | |
228 OMX_AUDIO_AACStreamFormatKhronosExtensions = 0x6F000000, /**< Reserved regio
n for introducing Khronos Standard Extensions */ | |
229 OMX_AUDIO_AACStreamFormatVendorStartUnused = 0x7F000000, /**< Reserved regio
n for introducing Vendor Extensions */ | |
230 OMX_AUDIO_AACStreamFormatMax = 0x7FFFFFFF | |
231 } OMX_AUDIO_AACSTREAMFORMATTYPE; | |
232 | |
233 | |
234 /** AAC mode type. Note that the term profile is used with the MPEG-2 | |
235 * standard and the term object type and profile is used with MPEG-4 */ | |
236 typedef enum OMX_AUDIO_AACPROFILETYPE{ | |
237 OMX_AUDIO_AACObjectNull = 0, /**< Null, not used */ | |
238 OMX_AUDIO_AACObjectMain = 1, /**< AAC Main object */ | |
239 OMX_AUDIO_AACObjectLC, /**< AAC Low Complexity object (AAC profile)
*/ | |
240 OMX_AUDIO_AACObjectSSR, /**< AAC Scalable Sample Rate object */ | |
241 OMX_AUDIO_AACObjectLTP, /**< AAC Long Term Prediction object */ | |
242 OMX_AUDIO_AACObjectHE, /**< AAC High Efficiency (object type SBR, H
E-AAC profile) */ | |
243 OMX_AUDIO_AACObjectScalable, /**< AAC Scalable object */ | |
244 OMX_AUDIO_AACObjectERLC = 17, /**< ER AAC Low Complexity object (Error Res
ilient AAC-LC) */ | |
245 OMX_AUDIO_AACObjectLD = 23, /**< AAC Low Delay object (Error Resilient)
*/ | |
246 OMX_AUDIO_AACObjectHE_PS = 29, /**< AAC High Efficiency with Parametric Ste
reo coding (HE-AAC v2, object type PS) */ | |
247 OMX_AUDIO_AACObjectKhronosExtensions = 0x6F000000, /**< Reserved region for in
troducing Khronos Standard Extensions */ | |
248 OMX_AUDIO_AACObjectVendorStartUnused = 0x7F000000, /**< Reserved region for in
troducing Vendor Extensions */ | |
249 OMX_AUDIO_AACObjectMax = 0x7FFFFFFF | |
250 } OMX_AUDIO_AACPROFILETYPE; | |
251 | |
252 | |
253 /** AAC tool usage (for nAACtools in OMX_AUDIO_PARAM_AACPROFILETYPE). | |
254 * Required for encoder configuration and optional as decoder info output. | |
255 * For MP3, OMX_AUDIO_CHANNELMODETYPE is sufficient. */ | |
256 #define OMX_AUDIO_AACToolNone 0x00000000 /**< no AAC tools allowed (encoder conf
ig) or active (decoder info output) */ | |
257 #define OMX_AUDIO_AACToolMS 0x00000001 /**< MS: Mid/side joint coding tool all
owed or active */ | |
258 #define OMX_AUDIO_AACToolIS 0x00000002 /**< IS: Intensity stereo tool allowed
or active */ | |
259 #define OMX_AUDIO_AACToolTNS 0x00000004 /**< TNS: Temporal Noise Shaping tool a
llowed or active */ | |
260 #define OMX_AUDIO_AACToolPNS 0x00000008 /**< PNS: MPEG-4 Perceptual Noise subst
itution tool allowed or active */ | |
261 #define OMX_AUDIO_AACToolLTP 0x00000010 /**< LTP: MPEG-4 Long Term Prediction t
ool allowed or active */ | |
262 #define OMX_AUDIO_AACToolAll 0x7FFFFFFF /**< all AAC tools allowed or active (*
/ | |
263 | |
264 /** MPEG-4 AAC error resilience (ER) tool usage (for nAACERtools in OMX_AUDIO_PA
RAM_AACPROFILETYPE). | |
265 * Required for ER encoder configuration and optional as decoder info output */ | |
266 #define OMX_AUDIO_AACERNone 0x00000000 /**< no AAC ER tools allowed/used */ | |
267 #define OMX_AUDIO_AACERVCB11 0x00000001 /**< VCB11: Virtual Code Books for AAC
section data */ | |
268 #define OMX_AUDIO_AACERRVLC 0x00000002 /**< RVLC: Reversible Variable Length C
oding */ | |
269 #define OMX_AUDIO_AACERHCR 0x00000004 /**< HCR: Huffman Codeword Reordering *
/ | |
270 #define OMX_AUDIO_AACERAll 0x7FFFFFFF /**< all AAC ER tools allowed/used */ | |
271 | |
272 | |
273 /** AAC params */ | |
274 typedef struct OMX_AUDIO_PARAM_AACPROFILETYPE { | |
275 OMX_U32 nSize; /**< Size of this structure, in Bytes */ | |
276 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
277 OMX_U32 nPortIndex; /**< Port that this structure applies to */ | |
278 OMX_U32 nChannels; /**< Number of channels */ | |
279 OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0
for | |
280 variable or unknown sampling rate. */ | |
281 OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for v
ariable | |
282 rate or unknown bit rates */ | |
283 OMX_U32 nAudioBandWidth; /**< Audio band width (in Hz) to which an enc
oder should | |
284 limit the audio signal. Use 0 to let enc
oder decide */ | |
285 OMX_U32 nFrameLength; /**< Frame length (in audio samples per chann
el) of the codec. | |
286 Can be 1024 or 960 (AAC-LC), 2048 (HE-AA
C), 480 or 512 (AAC-LD). | |
287 Use 0 to let encoder decide */ | |
288 OMX_U32 nAACtools; /**< AAC tool usage */ | |
289 OMX_U32 nAACERtools; /**< MPEG-4 AAC error resilience tool usage *
/ | |
290 OMX_AUDIO_AACPROFILETYPE eAACProfile; /**< AAC profile enumeration */ | |
291 OMX_AUDIO_AACSTREAMFORMATTYPE eAACStreamFormat; /**< AAC stream format enume
ration */ | |
292 OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */ | |
293 } OMX_AUDIO_PARAM_AACPROFILETYPE; | |
294 | |
295 | |
296 /** VORBIS params */ | |
297 typedef struct OMX_AUDIO_PARAM_VORBISTYPE { | |
298 OMX_U32 nSize; /**< size of the structure in bytes */ | |
299 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
300 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
301 OMX_U32 nChannels; /**< Number of channels */ | |
302 OMX_U32 nBitRate; /**< Bit rate of the encoded data data. Use 0 for
variable | |
303 rate or unknown bit rates. Encoding is set to
the | |
304 bitrate closest to specified value (in bps)
*/ | |
305 OMX_U32 nMinBitRate; /**< Sets minimum bitrate (in bps). */ | |
306 OMX_U32 nMaxBitRate; /**< Sets maximum bitrate (in bps). */ | |
307 | |
308 OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for | |
309 variable or unknown sampling rate. */ | |
310 OMX_U32 nAudioBandWidth; /**< Audio band width (in Hz) to which an encoder
should | |
311 limit the audio signal. Use 0 to let encoder
decide */ | |
312 OMX_S32 nQuality; /**< Sets encoding quality to n, between -1 (l
ow) and 10 (high). | |
313 In the default mode of operation, teh quality
level is 3. | |
314 Normal quality range is 0 - 10. */ | |
315 OMX_BOOL bManaged; /**< Set bitrate management mode. This turn
s off the | |
316 normal VBR encoding, but allows hard or soft
bitrate | |
317 constraints to be enforced by the encoder. Th
is mode can | |
318 be slower, and may also be lower quality. It
is | |
319 primarily useful for streaming. */ | |
320 OMX_BOOL bDownmix; /**< Downmix input from stereo to mono (has no
effect on | |
321 non-stereo streams). Useful for lower-bitrate
encoding. */ | |
322 } OMX_AUDIO_PARAM_VORBISTYPE; | |
323 | |
324 | |
325 /** WMA Version */ | |
326 typedef enum OMX_AUDIO_WMAFORMATTYPE { | |
327 OMX_AUDIO_WMAFormatUnused = 0, /**< format unused or unknown */ | |
328 OMX_AUDIO_WMAFormat7, /**< Windows Media Audio format 7 */ | |
329 OMX_AUDIO_WMAFormat8, /**< Windows Media Audio format 8 */ | |
330 OMX_AUDIO_WMAFormat9, /**< Windows Media Audio format 9 */ | |
331 OMX_AUDIO_WMAFormatKhronosExtensions = 0x6F000000, /**< Reserved region for in
troducing Khronos Standard Extensions */ | |
332 OMX_AUDIO_WMAFormatVendorStartUnused = 0x7F000000, /**< Reserved region for in
troducing Vendor Extensions */ | |
333 OMX_AUDIO_WMAFormatMax = 0x7FFFFFFF | |
334 } OMX_AUDIO_WMAFORMATTYPE; | |
335 | |
336 | |
337 /** WMA Profile */ | |
338 typedef enum OMX_AUDIO_WMAPROFILETYPE { | |
339 OMX_AUDIO_WMAProfileUnused = 0, /**< profile unused or unknown */ | |
340 OMX_AUDIO_WMAProfileL1, /**< Windows Media audio version 9 profile L1
*/ | |
341 OMX_AUDIO_WMAProfileL2, /**< Windows Media audio version 9 profile L2
*/ | |
342 OMX_AUDIO_WMAProfileL3, /**< Windows Media audio version 9 profile L3
*/ | |
343 OMX_AUDIO_WMAProfileKhronosExtensions = 0x6F000000, /**< Reserved region for i
ntroducing Khronos Standard Extensions */ | |
344 OMX_AUDIO_WMAProfileVendorStartUnused = 0x7F000000, /**< Reserved region for i
ntroducing Vendor Extensions */ | |
345 OMX_AUDIO_WMAProfileMax = 0x7FFFFFFF | |
346 } OMX_AUDIO_WMAPROFILETYPE; | |
347 | |
348 | |
349 /** WMA params */ | |
350 typedef struct OMX_AUDIO_PARAM_WMATYPE { | |
351 OMX_U32 nSize; /**< size of the structure in bytes */ | |
352 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
353 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
354 OMX_U16 nChannels; /**< Number of channels */ | |
355 OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variab
le | |
356 rate or unknown bit rates */ | |
357 OMX_AUDIO_WMAFORMATTYPE eFormat; /**< Version of WMA stream / data */ | |
358 OMX_AUDIO_WMAPROFILETYPE eProfile; /**< Profile of WMA stream / data */ | |
359 OMX_U32 nSamplingRate; /**< Sampling rate of the source data */ | |
360 OMX_U16 nBlockAlign; /**< is the block alignment, or block size, in byt
es of the audio codec */ | |
361 OMX_U16 nEncodeOptions; /**< WMA Type-specific data */ | |
362 OMX_U32 nSuperBlockAlign; /**< WMA Type-specific data */ | |
363 } OMX_AUDIO_PARAM_WMATYPE; | |
364 | |
365 /** | |
366 * RealAudio format | |
367 */ | |
368 typedef enum OMX_AUDIO_RAFORMATTYPE { | |
369 OMX_AUDIO_RAFormatUnused = 0, /**< Format unused or unknown */ | |
370 OMX_AUDIO_RA8, /**< RealAudio 8 codec */ | |
371 OMX_AUDIO_RA9, /**< RealAudio 9 codec */ | |
372 OMX_AUDIO_RA10_AAC, /**< MPEG-4 AAC codec for bitrates of more tha
n 128kbps */ | |
373 OMX_AUDIO_RA10_CODEC, /**< RealAudio codec for bitrates less than 12
8 kbps */ | |
374 OMX_AUDIO_RA10_LOSSLESS, /**< RealAudio Lossless */ | |
375 OMX_AUDIO_RA10_MULTICHANNEL, /**< RealAudio Multichannel */ | |
376 OMX_AUDIO_RA10_VOICE, /**< RealAudio Voice for bitrates below 15 kbp
s */ | |
377 OMX_AUDIO_RAFormatKhronosExtensions = 0x6F000000, /**< Reserved region for i
ntroducing Khronos Standard Extensions */ | |
378 OMX_AUDIO_RAFormatVendorStartUnused = 0x7F000000, /**< Reserved region for i
ntroducing Vendor Extensions */ | |
379 OMX_VIDEO_RAFormatMax = 0x7FFFFFFF | |
380 } OMX_AUDIO_RAFORMATTYPE; | |
381 | |
382 /** RA (Real Audio) params */ | |
383 typedef struct OMX_AUDIO_PARAM_RATYPE { | |
384 OMX_U32 nSize; /**< Size of this structure, in Bytes */ | |
385 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
386 OMX_U32 nPortIndex; /**< Port that this structure applies to */ | |
387 OMX_U32 nChannels; /**< Number of channels */ | |
388 OMX_U32 nSamplingRate; /**< is the sampling rate of the source data */ | |
389 OMX_U32 nBitsPerFrame; /**< is the value for bits per frame */ | |
390 OMX_U32 nSamplePerFrame; /**< is the value for samples per frame */ | |
391 OMX_U32 nCouplingQuantBits; /**< is the number of coupling quantization bits
in the stream */ | |
392 OMX_U32 nCouplingStartRegion; /**< is the coupling start region in the str
eam */ | |
393 OMX_U32 nNumRegions; /**< is the number of regions value */ | |
394 OMX_AUDIO_RAFORMATTYPE eFormat; /**< is the RealAudio audio format */ | |
395 } OMX_AUDIO_PARAM_RATYPE; | |
396 | |
397 | |
398 /** SBC Allocation Method Type */ | |
399 typedef enum OMX_AUDIO_SBCALLOCMETHODTYPE { | |
400 OMX_AUDIO_SBCAllocMethodLoudness, /**< Loudness allocation method */ | |
401 OMX_AUDIO_SBCAllocMethodSNR, /**< SNR allocation method */ | |
402 OMX_AUDIO_SBCAllocMethodKhronosExtensions = 0x6F000000, /**< Reserved region f
or introducing Khronos Standard Extensions */ | |
403 OMX_AUDIO_SBCAllocMethodVendorStartUnused = 0x7F000000, /**< Reserved region f
or introducing Vendor Extensions */ | |
404 OMX_AUDIO_SBCAllocMethodMax = 0x7FFFFFFF | |
405 } OMX_AUDIO_SBCALLOCMETHODTYPE; | |
406 | |
407 | |
408 /** SBC params */ | |
409 typedef struct OMX_AUDIO_PARAM_SBCTYPE { | |
410 OMX_U32 nSize; /**< size of the structure in bytes */ | |
411 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
412 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
413 OMX_U32 nChannels; /**< Number of channels */ | |
414 OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for varia
ble | |
415 rate or unknown bit rates */ | |
416 OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for | |
417 variable or unknown sampling rate. */ | |
418 OMX_U32 nBlocks; /**< Number of blocks */ | |
419 OMX_U32 nSubbands; /**< Number of subbands */ | |
420 OMX_U32 nBitPool; /**< Bitpool value */ | |
421 OMX_BOOL bEnableBitrate; /**< Use bitrate value instead of bitpool */ | |
422 OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */ | |
423 OMX_AUDIO_SBCALLOCMETHODTYPE eSBCAllocType; /**< SBC Allocation method typ
e */ | |
424 } OMX_AUDIO_PARAM_SBCTYPE; | |
425 | |
426 | |
427 /** ADPCM stream format parameters */ | |
428 typedef struct OMX_AUDIO_PARAM_ADPCMTYPE { | |
429 OMX_U32 nSize; /**< size of the structure in bytes */ | |
430 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
431 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
432 OMX_U32 nChannels; /**< Number of channels in the data stream (not | |
433 necessarily the same as the number of chann
els | |
434 to be rendered. */ | |
435 OMX_U32 nBitsPerSample; /**< Number of bits in each sample */ | |
436 OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 fo
r | |
437 variable or unknown sampling rate. */ | |
438 } OMX_AUDIO_PARAM_ADPCMTYPE; | |
439 | |
440 | |
441 /** G723 rate */ | |
442 typedef enum OMX_AUDIO_G723RATE { | |
443 OMX_AUDIO_G723ModeUnused = 0, /**< AMRNB Mode unused / unknown */ | |
444 OMX_AUDIO_G723ModeLow, /**< 5300 bps */ | |
445 OMX_AUDIO_G723ModeHigh, /**< 6300 bps */ | |
446 OMX_AUDIO_G723ModeKhronosExtensions = 0x6F000000, /**< Reserved region for i
ntroducing Khronos Standard Extensions */ | |
447 OMX_AUDIO_G723ModeVendorStartUnused = 0x7F000000, /**< Reserved region for i
ntroducing Vendor Extensions */ | |
448 OMX_AUDIO_G723ModeMax = 0x7FFFFFFF | |
449 } OMX_AUDIO_G723RATE; | |
450 | |
451 | |
452 /** G723 - Sample rate must be 8 KHz */ | |
453 typedef struct OMX_AUDIO_PARAM_G723TYPE { | |
454 OMX_U32 nSize; /**< size of the structure in bytes */ | |
455 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
456 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
457 OMX_U32 nChannels; /**< Number of channels in the data stream (no
t | |
458 necessarily the same as the number of cha
nnels | |
459 to be rendered. */ | |
460 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ | |
461 OMX_AUDIO_G723RATE eBitRate; /**< todo: Should this be moved to a config? *
/ | |
462 OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ | |
463 OMX_BOOL bPostFilter; /**< Enable Post Filter */ | |
464 } OMX_AUDIO_PARAM_G723TYPE; | |
465 | |
466 | |
467 /** ITU G726 (ADPCM) rate */ | |
468 typedef enum OMX_AUDIO_G726MODE { | |
469 OMX_AUDIO_G726ModeUnused = 0, /**< G726 Mode unused / unknown */ | |
470 OMX_AUDIO_G726Mode16, /**< 16 kbps */ | |
471 OMX_AUDIO_G726Mode24, /**< 24 kbps */ | |
472 OMX_AUDIO_G726Mode32, /**< 32 kbps, most common rate, also G721 */ | |
473 OMX_AUDIO_G726Mode40, /**< 40 kbps */ | |
474 OMX_AUDIO_G726ModeKhronosExtensions = 0x6F000000, /**< Reserved region for i
ntroducing Khronos Standard Extensions */ | |
475 OMX_AUDIO_G726ModeVendorStartUnused = 0x7F000000, /**< Reserved region for i
ntroducing Vendor Extensions */ | |
476 OMX_AUDIO_G726ModeMax = 0x7FFFFFFF | |
477 } OMX_AUDIO_G726MODE; | |
478 | |
479 | |
480 /** G.726 stream format parameters - must be at 8KHz */ | |
481 typedef struct OMX_AUDIO_PARAM_G726TYPE { | |
482 OMX_U32 nSize; /**< size of the structure in bytes */ | |
483 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
484 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
485 OMX_U32 nChannels; /**< Number of channels in the data stream (not | |
486 necessarily the same as the number of chann
els | |
487 to be rendered. */ | |
488 OMX_AUDIO_G726MODE eG726Mode; | |
489 } OMX_AUDIO_PARAM_G726TYPE; | |
490 | |
491 | |
492 /** G729 coder type */ | |
493 typedef enum OMX_AUDIO_G729TYPE { | |
494 OMX_AUDIO_G729 = 0, /**< ITU G.729 encoded data */ | |
495 OMX_AUDIO_G729A, /**< ITU G.729 annex A encoded data */ | |
496 OMX_AUDIO_G729B, /**< ITU G.729 with annex B encoded data */ | |
497 OMX_AUDIO_G729AB, /**< ITU G.729 annexes A and B encoded data */ | |
498 OMX_AUDIO_G729KhronosExtensions = 0x6F000000, /**< Reserved region for intro
ducing Khronos Standard Extensions */ | |
499 OMX_AUDIO_G729VendorStartUnused = 0x7F000000, /**< Reserved region for intro
ducing Vendor Extensions */ | |
500 OMX_AUDIO_G729Max = 0x7FFFFFFF | |
501 } OMX_AUDIO_G729TYPE; | |
502 | |
503 | |
504 /** G729 stream format parameters - fixed 6KHz sample rate */ | |
505 typedef struct OMX_AUDIO_PARAM_G729TYPE { | |
506 OMX_U32 nSize; /**< size of the structure in bytes */ | |
507 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
508 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
509 OMX_U32 nChannels; /**< Number of channels in the data stream (not | |
510 necessarily the same as the number of channel
s | |
511 to be rendered. */ | |
512 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ | |
513 OMX_AUDIO_G729TYPE eBitType; | |
514 } OMX_AUDIO_PARAM_G729TYPE; | |
515 | |
516 | |
517 /** AMR Frame format */ | |
518 typedef enum OMX_AUDIO_AMRFRAMEFORMATTYPE { | |
519 OMX_AUDIO_AMRFrameFormatConformance = 0, /**< Frame Format is AMR Conforman
ce | |
520 (Standard) Format */ | |
521 OMX_AUDIO_AMRFrameFormatIF1, /**< Frame Format is AMR Interface
| |
522 Format 1 */ | |
523 OMX_AUDIO_AMRFrameFormatIF2, /**< Frame Format is AMR Interface
| |
524 Format 2*/ | |
525 OMX_AUDIO_AMRFrameFormatFSF, /**< Frame Format is AMR File Stor
age | |
526 Format */ | |
527 OMX_AUDIO_AMRFrameFormatRTPPayload, /**< Frame Format is AMR Real-Time
| |
528 Transport Protocol Payload Fo
rmat */ | |
529 OMX_AUDIO_AMRFrameFormatITU, /**< Frame Format is ITU Format (a
dded at Motorola request) */ | |
530 OMX_AUDIO_AMRFrameFormatKhronosExtensions = 0x6F000000, /**< Reserved region
for introducing Khronos Standard Extensions */ | |
531 OMX_AUDIO_AMRFrameFormatVendorStartUnused = 0x7F000000, /**< Reserved region
for introducing Vendor Extensions */ | |
532 OMX_AUDIO_AMRFrameFormatMax = 0x7FFFFFFF | |
533 } OMX_AUDIO_AMRFRAMEFORMATTYPE; | |
534 | |
535 | |
536 /** AMR band mode */ | |
537 typedef enum OMX_AUDIO_AMRBANDMODETYPE { | |
538 OMX_AUDIO_AMRBandModeUnused = 0, /**< AMRNB Mode unused / unknown *
/ | |
539 OMX_AUDIO_AMRBandModeNB0, /**< AMRNB Mode 0 = 4750 bps */ | |
540 OMX_AUDIO_AMRBandModeNB1, /**< AMRNB Mode 1 = 5150 bps */ | |
541 OMX_AUDIO_AMRBandModeNB2, /**< AMRNB Mode 2 = 5900 bps */ | |
542 OMX_AUDIO_AMRBandModeNB3, /**< AMRNB Mode 3 = 6700 bps */ | |
543 OMX_AUDIO_AMRBandModeNB4, /**< AMRNB Mode 4 = 7400 bps */ | |
544 OMX_AUDIO_AMRBandModeNB5, /**< AMRNB Mode 5 = 7950 bps */ | |
545 OMX_AUDIO_AMRBandModeNB6, /**< AMRNB Mode 6 = 10200 bps */ | |
546 OMX_AUDIO_AMRBandModeNB7, /**< AMRNB Mode 7 = 12200 bps */ | |
547 OMX_AUDIO_AMRBandModeWB0, /**< AMRWB Mode 0 = 6600 bps */ | |
548 OMX_AUDIO_AMRBandModeWB1, /**< AMRWB Mode 1 = 8850 bps */ | |
549 OMX_AUDIO_AMRBandModeWB2, /**< AMRWB Mode 2 = 12650 bps */ | |
550 OMX_AUDIO_AMRBandModeWB3, /**< AMRWB Mode 3 = 14250 bps */ | |
551 OMX_AUDIO_AMRBandModeWB4, /**< AMRWB Mode 4 = 15850 bps */ | |
552 OMX_AUDIO_AMRBandModeWB5, /**< AMRWB Mode 5 = 18250 bps */ | |
553 OMX_AUDIO_AMRBandModeWB6, /**< AMRWB Mode 6 = 19850 bps */ | |
554 OMX_AUDIO_AMRBandModeWB7, /**< AMRWB Mode 7 = 23050 bps */ | |
555 OMX_AUDIO_AMRBandModeWB8, /**< AMRWB Mode 8 = 23850 bps */
| |
556 OMX_AUDIO_AMRBandModeKhronosExtensions = 0x6F000000, /**< Reserved region fo
r introducing Khronos Standard Extensions */ | |
557 OMX_AUDIO_AMRBandModeVendorStartUnused = 0x7F000000, /**< Reserved region fo
r introducing Vendor Extensions */ | |
558 OMX_AUDIO_AMRBandModeMax = 0x7FFFFFFF | |
559 } OMX_AUDIO_AMRBANDMODETYPE; | |
560 | |
561 | |
562 /** AMR Discontinuous Transmission mode */ | |
563 typedef enum OMX_AUDIO_AMRDTXMODETYPE { | |
564 OMX_AUDIO_AMRDTXModeOff = 0, /**< AMR Discontinuous Transmission Mode
is disabled */ | |
565 OMX_AUDIO_AMRDTXModeOnVAD1, /**< AMR Discontinuous Transmission Mode
using | |
566 Voice Activity Detector 1 (VAD1) is
enabled */ | |
567 OMX_AUDIO_AMRDTXModeOnVAD2, /**< AMR Discontinuous Transmission Mode
using | |
568 Voice Activity Detector 2 (VAD2) is
enabled */ | |
569 OMX_AUDIO_AMRDTXModeOnAuto, /**< The codec will automatically select
between | |
570 Off, VAD1 or VAD2 modes */ | |
571 | |
572 OMX_AUDIO_AMRDTXasEFR, /**< DTX as EFR instead of AMR standard (
3GPP 26.101, frame type =8,9,10) */ | |
573 | |
574 OMX_AUDIO_AMRDTXModeKhronosExtensions = 0x6F000000, /**< Reserved region for
introducing Khronos Standard Extensions */ | |
575 OMX_AUDIO_AMRDTXModeVendorStartUnused = 0x7F000000, /**< Reserved region for
introducing Vendor Extensions */ | |
576 OMX_AUDIO_AMRDTXModeMax = 0x7FFFFFFF | |
577 } OMX_AUDIO_AMRDTXMODETYPE; | |
578 | |
579 | |
580 /** AMR params */ | |
581 typedef struct OMX_AUDIO_PARAM_AMRTYPE { | |
582 OMX_U32 nSize; /**< size of the structure in bytes
*/ | |
583 OMX_VERSIONTYPE nVersion; /**< OMX specification version infor
mation */ | |
584 OMX_U32 nPortIndex; /**< port that this structure applie
s to */ | |
585 OMX_U32 nChannels; /**< Number of channels */ | |
586 OMX_U32 nBitRate; /**< Bit rate read only field */ | |
587 OMX_AUDIO_AMRBANDMODETYPE eAMRBandMode; /**< AMR Band Mode enumeration */ | |
588 OMX_AUDIO_AMRDTXMODETYPE eAMRDTXMode; /**< AMR DTX Mode enumeration */ | |
589 OMX_AUDIO_AMRFRAMEFORMATTYPE eAMRFrameFormat; /**< AMR frame format enumerat
ion */ | |
590 } OMX_AUDIO_PARAM_AMRTYPE; | |
591 | |
592 | |
593 /** GSM_FR (ETSI 06.10, 3GPP 46.010) stream format parameters */ | |
594 typedef struct OMX_AUDIO_PARAM_GSMFRTYPE { | |
595 OMX_U32 nSize; /**< size of the structure in bytes */ | |
596 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
597 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
598 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ | |
599 OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ | |
600 } OMX_AUDIO_PARAM_GSMFRTYPE; | |
601 | |
602 | |
603 /** GSM-HR (ETSI 06.20, 3GPP 46.020) stream format parameters */ | |
604 typedef struct OMX_AUDIO_PARAM_GSMHRTYPE { | |
605 OMX_U32 nSize; /**< size of the structure in bytes */ | |
606 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
607 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
608 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ | |
609 OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ | |
610 } OMX_AUDIO_PARAM_GSMHRTYPE; | |
611 | |
612 | |
613 /** GSM-EFR (ETSI 06.60, 3GPP 46.060) stream format parameters */ | |
614 typedef struct OMX_AUDIO_PARAM_GSMEFRTYPE { | |
615 OMX_U32 nSize; /**< size of the structure in bytes */ | |
616 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
617 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
618 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ | |
619 OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ | |
620 } OMX_AUDIO_PARAM_GSMEFRTYPE; | |
621 | |
622 | |
623 /** TDMA FR (TIA/EIA-136-420, VSELP 7.95kbps coder) stream format parameters */ | |
624 typedef struct OMX_AUDIO_PARAM_TDMAFRTYPE { | |
625 OMX_U32 nSize; /**< size of the structure in bytes */ | |
626 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
627 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
628 OMX_U32 nChannels; /**< Number of channels in the data stream (no
t | |
629 necessarily the same as the number of cha
nnels | |
630 to be rendered. */ | |
631 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ | |
632 OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ | |
633 } OMX_AUDIO_PARAM_TDMAFRTYPE; | |
634 | |
635 | |
636 /** TDMA EFR (TIA/EIA-136-410, ACELP 7.4kbps coder) stream format parameters */ | |
637 typedef struct OMX_AUDIO_PARAM_TDMAEFRTYPE { | |
638 OMX_U32 nSize; /**< size of the structure in bytes */ | |
639 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
640 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
641 OMX_U32 nChannels; /**< Number of channels in the data stream (no
t | |
642 necessarily the same as the number of cha
nnels | |
643 to be rendered. */ | |
644 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ | |
645 OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ | |
646 } OMX_AUDIO_PARAM_TDMAEFRTYPE; | |
647 | |
648 | |
649 /** PDC FR ( RCR-27, VSELP 6.7kbps coder) stream format parameters */ | |
650 typedef struct OMX_AUDIO_PARAM_PDCFRTYPE { | |
651 OMX_U32 nSize; /**< size of the structure in bytes */ | |
652 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
653 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
654 OMX_U32 nChannels; /**< Number of channels in the data stream (no
t | |
655 necessarily the same as the number of cha
nnels | |
656 to be rendered. */ | |
657 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ | |
658 OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ | |
659 } OMX_AUDIO_PARAM_PDCFRTYPE; | |
660 | |
661 | |
662 /** PDC EFR ( RCR-27, ACELP 6.7kbps coder) stream format parameters */ | |
663 typedef struct OMX_AUDIO_PARAM_PDCEFRTYPE { | |
664 OMX_U32 nSize; /**< size of the structure in bytes */ | |
665 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
666 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
667 OMX_U32 nChannels; /**< Number of channels in the data stream (no
t | |
668 necessarily the same as the number of cha
nnels | |
669 to be rendered. */ | |
670 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ | |
671 OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ | |
672 } OMX_AUDIO_PARAM_PDCEFRTYPE; | |
673 | |
674 /** PDC HR ( RCR-27, PSI-CELP 3.45kbps coder) stream format parameters */ | |
675 typedef struct OMX_AUDIO_PARAM_PDCHRTYPE { | |
676 OMX_U32 nSize; /**< size of the structure in bytes */ | |
677 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
678 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
679 OMX_U32 nChannels; /**< Number of channels in the data stream (no
t | |
680 necessarily the same as the number of cha
nnels | |
681 to be rendered. */ | |
682 OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ | |
683 OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ | |
684 } OMX_AUDIO_PARAM_PDCHRTYPE; | |
685 | |
686 | |
687 /** CDMA Rate types */ | |
688 typedef enum OMX_AUDIO_CDMARATETYPE { | |
689 OMX_AUDIO_CDMARateBlank = 0, /**< CDMA encoded frame is blank */ | |
690 OMX_AUDIO_CDMARateFull, /**< CDMA encoded frame in full rate *
/ | |
691 OMX_AUDIO_CDMARateHalf, /**< CDMA encoded frame in half rate *
/ | |
692 OMX_AUDIO_CDMARateQuarter, /**< CDMA encoded frame in quarter rat
e */ | |
693 OMX_AUDIO_CDMARateEighth, /**< CDMA encoded frame in eighth rate
(DTX)*/ | |
694 OMX_AUDIO_CDMARateErasure, /**< CDMA erasure frame */ | |
695 OMX_AUDIO_CDMARateKhronosExtensions = 0x6F000000, /**< Reserved region for i
ntroducing Khronos Standard Extensions */ | |
696 OMX_AUDIO_CDMARateVendorStartUnused = 0x7F000000, /**< Reserved region for i
ntroducing Vendor Extensions */ | |
697 OMX_AUDIO_CDMARateMax = 0x7FFFFFFF | |
698 } OMX_AUDIO_CDMARATETYPE; | |
699 | |
700 | |
701 /** QCELP8 (TIA/EIA-96, up to 8kbps coder) stream format parameters */ | |
702 typedef struct OMX_AUDIO_PARAM_QCELP8TYPE { | |
703 OMX_U32 nSize; /**< size of the structure in bytes */ | |
704 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
705 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
706 OMX_U32 nChannels; /**< Number of channels in the data stream (no
t | |
707 necessarily the same as the number of cha
nnels | |
708 to be rendered. */ | |
709 OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for va
riable | |
710 rate or unknown bit rates */ | |
711 OMX_AUDIO_CDMARATETYPE eCDMARate; /**< Frame rate */ | |
712 OMX_U32 nMinBitRate; /**< minmal rate for the encoder = 1,2,3,4, de
fault = 1 */ | |
713 OMX_U32 nMaxBitRate; /**< maximal rate for the encoder = 1,2,3,4, d
efault = 4 */ | |
714 } OMX_AUDIO_PARAM_QCELP8TYPE; | |
715 | |
716 | |
717 /** QCELP13 ( CDMA, EIA/TIA-733, 13.3kbps coder) stream format parameters */ | |
718 typedef struct OMX_AUDIO_PARAM_QCELP13TYPE { | |
719 OMX_U32 nSize; /**< size of the structure in bytes */ | |
720 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
721 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
722 OMX_U32 nChannels; /**< Number of channels in the data stream (no
t | |
723 necessarily the same as the number of cha
nnels | |
724 to be rendered. */ | |
725 OMX_AUDIO_CDMARATETYPE eCDMARate; /**< Frame rate */ | |
726 OMX_U32 nMinBitRate; /**< minmal rate for the encoder = 1,2,3,4, de
fault = 1 */ | |
727 OMX_U32 nMaxBitRate; /**< maximal rate for the encoder = 1,2,3,4, d
efault = 4 */ | |
728 } OMX_AUDIO_PARAM_QCELP13TYPE; | |
729 | |
730 | |
731 /** EVRC ( CDMA, EIA/TIA-127, RCELP up to 8.55kbps coder) stream format paramete
rs */ | |
732 typedef struct OMX_AUDIO_PARAM_EVRCTYPE { | |
733 OMX_U32 nSize; /**< size of the structure in bytes */ | |
734 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
735 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
736 OMX_U32 nChannels; /**< Number of channels in the data stream (no
t | |
737 necessarily the same as the number of cha
nnels | |
738 to be rendered. */ | |
739 OMX_AUDIO_CDMARATETYPE eCDMARate; /**< actual Frame rate */ | |
740 OMX_BOOL bRATE_REDUCon; /**< RATE_REDUCtion is requested for this fram
e */ | |
741 OMX_U32 nMinBitRate; /**< minmal rate for the encoder = 1,2,3,4, de
fault = 1 */ | |
742 OMX_U32 nMaxBitRate; /**< maximal rate for the encoder = 1,2,3,4, d
efault = 4 */ | |
743 OMX_BOOL bHiPassFilter; /**< Enable encoder's High Pass Filter */ | |
744 OMX_BOOL bNoiseSuppressor; /**< Enable encoder's noise suppressor pre-pro
cessing */ | |
745 OMX_BOOL bPostFilter; /**< Enable decoder's post Filter */ | |
746 } OMX_AUDIO_PARAM_EVRCTYPE; | |
747 | |
748 | |
749 /** SMV ( up to 8.55kbps coder) stream format parameters */ | |
750 typedef struct OMX_AUDIO_PARAM_SMVTYPE { | |
751 OMX_U32 nSize; /**< size of the structure in bytes */ | |
752 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
753 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
754 OMX_U32 nChannels; /**< Number of channels in the data stream (no
t | |
755 necessarily the same as the number of cha
nnels | |
756 to be rendered. */ | |
757 OMX_AUDIO_CDMARATETYPE eCDMARate; /**< Frame rate */ | |
758 OMX_BOOL bRATE_REDUCon; /**< RATE_REDUCtion is requested for this
frame */ | |
759 OMX_U32 nMinBitRate; /**< minmal rate for the encoder = 1,2,3,4, de
fault = 1 ??*/ | |
760 OMX_U32 nMaxBitRate; /**< maximal rate for the encoder = 1,2,3,4, d
efault = 4 ??*/ | |
761 OMX_BOOL bHiPassFilter; /**< Enable encoder's High Pass Filter ??*/ | |
762 OMX_BOOL bNoiseSuppressor; /**< Enable encoder's noise suppressor pre-pro
cessing */ | |
763 OMX_BOOL bPostFilter; /**< Enable decoder's post Filter ??*/ | |
764 } OMX_AUDIO_PARAM_SMVTYPE; | |
765 | |
766 | |
767 /** MIDI Format | |
768 * @ingroup midi | |
769 */ | |
770 typedef enum OMX_AUDIO_MIDIFORMATTYPE | |
771 { | |
772 OMX_AUDIO_MIDIFormatUnknown = 0, /**< MIDI Format unknown or don't care */ | |
773 OMX_AUDIO_MIDIFormatSMF0, /**< Standard MIDI File Type 0 */ | |
774 OMX_AUDIO_MIDIFormatSMF1, /**< Standard MIDI File Type 1 */ | |
775 OMX_AUDIO_MIDIFormatSMF2, /**< Standard MIDI File Type 2 */ | |
776 OMX_AUDIO_MIDIFormatSPMIDI, /**< SP-MIDI */ | |
777 OMX_AUDIO_MIDIFormatXMF0, /**< eXtensible Music Format type 0 */ | |
778 OMX_AUDIO_MIDIFormatXMF1, /**< eXtensible Music Format type 1 */ | |
779 OMX_AUDIO_MIDIFormatMobileXMF, /**< Mobile XMF (eXtensible Music Format ty
pe 2) */ | |
780 OMX_AUDIO_MIDIFormatKhronosExtensions = 0x6F000000, /**< Reserved region for
introducing Khronos Standard Extensions */ | |
781 OMX_AUDIO_MIDIFormatVendorStartUnused = 0x7F000000, /**< Reserved region for
introducing Vendor Extensions */ | |
782 OMX_AUDIO_MIDIFormatMax = 0x7FFFFFFF | |
783 } OMX_AUDIO_MIDIFORMATTYPE; | |
784 | |
785 | |
786 /** MIDI params | |
787 * @ingroup midi | |
788 */ | |
789 typedef struct OMX_AUDIO_PARAM_MIDITYPE { | |
790 OMX_U32 nSize; /**< size of the structure in bytes */ | |
791 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
792 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
793 OMX_U32 nFileSize; /**< size of the MIDI file in bytes, where th
e entire | |
794 MIDI file passed in, otherwise if 0x0, t
he MIDI data | |
795 is merged and streamed (instead of passe
d as an | |
796 entire MIDI file) */ | |
797 OMX_BU32 sMaxPolyphony; /**< Specifies the maximum simultaneous polyp
honic | |
798 voices. A value of zero indicates that t
he default | |
799 polyphony of the device is used */
| |
800 OMX_BOOL bLoadDefaultSound; /**< Whether to load default sound | |
801 bank at initialization */ | |
802 OMX_AUDIO_MIDIFORMATTYPE eMidiFormat; /**< Version of the MIDI file */
| |
803 } OMX_AUDIO_PARAM_MIDITYPE; | |
804 | |
805 | |
806 /** Type of the MIDI sound bank | |
807 * @ingroup midi | |
808 */ | |
809 typedef enum OMX_AUDIO_MIDISOUNDBANKTYPE { | |
810 OMX_AUDIO_MIDISoundBankUnused = 0, /**< unused/unknown soundbank t
ype */ | |
811 OMX_AUDIO_MIDISoundBankDLS1, /**< DLS version 1 */ | |
812 OMX_AUDIO_MIDISoundBankDLS2, /**< DLS version 2 */ | |
813 OMX_AUDIO_MIDISoundBankMobileDLSBase, /**< Mobile DLS, using the base
functionality */ | |
814 OMX_AUDIO_MIDISoundBankMobileDLSPlusOptions, /**< Mobile DLS, using the spec
ification-defined optional feature set */ | |
815 OMX_AUDIO_MIDISoundBankKhronosExtensions = 0x6F000000, /**< Reserved region
for introducing Khronos Standard Extensions */ | |
816 OMX_AUDIO_MIDISoundBankVendorStartUnused = 0x7F000000, /**< Reserved region
for introducing Vendor Extensions */ | |
817 OMX_AUDIO_MIDISoundBankMax = 0x7FFFFFFF | |
818 } OMX_AUDIO_MIDISOUNDBANKTYPE; | |
819 | |
820 | |
821 /** Bank Layout describes how bank MSB & LSB are used in the DLS instrument defi
nitions sound bank | |
822 * @ingroup midi | |
823 */ | |
824 typedef enum OMX_AUDIO_MIDISOUNDBANKLAYOUTTYPE { | |
825 OMX_AUDIO_MIDISoundBankLayoutUnused = 0, /**< unused/unknown soundbank type
*/ | |
826 OMX_AUDIO_MIDISoundBankLayoutGM, /**< GS layout (based on bank MSB
0x00) */ | |
827 OMX_AUDIO_MIDISoundBankLayoutGM2, /**< General MIDI 2 layout (using
MSB 0x78/0x79, LSB 0x00) */ | |
828 OMX_AUDIO_MIDISoundBankLayoutUser, /**< Does not conform to any bank
numbering standards */ | |
829 OMX_AUDIO_MIDISoundBankLayoutKhronosExtensions = 0x6F000000, /**< Reserved re
gion for introducing Khronos Standard Extensions */ | |
830 OMX_AUDIO_MIDISoundBankLayoutVendorStartUnused = 0x7F000000, /**< Reserved re
gion for introducing Vendor Extensions */ | |
831 OMX_AUDIO_MIDISoundBankLayoutMax = 0x7FFFFFFF | |
832 } OMX_AUDIO_MIDISOUNDBANKLAYOUTTYPE; | |
833 | |
834 | |
835 /** MIDI params to load/unload user soundbank | |
836 * @ingroup midi | |
837 */ | |
838 typedef struct OMX_AUDIO_PARAM_MIDILOADUSERSOUNDTYPE { | |
839 OMX_U32 nSize; /**< size of the structure in bytes */ | |
840 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
841 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
842 OMX_U32 nDLSIndex; /**< DLS file index to be loaded */ | |
843 OMX_U32 nDLSSize; /**< Size in bytes */ | |
844 OMX_PTR pDLSData; /**< Pointer to DLS file data */ | |
845 OMX_AUDIO_MIDISOUNDBANKTYPE eMidiSoundBank; /**< Midi sound bank type enum
eration */ | |
846 OMX_AUDIO_MIDISOUNDBANKLAYOUTTYPE eMidiSoundBankLayout; /**< Midi sound bank
layout enumeration */ | |
847 } OMX_AUDIO_PARAM_MIDILOADUSERSOUNDTYPE; | |
848 | |
849 | |
850 /** Structure for Live MIDI events and MIP messages. | |
851 * (MIP = Maximum Instantaneous Polyphony; part of the SP-MIDI standard.) | |
852 * @ingroup midi | |
853 */ | |
854 typedef struct OMX_AUDIO_CONFIG_MIDIIMMEDIATEEVENTTYPE { | |
855 OMX_U32 nSize; /**< size of the structure in bytes */ | |
856 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
857 OMX_U32 nPortIndex; /**< Port that this structure applies to */ | |
858 OMX_U32 nMidiEventSize; /**< Size of immediate MIDI events or MIP message
in bytes */ | |
859 OMX_U8 nMidiEvents[1]; /**< MIDI event array to be rendered immediately,
or an | |
860 array for the MIP message buffer, where the s
ize is | |
861 indicated by nMidiEventSize */ | |
862 } OMX_AUDIO_CONFIG_MIDIIMMEDIATEEVENTTYPE; | |
863 | |
864 | |
865 /** MIDI sound bank/ program pair in a given channel | |
866 * @ingroup midi | |
867 */ | |
868 typedef struct OMX_AUDIO_CONFIG_MIDISOUNDBANKPROGRAMTYPE { | |
869 OMX_U32 nSize; /**< size of the structure in bytes */ | |
870 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
871 OMX_U32 nPortIndex; /**< Port that this structure applies to */ | |
872 OMX_U32 nChannel; /**< Valid channel values range from 1 to 16 */ | |
873 OMX_U16 nIDProgram; /**< Valid program ID range is 1 to 128 */ | |
874 OMX_U16 nIDSoundBank; /**< Sound bank ID */ | |
875 OMX_U32 nUserSoundBankIndex;/**< User soundbank index, easier to access soun
dbanks | |
876 by index if multiple banks are present */ | |
877 } OMX_AUDIO_CONFIG_MIDISOUNDBANKPROGRAMTYPE; | |
878 | |
879 | |
880 /** MIDI control | |
881 * @ingroup midi | |
882 */ | |
883 typedef struct OMX_AUDIO_CONFIG_MIDICONTROLTYPE { | |
884 OMX_U32 nSize; /**< size of the structure in bytes */ | |
885 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
886 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
887 OMX_BS32 sPitchTransposition; /**< Pitch transposition in semitones, stored
as Q22.10 | |
888 format based on JAVA MMAPI (JSR-135) requ
irement */ | |
889 OMX_BU32 sPlayBackRate; /**< Relative playback rate, stored as Q14.17
fixed-point | |
890 number based on JSR-135 requirement */ | |
891 OMX_BU32 sTempo ; /**< Tempo in beats per minute (BPM), stored a
s Q22.10 | |
892 fixed-point number based on JSR-135 requi
rement */ | |
893 OMX_U32 nMaxPolyphony; /**< Specifies the maximum simultaneous polyph
onic | |
894 voices. A value of zero indicates that th
e default | |
895 polyphony of the device is used */ | |
896 OMX_U32 nNumRepeat; /**< Number of times to repeat playback */ | |
897 OMX_U32 nStopTime; /**< Time in milliseconds to indicate when pla
yback | |
898 will stop automatically. Set to zero if
not used */ | |
899 OMX_U16 nChannelMuteMask; /**< 16 bit mask for channel mute status */ | |
900 OMX_U16 nChannelSoloMask; /**< 16 bit mask for channel solo status */ | |
901 OMX_U32 nTrack0031MuteMask; /**< 32 bit mask for track mute status. Note:
This is for tracks 0-31 */ | |
902 OMX_U32 nTrack3263MuteMask; /**< 32 bit mask for track mute status. Note:
This is for tracks 32-63 */ | |
903 OMX_U32 nTrack0031SoloMask; /**< 32 bit mask for track solo status. Note:
This is for tracks 0-31 */ | |
904 OMX_U32 nTrack3263SoloMask; /**< 32 bit mask for track solo status. Note:
This is for tracks 32-63 */ | |
905 | |
906 } OMX_AUDIO_CONFIG_MIDICONTROLTYPE; | |
907 | |
908 | |
909 /** MIDI Playback States | |
910 * @ingroup midi | |
911 */ | |
912 typedef enum OMX_AUDIO_MIDIPLAYBACKSTATETYPE { | |
913 OMX_AUDIO_MIDIPlayBackStateUnknown = 0, /**< Unknown state or state does
not map to | |
914
other defined states */ | |
915 OMX_AUDIO_MIDIPlayBackStateClosedEngaged, /**< No MIDI resource is currentl
y open. | |
916 The MIDI engine is currently
processing | |
917 MIDI events. */ | |
918 OMX_AUDIO_MIDIPlayBackStateParsing, /**< A MIDI resource is open and
is being | |
919 primed. The MIDI engine is c
urrently | |
920 processing MIDI events. */ | |
921 OMX_AUDIO_MIDIPlayBackStateOpenEngaged, /**< A MIDI resource is open and
primed but | |
922 not playing. The MIDI engine
is currently | |
923 processing MIDI events. The
transition to | |
924 this state is only possible
from the | |
925 OMX_AUDIO_MIDIPlayBackStateP
laying state, | |
926 when the 'playback head' rea
ches the end | |
927 of media data or the playbac
k stops due | |
928 to stop time set.*/ | |
929 OMX_AUDIO_MIDIPlayBackStatePlaying, /**< A MIDI resource is open and
currently | |
930 playing. The MIDI engine is
currently | |
931 processing MIDI events.*/ | |
932 OMX_AUDIO_MIDIPlayBackStatePlayingPartially, /**< Best-effort playback due to
SP-MIDI/DLS | |
933 resource constraints */ | |
934 OMX_AUDIO_MIDIPlayBackStatePlayingSilently, /**< Due to system resource const
raints and | |
935 SP-MIDI content constraints,
there is | |
936 no audible MIDI content duri
ng playback | |
937 currently. The situation may
change if | |
938 resources are freed later.*/ | |
939 OMX_AUDIO_MIDIPlayBackStateKhronosExtensions = 0x6F000000, /**< Reserved regio
n for introducing Khronos Standard Extensions */ | |
940 OMX_AUDIO_MIDIPlayBackStateVendorStartUnused = 0x7F000000, /**< Reserved regio
n for introducing Vendor Extensions */ | |
941 OMX_AUDIO_MIDIPlayBackStateMax = 0x7FFFFFFF | |
942 } OMX_AUDIO_MIDIPLAYBACKSTATETYPE; | |
943 | |
944 | |
945 /** MIDI status | |
946 * @ingroup midi | |
947 */ | |
948 typedef struct OMX_AUDIO_CONFIG_MIDISTATUSTYPE { | |
949 OMX_U32 nSize; /**< size of the structure in bytes */ | |
950 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
951 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
952 OMX_U16 nNumTracks; /**< Number of MIDI tracks in the file, read onl
y field. | |
953 NOTE: May not return a meaningful value unt
il the entire | |
954 file is parsed and buffered. */ | |
955 OMX_U32 nDuration; /**< The length of the currently open MIDI resou
rce | |
956 in milliseconds. NOTE: May not return a mea
ningful value | |
957 until the entire file is parsed and buffere
d. */ | |
958 OMX_U32 nPosition; /**< Current Position of the MIDI resource being
played | |
959 in milliseconds */ | |
960 OMX_BOOL bVibra; /**< Does Vibra track exist? NOTE: May not retur
n a meaningful | |
961 value until the entire file is parsed and b
uffered. */ | |
962 OMX_U32 nNumMetaEvents; /**< Total number of MIDI Meta Events in the cur
rently | |
963 open MIDI resource. NOTE: May not return a
meaningful value | |
964 until the entire file is parsed and buffere
d. */ | |
965 OMX_U32 nNumActiveVoices; /**< Number of active voices in the currently pl
aying | |
966 MIDI resource. NOTE: May not return a meani
ngful value until | |
967 the entire file is parsed and buffered. */ | |
968 OMX_AUDIO_MIDIPLAYBACKSTATETYPE eMIDIPlayBackState; /**< MIDI playback stat
e enumeration, read only field */ | |
969 } OMX_AUDIO_CONFIG_MIDISTATUSTYPE; | |
970 | |
971 | |
972 /** MIDI Meta Event structure one per Meta Event. | |
973 * MIDI Meta Events are like audio metadata, except that they are interspersed | |
974 * with the MIDI content throughout the file and are not localized in the heade
r. | |
975 * As such, it is necessary to retrieve information about these Meta Events fro
m | |
976 * the engine, as it encounters these Meta Events within the MIDI content. | |
977 * For example, SMF files can have up to 14 types of MIDI Meta Events (copyrigh
t, | |
978 * author, default tempo, etc.) scattered throughout the file. | |
979 * @ingroup midi | |
980 */ | |
981 typedef struct OMX_AUDIO_CONFIG_MIDIMETAEVENTTYPE{ | |
982 OMX_U32 nSize; /**< size of the structure in bytes */ | |
983 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
984 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
985 OMX_U32 nIndex; /**< Index of Meta Event */ | |
986 OMX_U8 nMetaEventType; /**< Meta Event Type, 7bits (i.e. 0 - 127) */ | |
987 OMX_U32 nMetaEventSize; /**< size of the Meta Event in bytes */ | |
988 OMX_U32 nTrack; /**< track number for the meta event */ | |
989 OMX_U32 nPosition; /**< Position of the meta-event in milliseconds */ | |
990 } OMX_AUDIO_CONFIG_MIDIMETAEVENTTYPE; | |
991 | |
992 | |
993 /** MIDI Meta Event Data structure - one per Meta Event. | |
994 * @ingroup midi | |
995 */ | |
996 typedef struct OMX_AUDIO_CONFIG_MIDIMETAEVENTDATATYPE{ | |
997 OMX_U32 nSize; /**< size of the structure in bytes */ | |
998 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
999 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
1000 OMX_U32 nIndex; /**< Index of Meta Event */ | |
1001 OMX_U32 nMetaEventSize; /**< size of the Meta Event in bytes */ | |
1002 OMX_U8 nData[1]; /**< array of one or more bytes of meta data | |
1003 as indicated by the nMetaEventSize field */ | |
1004 } OMX_AUDIO_CONFIG__MIDIMETAEVENTDATATYPE; | |
1005 | |
1006 | |
1007 /** Audio Volume adjustment for a port */ | |
1008 typedef struct OMX_AUDIO_CONFIG_VOLUMETYPE { | |
1009 OMX_U32 nSize; /**< size of the structure in bytes */ | |
1010 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
1011 OMX_U32 nPortIndex; /**< Port index indicating which port to | |
1012 set. Select the input port to set | |
1013 just that port's volume. Select the | |
1014 output port to adjust the master | |
1015 volume. */ | |
1016 OMX_BOOL bLinear; /**< Is the volume to be set in linear (0.100) | |
1017 or logarithmic scale (mB) */ | |
1018 OMX_BS32 sVolume; /**< Volume linear setting in the 0..100 range,
OR | |
1019 Volume logarithmic setting for this port.
The values | |
1020 for volume are in mB (millibels = 1/100 dB)
relative | |
1021 to a gain of 1 (e.g. the output is the same
as the | |
1022 input level). Values are in mB from nMax | |
1023 (maximum volume) to nMin mB (typically nega
tive). | |
1024 Since the volume is "voltage" | |
1025 and not a "power", it takes a setting of | |
1026 -600 mB to decrease the volume by 1/2. If | |
1027 a component cannot accurately set the | |
1028 volume to the requested value, it must | |
1029 set the volume to the closest value BELOW | |
1030 the requested value. When getting the | |
1031 volume setting, the current actual volume | |
1032 must be returned. */ | |
1033 } OMX_AUDIO_CONFIG_VOLUMETYPE; | |
1034 | |
1035 | |
1036 /** Audio Volume adjustment for a channel */ | |
1037 typedef struct OMX_AUDIO_CONFIG_CHANNELVOLUMETYPE { | |
1038 OMX_U32 nSize; /**< size of the structure in bytes */ | |
1039 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
1040 OMX_U32 nPortIndex; /**< Port index indicating which port to | |
1041 set. Select the input port to set | |
1042 just that port's volume. Select the | |
1043 output port to adjust the master | |
1044 volume. */ | |
1045 OMX_U32 nChannel; /**< channel to select from 0 to N-1, | |
1046 using OMX_ALL to apply volume settings | |
1047 to all channels */ | |
1048 OMX_BOOL bLinear; /**< Is the volume to be set in linear (0.100) o
r | |
1049 logarithmic scale (mB) */ | |
1050 OMX_BS32 sVolume; /**< Volume linear setting in the 0..100 range,
OR | |
1051 Volume logarithmic setting for this port. | |
1052 The values for volume are in mB | |
1053 (millibels = 1/100 dB) relative to a gain | |
1054 of 1 (e.g. the output is the same as the | |
1055 input level). Values are in mB from nMax | |
1056 (maximum volume) to nMin mB (typically nega
tive). | |
1057 Since the volume is "voltage" | |
1058 and not a "power", it takes a setting of | |
1059 -600 mB to decrease the volume by 1/2. If | |
1060 a component cannot accurately set the | |
1061 volume to the requested value, it must | |
1062 set the volume to the closest value BELOW | |
1063 the requested value. When getting the | |
1064 volume setting, the current actual volume | |
1065 must be returned. */ | |
1066 OMX_BOOL bIsMIDI; /**< TRUE if nChannel refers to a MIDI channel, | |
1067 FALSE otherwise */ | |
1068 } OMX_AUDIO_CONFIG_CHANNELVOLUMETYPE; | |
1069 | |
1070 | |
1071 /** Audio balance setting */ | |
1072 typedef struct OMX_AUDIO_CONFIG_BALANCETYPE { | |
1073 OMX_U32 nSize; /**< size of the structure in bytes */ | |
1074 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
1075 OMX_U32 nPortIndex; /**< Port index indicating which port to | |
1076 set. Select the input port to set | |
1077 just that port's balance. Select the | |
1078 output port to adjust the master | |
1079 balance. */ | |
1080 OMX_S32 nBalance; /**< balance setting for this port | |
1081 (-100 to 100, where -100 indicates | |
1082 all left, and no right */ | |
1083 } OMX_AUDIO_CONFIG_BALANCETYPE; | |
1084 | |
1085 | |
1086 /** Audio Port mute */ | |
1087 typedef struct OMX_AUDIO_CONFIG_MUTETYPE { | |
1088 OMX_U32 nSize; /**< size of the structure in bytes */ | |
1089 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
1090 OMX_U32 nPortIndex; /**< Port index indicating which port to | |
1091 set. Select the input port to set | |
1092 just that port's mute. Select the | |
1093 output port to adjust the master | |
1094 mute. */ | |
1095 OMX_BOOL bMute; /**< Mute setting for this port */ | |
1096 } OMX_AUDIO_CONFIG_MUTETYPE; | |
1097 | |
1098 | |
1099 /** Audio Channel mute */ | |
1100 typedef struct OMX_AUDIO_CONFIG_CHANNELMUTETYPE { | |
1101 OMX_U32 nSize; /**< size of the structure in bytes */ | |
1102 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
1103 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
1104 OMX_U32 nChannel; /**< channel to select from 0 to N-1, | |
1105 using OMX_ALL to apply mute settings | |
1106 to all channels */ | |
1107 OMX_BOOL bMute; /**< Mute setting for this channel */ | |
1108 OMX_BOOL bIsMIDI; /**< TRUE if nChannel refers to a MIDI channel, | |
1109 FALSE otherwise */ | |
1110 } OMX_AUDIO_CONFIG_CHANNELMUTETYPE; | |
1111 | |
1112 | |
1113 | |
1114 /** Enable / Disable for loudness control, which boosts bass and to a | |
1115 * smaller extent high end frequencies to compensate for hearing | |
1116 * ability at the extreme ends of the audio spectrum | |
1117 */ | |
1118 typedef struct OMX_AUDIO_CONFIG_LOUDNESSTYPE { | |
1119 OMX_U32 nSize; /**< size of the structure in bytes */ | |
1120 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
1121 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
1122 OMX_BOOL bLoudness; /**< Enable/disable for loudness */ | |
1123 } OMX_AUDIO_CONFIG_LOUDNESSTYPE; | |
1124 | |
1125 | |
1126 /** Enable / Disable for bass, which controls low frequencies | |
1127 */ | |
1128 typedef struct OMX_AUDIO_CONFIG_BASSTYPE { | |
1129 OMX_U32 nSize; /**< size of the structure in bytes */ | |
1130 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
1131 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
1132 OMX_BOOL bEnable; /**< Enable/disable for bass control */ | |
1133 OMX_S32 nBass; /**< bass setting for the port, as a | |
1134 continuous value from -100 to 100 | |
1135 (0 means no change in bass level)*/ | |
1136 } OMX_AUDIO_CONFIG_BASSTYPE; | |
1137 | |
1138 | |
1139 /** Enable / Disable for treble, which controls high frequencies tones | |
1140 */ | |
1141 typedef struct OMX_AUDIO_CONFIG_TREBLETYPE { | |
1142 OMX_U32 nSize; /**< size of the structure in bytes */ | |
1143 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
1144 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
1145 OMX_BOOL bEnable; /**< Enable/disable for treble control */ | |
1146 OMX_S32 nTreble; /**< treble setting for the port, as a | |
1147 continuous value from -100 to 100 | |
1148 (0 means no change in treble level) */ | |
1149 } OMX_AUDIO_CONFIG_TREBLETYPE; | |
1150 | |
1151 | |
1152 /** An equalizer is typically used for two reasons: to compensate for an | |
1153 * sub-optimal frequency response of a system to make it sound more natural | |
1154 * or to create intentionally some unnatural coloring to the sound to create | |
1155 * an effect. | |
1156 * @ingroup effects | |
1157 */ | |
1158 typedef struct OMX_AUDIO_CONFIG_EQUALIZERTYPE { | |
1159 OMX_U32 nSize; /**< size of the structure in bytes */ | |
1160 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
1161 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
1162 OMX_BOOL bEnable; /**< Enable/disable for equalizer */ | |
1163 OMX_BU32 sBandIndex; /**< Band number to be set. Upper Limit is | |
1164 N-1, where N is the number of bands, lower l
imit is 0 */ | |
1165 OMX_BU32 sCenterFreq; /**< Center frequecies in Hz. This is a | |
1166 read only element and is used to determine | |
1167 the lower, center and upper frequency of | |
1168 this band. */ | |
1169 OMX_BS32 sBandLevel; /**< band level in millibels */ | |
1170 } OMX_AUDIO_CONFIG_EQUALIZERTYPE; | |
1171 | |
1172 | |
1173 /** Stereo widening mode type | |
1174 * @ingroup effects | |
1175 */ | |
1176 typedef enum OMX_AUDIO_STEREOWIDENINGTYPE { | |
1177 OMX_AUDIO_StereoWideningHeadphones, /**< Stereo widening for loudspeakers
*/ | |
1178 OMX_AUDIO_StereoWideningLoudspeakers, /**< Stereo widening for closely spac
ed loudspeakers */ | |
1179 OMX_AUDIO_StereoWideningKhronosExtensions = 0x6F000000, /**< Reserved region
for introducing Khronos Standard Extensions */ | |
1180 OMX_AUDIO_StereoWideningVendorStartUnused = 0x7F000000, /**< Reserved region
for introducing Vendor Extensions */ | |
1181 OMX_AUDIO_StereoWideningMax = 0x7FFFFFFF | |
1182 } OMX_AUDIO_STEREOWIDENINGTYPE; | |
1183 | |
1184 | |
1185 /** Control for stereo widening, which is a special 2-channel | |
1186 * case of the audio virtualizer effect. For example, for 5.1-channel | |
1187 * output, it translates to virtual surround sound. | |
1188 * @ingroup effects | |
1189 */ | |
1190 typedef struct OMX_AUDIO_CONFIG_STEREOWIDENINGTYPE { | |
1191 OMX_U32 nSize; /**< size of the structure in bytes */ | |
1192 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
1193 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
1194 OMX_BOOL bEnable; /**< Enable/disable for stereo widening control *
/ | |
1195 OMX_AUDIO_STEREOWIDENINGTYPE eWideningType; /**< Stereo widening algorithm t
ype */ | |
1196 OMX_U32 nStereoWidening; /**< stereo widening setting for the port, | |
1197 as a continuous value from 0 to 100 */ | |
1198 } OMX_AUDIO_CONFIG_STEREOWIDENINGTYPE; | |
1199 | |
1200 | |
1201 /** The chorus effect (or ``choralizer'') is any signal processor which makes | |
1202 * one sound source (such as a voice) sound like many such sources singing | |
1203 * (or playing) in unison. Since performance in unison is never exact, chorus | |
1204 * effects simulate this by making independently modified copies of the input | |
1205 * signal. Modifications may include (1) delay, (2) frequency shift, and | |
1206 * (3) amplitude modulation. | |
1207 * @ingroup effects | |
1208 */ | |
1209 typedef struct OMX_AUDIO_CONFIG_CHORUSTYPE { | |
1210 OMX_U32 nSize; /**< size of the structure in bytes */ | |
1211 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
1212 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
1213 OMX_BOOL bEnable; /**< Enable/disable for chorus */ | |
1214 OMX_BU32 sDelay; /**< average delay in milliseconds */ | |
1215 OMX_BU32 sModulationRate; /**< rate of modulation in millihertz */ | |
1216 OMX_U32 nModulationDepth; /**< depth of modulation as a percentage of | |
1217 delay (i.e. 0 to 100) */ | |
1218 OMX_BU32 nFeedback; /**< Feedback from chorus output to input in perc
entage */ | |
1219 } OMX_AUDIO_CONFIG_CHORUSTYPE; | |
1220 | |
1221 | |
1222 /** Reverberation is part of the reflected sound that follows the early | |
1223 * reflections. In a typical room, this consists of a dense succession of | |
1224 * echoes whose energy decays exponentially. The reverberation effect structure
| |
1225 * as defined here includes both (early) reflections as well as (late) reverber
ations. | |
1226 * @ingroup effects | |
1227 */ | |
1228 typedef struct OMX_AUDIO_CONFIG_REVERBERATIONTYPE { | |
1229 OMX_U32 nSize; /**< size of the structure in bytes */ | |
1230 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
1231 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
1232 OMX_BOOL bEnable; /**< Enable/disable for reverberation control
*/ | |
1233 OMX_BS32 sRoomLevel; /**< Intensity level for the whole room effect
| |
1234 (i.e. both early reflections and late | |
1235 reverberation) in millibels */ | |
1236 OMX_BS32 sRoomHighFreqLevel; /**< Attenuation at high frequencies | |
1237 relative to the intensity at low | |
1238 frequencies in millibels */ | |
1239 OMX_BS32 sReflectionsLevel; /**< Intensity level of early reflections | |
1240 (relative to room value), in millibels */ | |
1241 OMX_BU32 sReflectionsDelay; /**< Delay time of the first reflection relati
ve | |
1242 to the direct path, in milliseconds */ | |
1243 OMX_BS32 sReverbLevel; /**< Intensity level of late reverberation | |
1244 relative to room level, in millibels */ | |
1245 OMX_BU32 sReverbDelay; /**< Time delay from the first early reflectio
n | |
1246 to the beginning of the late reverberatio
n | |
1247 section, in milliseconds */ | |
1248 OMX_BU32 sDecayTime; /**< Late reverberation decay time at low | |
1249 frequencies, in milliseconds */ | |
1250 OMX_BU32 nDecayHighFreqRatio; /**< Ratio of high frequency decay time relati
ve | |
1251 to low frequency decay time in percent *
/ | |
1252 OMX_U32 nDensity; /**< Modal density in the late reverberation d
ecay, | |
1253 in percent (i.e. 0 - 100) */ | |
1254 OMX_U32 nDiffusion; /**< Echo density in the late reverberation de
cay, | |
1255 in percent (i.e. 0 - 100) */ | |
1256 OMX_BU32 sReferenceHighFreq; /**< Reference high frequency in Hertz. This i
s | |
1257 the frequency used as the reference for a
ll | |
1258 the high-frequency settings above */ | |
1259 | |
1260 } OMX_AUDIO_CONFIG_REVERBERATIONTYPE; | |
1261 | |
1262 | |
1263 /** Possible settings for the Echo Cancelation structure to use | |
1264 * @ingroup effects | |
1265 */ | |
1266 typedef enum OMX_AUDIO_ECHOCANTYPE { | |
1267 OMX_AUDIO_EchoCanOff = 0, /**< Echo Cancellation is disabled */ | |
1268 OMX_AUDIO_EchoCanNormal, /**< Echo Cancellation normal operation - | |
1269 echo from plastics and face */ | |
1270 OMX_AUDIO_EchoCanHFree, /**< Echo Cancellation optimized for | |
1271 Hands Free operation */ | |
1272 OMX_AUDIO_EchoCanCarKit, /**< Echo Cancellation optimized for | |
1273 Car Kit (longer echo) */ | |
1274 OMX_AUDIO_EchoCanKhronosExtensions = 0x6F000000, /**< Reserved region for int
roducing Khronos Standard Extensions */ | |
1275 OMX_AUDIO_EchoCanVendorStartUnused = 0x7F000000, /**< Reserved region for int
roducing Vendor Extensions */ | |
1276 OMX_AUDIO_EchoCanMax = 0x7FFFFFFF | |
1277 } OMX_AUDIO_ECHOCANTYPE; | |
1278 | |
1279 | |
1280 /** Enable / Disable for echo cancelation, which removes undesired echo's | |
1281 * from the audio | |
1282 * @ingroup effects | |
1283 */ | |
1284 typedef struct OMX_AUDIO_CONFIG_ECHOCANCELATIONTYPE { | |
1285 OMX_U32 nSize; /**< size of the structure in bytes */ | |
1286 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
1287 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
1288 OMX_AUDIO_ECHOCANTYPE eEchoCancelation; /**< Echo cancelation settings */ | |
1289 } OMX_AUDIO_CONFIG_ECHOCANCELATIONTYPE; | |
1290 | |
1291 | |
1292 /** Enable / Disable for noise reduction, which undesired noise from | |
1293 * the audio | |
1294 * @ingroup effects | |
1295 */ | |
1296 typedef struct OMX_AUDIO_CONFIG_NOISEREDUCTIONTYPE { | |
1297 OMX_U32 nSize; /**< size of the structure in bytes */ | |
1298 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ | |
1299 OMX_U32 nPortIndex; /**< port that this structure applies to */ | |
1300 OMX_BOOL bNoiseReduction; /**< Enable/disable for noise reduction */ | |
1301 } OMX_AUDIO_CONFIG_NOISEREDUCTIONTYPE; | |
1302 | |
1303 /** @} */ | |
1304 | |
1305 #ifdef __cplusplus | |
1306 } | |
1307 #endif /* __cplusplus */ | |
1308 | |
1309 #endif | |
1310 /* File EOF */ | |
1311 | |
OLD | NEW |