blob: 0dc2c769725e76c66c3c8da754803db774581c87 [file] [log] [blame]
James Dong334de522012-03-12 12:47:14 -07001/* ------------------------------------------------------------------
2 * Copyright (C) 1998-2009 PacketVideo
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13 * express or implied.
14 * See the License for the specific language governing permissions
15 * and limitations under the License.
16 * -------------------------------------------------------------------
17 */
18/*
Lajos Molnara1ae5a42014-11-06 17:05:46 -080019 * Copyright (c) 2008 The Khronos Group Inc.
20 *
James Dong334de522012-03-12 12:47:14 -070021 * Permission is hereby granted, free of charge, to any person obtaining
22 * a copy of this software and associated documentation files (the
23 * "Software"), to deal in the Software without restriction, including
24 * without limitation the rights to use, copy, modify, merge, publish,
25 * distribute, sublicense, and/or sell copies of the Software, and to
26 * permit persons to whom the Software is furnished to do so, subject
Lajos Molnara1ae5a42014-11-06 17:05:46 -080027 * to the following conditions:
James Dong334de522012-03-12 12:47:14 -070028 * The above copyright notice and this permission notice shall be included
Lajos Molnara1ae5a42014-11-06 17:05:46 -080029 * in all copies or substantial portions of the Software.
30 *
James Dong334de522012-03-12 12:47:14 -070031 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
32 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
33 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
34 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
35 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
36 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
Lajos Molnara1ae5a42014-11-06 17:05:46 -080037 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
James Dong334de522012-03-12 12:47:14 -070038 *
39 */
40
41/** OMX_Component.h - OpenMax IL version 1.1.2
42 * The OMX_Component header file contains the definitions used to define
43 * the public interface of a component. This header file is intended to
44 * be used by both the application and the component.
45 */
46
47#ifndef OMX_Component_h
48#define OMX_Component_h
49
50#ifdef __cplusplus
51extern "C" {
52#endif /* __cplusplus */
53
54
55
56/* Each OMX header must include all required header files to allow the
57 * header to compile without errors. The includes below are required
Lajos Molnara1ae5a42014-11-06 17:05:46 -080058 * for this header file to compile successfully
James Dong334de522012-03-12 12:47:14 -070059 */
60
61#include <OMX_Audio.h>
62#include <OMX_Video.h>
63#include <OMX_Image.h>
64#include <OMX_Other.h>
65
66/** @ingroup comp */
Lajos Molnara1ae5a42014-11-06 17:05:46 -080067typedef enum OMX_PORTDOMAINTYPE {
68 OMX_PortDomainAudio,
69 OMX_PortDomainVideo,
70 OMX_PortDomainImage,
James Dong334de522012-03-12 12:47:14 -070071 OMX_PortDomainOther,
Lajos Molnara1ae5a42014-11-06 17:05:46 -080072 OMX_PortDomainKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -070073 OMX_PortDomainVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
74 OMX_PortDomainMax = 0x7ffffff
75} OMX_PORTDOMAINTYPE;
76
77/** @ingroup comp */
78typedef struct OMX_PARAM_PORTDEFINITIONTYPE {
79 OMX_U32 nSize; /**< Size of the structure in bytes */
80 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
81 OMX_U32 nPortIndex; /**< Port number the structure applies to */
82 OMX_DIRTYPE eDir; /**< Direction (input or output) of this port */
83 OMX_U32 nBufferCountActual; /**< The actual number of buffers allocated on this port */
84 OMX_U32 nBufferCountMin; /**< The minimum number of buffers this port requires */
85 OMX_U32 nBufferSize; /**< Size, in bytes, for buffers to be used for this channel */
86 OMX_BOOL bEnabled; /**< Ports default to enabled and are enabled/disabled by
87 OMX_CommandPortEnable/OMX_CommandPortDisable.
88 When disabled a port is unpopulated. A disabled port
89 is not populated with buffers on a transition to IDLE. */
90 OMX_BOOL bPopulated; /**< Port is populated with all of its buffers as indicated by
Lajos Molnara1ae5a42014-11-06 17:05:46 -080091 nBufferCountActual. A disabled port is always unpopulated.
James Dong334de522012-03-12 12:47:14 -070092 An enabled port is populated on a transition to OMX_StateIdle
93 and unpopulated on a transition to loaded. */
94 OMX_PORTDOMAINTYPE eDomain; /**< Domain of the port. Determines the contents of metadata below. */
95 union {
96 OMX_AUDIO_PORTDEFINITIONTYPE audio;
97 OMX_VIDEO_PORTDEFINITIONTYPE video;
98 OMX_IMAGE_PORTDEFINITIONTYPE image;
99 OMX_OTHER_PORTDEFINITIONTYPE other;
100 } format;
101 OMX_BOOL bBuffersContiguous;
102 OMX_U32 nBufferAlignment;
103} OMX_PARAM_PORTDEFINITIONTYPE;
104
105/** @ingroup comp */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800106typedef struct OMX_PARAM_U32TYPE {
107 OMX_U32 nSize; /**< Size of this structure, in Bytes */
108 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
109 OMX_U32 nPortIndex; /**< port that this structure applies to */
James Dong334de522012-03-12 12:47:14 -0700110 OMX_U32 nU32; /**< U32 value */
111} OMX_PARAM_U32TYPE;
112
113/** @ingroup rpm */
114typedef enum OMX_SUSPENSIONPOLICYTYPE {
115 OMX_SuspensionDisabled, /**< No suspension; v1.0 behavior */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800116 OMX_SuspensionEnabled, /**< Suspension allowed */
117 OMX_SuspensionPolicyKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700118 OMX_SuspensionPolicyStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
119 OMX_SuspensionPolicyMax = 0x7fffffff
120} OMX_SUSPENSIONPOLICYTYPE;
121
122/** @ingroup rpm */
123typedef struct OMX_PARAM_SUSPENSIONPOLICYTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800124 OMX_U32 nSize;
125 OMX_VERSIONTYPE nVersion;
James Dong334de522012-03-12 12:47:14 -0700126 OMX_SUSPENSIONPOLICYTYPE ePolicy;
127} OMX_PARAM_SUSPENSIONPOLICYTYPE;
128
129/** @ingroup rpm */
130typedef enum OMX_SUSPENSIONTYPE {
131 OMX_NotSuspended, /**< component is not suspended */
132 OMX_Suspended, /**< component is suspended */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800133 OMX_SuspensionKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700134 OMX_SuspensionVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
135 OMX_SuspendMax = 0x7FFFFFFF
136} OMX_SUSPENSIONTYPE;
137
138/** @ingroup rpm */
139typedef struct OMX_PARAM_SUSPENSIONTYPE {
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800140 OMX_U32 nSize;
141 OMX_VERSIONTYPE nVersion;
142 OMX_SUSPENSIONTYPE eType;
James Dong334de522012-03-12 12:47:14 -0700143} OMX_PARAM_SUSPENSIONTYPE ;
144
145typedef struct OMX_CONFIG_BOOLEANTYPE {
146 OMX_U32 nSize;
147 OMX_VERSIONTYPE nVersion;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800148 OMX_BOOL bEnabled;
James Dong334de522012-03-12 12:47:14 -0700149} OMX_CONFIG_BOOLEANTYPE;
150
151/* Parameter specifying the content uri to use. */
152/** @ingroup cp */
153typedef struct OMX_PARAM_CONTENTURITYPE
154{
155 OMX_U32 nSize; /**< size of the structure in bytes, including
156 actual URI name */
157 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
158 OMX_U8 contentURI[1]; /**< The URI name */
159} OMX_PARAM_CONTENTURITYPE;
160
161/* Parameter specifying the pipe to use. */
162/** @ingroup cp */
163typedef struct OMX_PARAM_CONTENTPIPETYPE
164{
165 OMX_U32 nSize; /**< size of the structure in bytes */
166 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
167 OMX_HANDLETYPE hPipe; /**< The pipe handle*/
168} OMX_PARAM_CONTENTPIPETYPE;
169
170/** @ingroup rpm */
171typedef struct OMX_RESOURCECONCEALMENTTYPE {
172 OMX_U32 nSize; /**< size of the structure in bytes */
173 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800174 OMX_BOOL bResourceConcealmentForbidden; /**< disallow the use of resource concealment
175 methods (like degrading algorithm quality to
176 lower resource consumption or functional bypass)
James Dong334de522012-03-12 12:47:14 -0700177 on a component as a resolution to resource conflicts. */
178} OMX_RESOURCECONCEALMENTTYPE;
179
180
181/** @ingroup metadata */
182typedef enum OMX_METADATACHARSETTYPE {
183 OMX_MetadataCharsetUnknown = 0,
184 OMX_MetadataCharsetASCII,
185 OMX_MetadataCharsetBinary,
186 OMX_MetadataCharsetCodePage1252,
187 OMX_MetadataCharsetUTF8,
188 OMX_MetadataCharsetJavaConformantUTF8,
189 OMX_MetadataCharsetUTF7,
190 OMX_MetadataCharsetImapUTF7,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800191 OMX_MetadataCharsetUTF16LE,
James Dong334de522012-03-12 12:47:14 -0700192 OMX_MetadataCharsetUTF16BE,
193 OMX_MetadataCharsetGB12345,
194 OMX_MetadataCharsetHZGB2312,
195 OMX_MetadataCharsetGB2312,
196 OMX_MetadataCharsetGB18030,
197 OMX_MetadataCharsetGBK,
198 OMX_MetadataCharsetBig5,
199 OMX_MetadataCharsetISO88591,
200 OMX_MetadataCharsetISO88592,
201 OMX_MetadataCharsetISO88593,
202 OMX_MetadataCharsetISO88594,
203 OMX_MetadataCharsetISO88595,
204 OMX_MetadataCharsetISO88596,
205 OMX_MetadataCharsetISO88597,
206 OMX_MetadataCharsetISO88598,
207 OMX_MetadataCharsetISO88599,
208 OMX_MetadataCharsetISO885910,
209 OMX_MetadataCharsetISO885913,
210 OMX_MetadataCharsetISO885914,
211 OMX_MetadataCharsetISO885915,
212 OMX_MetadataCharsetShiftJIS,
213 OMX_MetadataCharsetISO2022JP,
214 OMX_MetadataCharsetISO2022JP1,
215 OMX_MetadataCharsetISOEUCJP,
216 OMX_MetadataCharsetSMS7Bit,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800217 OMX_MetadataCharsetKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700218 OMX_MetadataCharsetVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
219 OMX_MetadataCharsetTypeMax= 0x7FFFFFFF
220} OMX_METADATACHARSETTYPE;
221
222/** @ingroup metadata */
223typedef enum OMX_METADATASCOPETYPE
224{
225 OMX_MetadataScopeAllLevels,
226 OMX_MetadataScopeTopLevel,
227 OMX_MetadataScopePortLevel,
228 OMX_MetadataScopeNodeLevel,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800229 OMX_MetadataScopeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700230 OMX_MetadataScopeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
231 OMX_MetadataScopeTypeMax = 0x7fffffff
232} OMX_METADATASCOPETYPE;
233
234/** @ingroup metadata */
235typedef enum OMX_METADATASEARCHMODETYPE
236{
237 OMX_MetadataSearchValueSizeByIndex,
238 OMX_MetadataSearchItemByIndex,
239 OMX_MetadataSearchNextItemByKey,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800240 OMX_MetadataSearchKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
James Dong334de522012-03-12 12:47:14 -0700241 OMX_MetadataSearchVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
242 OMX_MetadataSearchTypeMax = 0x7fffffff
243} OMX_METADATASEARCHMODETYPE;
244/** @ingroup metadata */
245typedef struct OMX_CONFIG_METADATAITEMCOUNTTYPE
246{
247 OMX_U32 nSize;
248 OMX_VERSIONTYPE nVersion;
249 OMX_METADATASCOPETYPE eScopeMode;
250 OMX_U32 nScopeSpecifier;
251 OMX_U32 nMetadataItemCount;
252} OMX_CONFIG_METADATAITEMCOUNTTYPE;
253
254/** @ingroup metadata */
255typedef struct OMX_CONFIG_METADATAITEMTYPE
256{
257 OMX_U32 nSize;
258 OMX_VERSIONTYPE nVersion;
259 OMX_METADATASCOPETYPE eScopeMode;
260 OMX_U32 nScopeSpecifier;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800261 OMX_U32 nMetadataItemIndex;
James Dong334de522012-03-12 12:47:14 -0700262 OMX_METADATASEARCHMODETYPE eSearchMode;
263 OMX_METADATACHARSETTYPE eKeyCharset;
264 OMX_U8 nKeySizeUsed;
265 OMX_U8 nKey[128];
266 OMX_METADATACHARSETTYPE eValueCharset;
267 OMX_STRING sLanguageCountry;
268 OMX_U32 nValueMaxSize;
269 OMX_U32 nValueSizeUsed;
270 OMX_U8 nValue[1];
271} OMX_CONFIG_METADATAITEMTYPE;
272
273/* @ingroup metadata */
274typedef struct OMX_CONFIG_CONTAINERNODECOUNTTYPE
275{
276 OMX_U32 nSize;
277 OMX_VERSIONTYPE nVersion;
278 OMX_BOOL bAllKeys;
279 OMX_U32 nParentNodeID;
280 OMX_U32 nNumNodes;
281} OMX_CONFIG_CONTAINERNODECOUNTTYPE;
282
283/** @ingroup metadata */
284typedef struct OMX_CONFIG_CONTAINERNODEIDTYPE
285{
286 OMX_U32 nSize;
287 OMX_VERSIONTYPE nVersion;
288 OMX_BOOL bAllKeys;
289 OMX_U32 nParentNodeID;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800290 OMX_U32 nNodeIndex;
291 OMX_U32 nNodeID;
James Dong334de522012-03-12 12:47:14 -0700292 OMX_STRING cNodeName;
293 OMX_BOOL bIsLeafType;
294} OMX_CONFIG_CONTAINERNODEIDTYPE;
295
296/** @ingroup metadata */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800297typedef struct OMX_PARAM_METADATAFILTERTYPE
298{
299 OMX_U32 nSize;
300 OMX_VERSIONTYPE nVersion;
301 OMX_BOOL bAllKeys; /* if true then this structure refers to all keys and
James Dong334de522012-03-12 12:47:14 -0700302 * the three key fields below are ignored */
303 OMX_METADATACHARSETTYPE eKeyCharset;
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800304 OMX_U32 nKeySizeUsed;
305 OMX_U8 nKey [128];
James Dong334de522012-03-12 12:47:14 -0700306 OMX_U32 nLanguageCountrySizeUsed;
307 OMX_U8 nLanguageCountry[128];
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800308 OMX_BOOL bEnabled; /* if true then key is part of filter (e.g.
James Dong334de522012-03-12 12:47:14 -0700309 * retained for query later). If false then
310 * key is not part of filter */
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800311} OMX_PARAM_METADATAFILTERTYPE;
James Dong334de522012-03-12 12:47:14 -0700312
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800313/** The OMX_HANDLETYPE structure defines the component handle. The component
James Dong334de522012-03-12 12:47:14 -0700314 * handle is used to access all of the component's public methods and also
315 * contains pointers to the component's private data area. The component
316 * handle is initialized by the OMX core (with help from the component)
317 * during the process of loading the component. After the component is
318 * successfully loaded, the application can safely access any of the
319 * component's public functions (although some may return an error because
320 * the state is inappropriate for the access).
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800321 *
James Dong334de522012-03-12 12:47:14 -0700322 * @ingroup comp
323 */
324typedef struct OMX_COMPONENTTYPE
325{
326 /** The size of this structure, in bytes. It is the responsibility
327 of the allocator of this structure to fill in this value. Since
328 this structure is allocated by the GetHandle function, this
329 function will fill in this value. */
330 OMX_U32 nSize;
331
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800332 /** nVersion is the version of the OMX specification that the structure
333 is built against. It is the responsibility of the creator of this
334 structure to initialize this value and every user of this structure
335 should verify that it knows how to use the exact version of
James Dong334de522012-03-12 12:47:14 -0700336 this structure found herein. */
337 OMX_VERSIONTYPE nVersion;
338
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800339 /** pComponentPrivate is a pointer to the component private data area.
340 This member is allocated and initialized by the component when the
341 component is first loaded. The application should not access this
James Dong334de522012-03-12 12:47:14 -0700342 data area. */
343 OMX_PTR pComponentPrivate;
344
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800345 /** pApplicationPrivate is a pointer that is a parameter to the
346 OMX_GetHandle method, and contains an application private value
347 provided by the IL client. This application private data is
James Dong334de522012-03-12 12:47:14 -0700348 returned to the IL Client by OMX in all callbacks */
349 OMX_PTR pApplicationPrivate;
350
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800351 /** refer to OMX_GetComponentVersion in OMX_core.h or the OMX IL
James Dong334de522012-03-12 12:47:14 -0700352 specification for details on the GetComponentVersion method.
353 */
354 OMX_ERRORTYPE (*GetComponentVersion)(
355 OMX_IN OMX_HANDLETYPE hComponent,
356 OMX_OUT OMX_STRING pComponentName,
357 OMX_OUT OMX_VERSIONTYPE* pComponentVersion,
358 OMX_OUT OMX_VERSIONTYPE* pSpecVersion,
359 OMX_OUT OMX_UUIDTYPE* pComponentUUID);
360
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800361 /** refer to OMX_SendCommand in OMX_core.h or the OMX IL
James Dong334de522012-03-12 12:47:14 -0700362 specification for details on the SendCommand method.
363 */
364 OMX_ERRORTYPE (*SendCommand)(
365 OMX_IN OMX_HANDLETYPE hComponent,
366 OMX_IN OMX_COMMANDTYPE Cmd,
367 OMX_IN OMX_U32 nParam1,
368 OMX_IN OMX_PTR pCmdData);
369
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800370 /** refer to OMX_GetParameter in OMX_core.h or the OMX IL
James Dong334de522012-03-12 12:47:14 -0700371 specification for details on the GetParameter method.
372 */
373 OMX_ERRORTYPE (*GetParameter)(
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800374 OMX_IN OMX_HANDLETYPE hComponent,
375 OMX_IN OMX_INDEXTYPE nParamIndex,
James Dong334de522012-03-12 12:47:14 -0700376 OMX_INOUT OMX_PTR pComponentParameterStructure);
377
378
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800379 /** refer to OMX_SetParameter in OMX_core.h or the OMX IL
James Dong334de522012-03-12 12:47:14 -0700380 specification for details on the SetParameter method.
381 */
382 OMX_ERRORTYPE (*SetParameter)(
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800383 OMX_IN OMX_HANDLETYPE hComponent,
James Dong334de522012-03-12 12:47:14 -0700384 OMX_IN OMX_INDEXTYPE nIndex,
385 OMX_IN OMX_PTR pComponentParameterStructure);
386
387
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800388 /** refer to OMX_GetConfig in OMX_core.h or the OMX IL
James Dong334de522012-03-12 12:47:14 -0700389 specification for details on the GetConfig method.
390 */
391 OMX_ERRORTYPE (*GetConfig)(
392 OMX_IN OMX_HANDLETYPE hComponent,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800393 OMX_IN OMX_INDEXTYPE nIndex,
James Dong334de522012-03-12 12:47:14 -0700394 OMX_INOUT OMX_PTR pComponentConfigStructure);
395
396
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800397 /** refer to OMX_SetConfig in OMX_core.h or the OMX IL
James Dong334de522012-03-12 12:47:14 -0700398 specification for details on the SetConfig method.
399 */
400 OMX_ERRORTYPE (*SetConfig)(
401 OMX_IN OMX_HANDLETYPE hComponent,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800402 OMX_IN OMX_INDEXTYPE nIndex,
James Dong334de522012-03-12 12:47:14 -0700403 OMX_IN OMX_PTR pComponentConfigStructure);
404
405
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800406 /** refer to OMX_GetExtensionIndex in OMX_core.h or the OMX IL
James Dong334de522012-03-12 12:47:14 -0700407 specification for details on the GetExtensionIndex method.
408 */
409 OMX_ERRORTYPE (*GetExtensionIndex)(
410 OMX_IN OMX_HANDLETYPE hComponent,
411 OMX_IN OMX_STRING cParameterName,
412 OMX_OUT OMX_INDEXTYPE* pIndexType);
413
414
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800415 /** refer to OMX_GetState in OMX_core.h or the OMX IL
James Dong334de522012-03-12 12:47:14 -0700416 specification for details on the GetState method.
417 */
418 OMX_ERRORTYPE (*GetState)(
419 OMX_IN OMX_HANDLETYPE hComponent,
420 OMX_OUT OMX_STATETYPE* pState);
421
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800422
James Dong334de522012-03-12 12:47:14 -0700423 /** The ComponentTunnelRequest method will interact with another OMX
424 component to determine if tunneling is possible and to setup the
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800425 tunneling. The return codes for this method can be used to
James Dong334de522012-03-12 12:47:14 -0700426 determine if tunneling is not possible, or if tunneling is not
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800427 supported.
James Dong334de522012-03-12 12:47:14 -0700428
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800429 Base profile components (i.e. non-interop) do not support this
430 method and should return OMX_ErrorNotImplemented
431
432 The interop profile component MUST support tunneling to another
433 interop profile component with a compatible port parameters.
James Dong334de522012-03-12 12:47:14 -0700434 A component may also support proprietary communication.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800435
436 If proprietary communication is supported the negotiation of
437 proprietary communication is done outside of OMX in a vendor
438 specific way. It is only required that the proper result be
439 returned and the details of how the setup is done is left
440 to the component implementation.
441
James Dong334de522012-03-12 12:47:14 -0700442 When this method is invoked when nPort in an output port, the
443 component will:
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800444 1. Populate the pTunnelSetup structure with the output port's
James Dong334de522012-03-12 12:47:14 -0700445 requirements and constraints for the tunnel.
446
447 When this method is invoked when nPort in an input port, the
448 component will:
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800449 1. Query the necessary parameters from the output port to
James Dong334de522012-03-12 12:47:14 -0700450 determine if the ports are compatible for tunneling
451 2. If the ports are compatible, the component should store
452 the tunnel step provided by the output port
453 3. Determine which port (either input or output) is the buffer
454 supplier, and call OMX_SetParameter on the output port to
455 indicate this selection.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800456
James Dong334de522012-03-12 12:47:14 -0700457 The component will return from this call within 5 msec.
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800458
James Dong334de522012-03-12 12:47:14 -0700459 @param [in] hComp
460 Handle of the component to be accessed. This is the component
461 handle returned by the call to the OMX_GetHandle method.
462 @param [in] nPort
463 nPort is used to select the port on the component to be used
464 for tunneling.
465 @param [in] hTunneledComp
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800466 Handle of the component to tunnel with. This is the component
James Dong334de522012-03-12 12:47:14 -0700467 handle returned by the call to the OMX_GetHandle method. When
468 this parameter is 0x0 the component should setup the port for
469 communication with the application / IL Client.
470 @param [in] nPortOutput
471 nPortOutput is used indicate the port the component should
472 tunnel with.
473 @param [in] pTunnelSetup
474 Pointer to the tunnel setup structure. When nPort is an output port
475 the component should populate the fields of this structure. When
476 When nPort is an input port the component should review the setup
477 provided by the component with the output port.
478 @return OMX_ERRORTYPE
479 If the command successfully executes, the return code will be
480 OMX_ErrorNone. Otherwise the appropriate OMX error will be returned.
481 @ingroup tun
482 */
483
484 OMX_ERRORTYPE (*ComponentTunnelRequest)(
485 OMX_IN OMX_HANDLETYPE hComp,
486 OMX_IN OMX_U32 nPort,
487 OMX_IN OMX_HANDLETYPE hTunneledComp,
488 OMX_IN OMX_U32 nTunneledPort,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800489 OMX_INOUT OMX_TUNNELSETUPTYPE* pTunnelSetup);
James Dong334de522012-03-12 12:47:14 -0700490
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800491 /** refer to OMX_UseBuffer in OMX_core.h or the OMX IL
James Dong334de522012-03-12 12:47:14 -0700492 specification for details on the UseBuffer method.
493 @ingroup buf
494 */
495 OMX_ERRORTYPE (*UseBuffer)(
496 OMX_IN OMX_HANDLETYPE hComponent,
497 OMX_INOUT OMX_BUFFERHEADERTYPE** ppBufferHdr,
498 OMX_IN OMX_U32 nPortIndex,
499 OMX_IN OMX_PTR pAppPrivate,
500 OMX_IN OMX_U32 nSizeBytes,
501 OMX_IN OMX_U8* pBuffer);
502
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800503 /** refer to OMX_AllocateBuffer in OMX_core.h or the OMX IL
James Dong334de522012-03-12 12:47:14 -0700504 specification for details on the AllocateBuffer method.
505 @ingroup buf
506 */
507 OMX_ERRORTYPE (*AllocateBuffer)(
508 OMX_IN OMX_HANDLETYPE hComponent,
509 OMX_INOUT OMX_BUFFERHEADERTYPE** ppBuffer,
510 OMX_IN OMX_U32 nPortIndex,
511 OMX_IN OMX_PTR pAppPrivate,
512 OMX_IN OMX_U32 nSizeBytes);
513
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800514 /** refer to OMX_FreeBuffer in OMX_core.h or the OMX IL
James Dong334de522012-03-12 12:47:14 -0700515 specification for details on the FreeBuffer method.
516 @ingroup buf
517 */
518 OMX_ERRORTYPE (*FreeBuffer)(
519 OMX_IN OMX_HANDLETYPE hComponent,
520 OMX_IN OMX_U32 nPortIndex,
521 OMX_IN OMX_BUFFERHEADERTYPE* pBuffer);
522
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800523 /** refer to OMX_EmptyThisBuffer in OMX_core.h or the OMX IL
James Dong334de522012-03-12 12:47:14 -0700524 specification for details on the EmptyThisBuffer method.
525 @ingroup buf
526 */
527 OMX_ERRORTYPE (*EmptyThisBuffer)(
528 OMX_IN OMX_HANDLETYPE hComponent,
529 OMX_IN OMX_BUFFERHEADERTYPE* pBuffer);
530
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800531 /** refer to OMX_FillThisBuffer in OMX_core.h or the OMX IL
James Dong334de522012-03-12 12:47:14 -0700532 specification for details on the FillThisBuffer method.
533 @ingroup buf
534 */
535 OMX_ERRORTYPE (*FillThisBuffer)(
536 OMX_IN OMX_HANDLETYPE hComponent,
537 OMX_IN OMX_BUFFERHEADERTYPE* pBuffer);
538
539 /** The SetCallbacks method is used by the core to specify the callback
540 structure from the application to the component. This is a blocking
541 call. The component will return from this call within 5 msec.
542 @param [in] hComponent
543 Handle of the component to be accessed. This is the component
544 handle returned by the call to the GetHandle function.
545 @param [in] pCallbacks
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800546 pointer to an OMX_CALLBACKTYPE structure used to provide the
James Dong334de522012-03-12 12:47:14 -0700547 callback information to the component
548 @param [in] pAppData
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800549 pointer to an application defined value. It is anticipated that
James Dong334de522012-03-12 12:47:14 -0700550 the application will pass a pointer to a data structure or a "this
551 pointer" in this area to allow the callback (in the application)
552 to determine the context of the call
553 @return OMX_ERRORTYPE
554 If the command successfully executes, the return code will be
555 OMX_ErrorNone. Otherwise the appropriate OMX error will be returned.
556 */
557 OMX_ERRORTYPE (*SetCallbacks)(
558 OMX_IN OMX_HANDLETYPE hComponent,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800559 OMX_IN OMX_CALLBACKTYPE* pCallbacks,
James Dong334de522012-03-12 12:47:14 -0700560 OMX_IN OMX_PTR pAppData);
561
562 /** ComponentDeInit method is used to deinitialize the component
563 providing a means to free any resources allocated at component
564 initialization. NOTE: After this call the component handle is
565 not valid for further use.
566 @param [in] hComponent
567 Handle of the component to be accessed. This is the component
568 handle returned by the call to the GetHandle function.
569 @return OMX_ERRORTYPE
570 If the command successfully executes, the return code will be
571 OMX_ErrorNone. Otherwise the appropriate OMX error will be returned.
572 */
573 OMX_ERRORTYPE (*ComponentDeInit)(
574 OMX_IN OMX_HANDLETYPE hComponent);
575
576 /** @ingroup buf */
577 OMX_ERRORTYPE (*UseEGLImage)(
578 OMX_IN OMX_HANDLETYPE hComponent,
579 OMX_INOUT OMX_BUFFERHEADERTYPE** ppBufferHdr,
580 OMX_IN OMX_U32 nPortIndex,
581 OMX_IN OMX_PTR pAppPrivate,
582 OMX_IN void* eglImage);
583
584 OMX_ERRORTYPE (*ComponentRoleEnum)(
585 OMX_IN OMX_HANDLETYPE hComponent,
Lajos Molnara1ae5a42014-11-06 17:05:46 -0800586 OMX_OUT OMX_U8 *cRole,
587 OMX_IN OMX_U32 nIndex);
James Dong334de522012-03-12 12:47:14 -0700588
589} OMX_COMPONENTTYPE;
590
591#ifdef __cplusplus
592}
593#endif /* __cplusplus */
594
595#endif
596/* File EOF */