• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ------------------------------------------------------------------
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 /*
19  * Copyright (c) 2008 The Khronos Group Inc.
20  *
21  * 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
27  * to the following conditions:
28  * The above copyright notice and this permission notice shall be included
29  * in all copies or substantial portions of the Software.
30  *
31  * 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
37  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38  *
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
51 extern "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
58  *  for this header file to compile successfully
59  */
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 */
67 typedef enum OMX_PORTDOMAINTYPE {
68     OMX_PortDomainAudio,
69     OMX_PortDomainVideo,
70     OMX_PortDomainImage,
71     OMX_PortDomainOther,
72     OMX_PortDomainKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
73     OMX_PortDomainVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
74     OMX_PortDomainMax = 0x7ffffff
75 } OMX_PORTDOMAINTYPE;
76 
77 /** @ingroup comp */
78 typedef 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
91                                         nBufferCountActual. A disabled port is always unpopulated.
92                                         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 */
106 typedef 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 */
110     OMX_U32 nU32;                     /**< U32 value */
111 } OMX_PARAM_U32TYPE;
112 
113 /** @ingroup rpm */
114 typedef enum OMX_SUSPENSIONPOLICYTYPE {
115     OMX_SuspensionDisabled, /**< No suspension; v1.0 behavior */
116     OMX_SuspensionEnabled,  /**< Suspension allowed */
117     OMX_SuspensionPolicyKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
118     OMX_SuspensionPolicyStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
119     OMX_SuspensionPolicyMax = 0x7fffffff
120 } OMX_SUSPENSIONPOLICYTYPE;
121 
122 /** @ingroup rpm */
123 typedef struct OMX_PARAM_SUSPENSIONPOLICYTYPE {
124     OMX_U32 nSize;
125     OMX_VERSIONTYPE nVersion;
126     OMX_SUSPENSIONPOLICYTYPE ePolicy;
127 } OMX_PARAM_SUSPENSIONPOLICYTYPE;
128 
129 /** @ingroup rpm */
130 typedef enum OMX_SUSPENSIONTYPE {
131     OMX_NotSuspended, /**< component is not suspended */
132     OMX_Suspended,    /**< component is suspended */
133     OMX_SuspensionKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
134     OMX_SuspensionVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
135     OMX_SuspendMax = 0x7FFFFFFF
136 } OMX_SUSPENSIONTYPE;
137 
138 /** @ingroup rpm */
139 typedef struct OMX_PARAM_SUSPENSIONTYPE {
140     OMX_U32 nSize;
141     OMX_VERSIONTYPE nVersion;
142     OMX_SUSPENSIONTYPE eType;
143 } OMX_PARAM_SUSPENSIONTYPE ;
144 
145 typedef struct OMX_CONFIG_BOOLEANTYPE {
146     OMX_U32 nSize;
147     OMX_VERSIONTYPE nVersion;
148     OMX_BOOL bEnabled;
149 } OMX_CONFIG_BOOLEANTYPE;
150 
151 /* Parameter specifying the content uri to use. */
152 /** @ingroup cp */
153 typedef 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 */
163 typedef 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 */
171 typedef struct OMX_RESOURCECONCEALMENTTYPE {
172     OMX_U32 nSize;             /**< size of the structure in bytes */
173     OMX_VERSIONTYPE nVersion;  /**< OMX specification version information */
174     OMX_BOOL bResourceConcealmentForbidden; /**< disallow the use of resource concealment
175                                             methods (like degrading algorithm quality to
176                                             lower resource consumption or functional bypass)
177                                             on a component as a resolution to resource conflicts. */
178 } OMX_RESOURCECONCEALMENTTYPE;
179 
180 
181 /** @ingroup metadata */
182 typedef 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,
191     OMX_MetadataCharsetUTF16LE,
192     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,
217     OMX_MetadataCharsetKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
218     OMX_MetadataCharsetVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
219     OMX_MetadataCharsetTypeMax= 0x7FFFFFFF
220 } OMX_METADATACHARSETTYPE;
221 
222 /** @ingroup metadata */
223 typedef enum OMX_METADATASCOPETYPE
224 {
225     OMX_MetadataScopeAllLevels,
226     OMX_MetadataScopeTopLevel,
227     OMX_MetadataScopePortLevel,
228     OMX_MetadataScopeNodeLevel,
229     OMX_MetadataScopeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
230     OMX_MetadataScopeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
231     OMX_MetadataScopeTypeMax = 0x7fffffff
232 } OMX_METADATASCOPETYPE;
233 
234 /** @ingroup metadata */
235 typedef enum OMX_METADATASEARCHMODETYPE
236 {
237     OMX_MetadataSearchValueSizeByIndex,
238     OMX_MetadataSearchItemByIndex,
239     OMX_MetadataSearchNextItemByKey,
240     OMX_MetadataSearchKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
241     OMX_MetadataSearchVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
242     OMX_MetadataSearchTypeMax = 0x7fffffff
243 } OMX_METADATASEARCHMODETYPE;
244 /** @ingroup metadata */
245 typedef 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 */
255 typedef struct OMX_CONFIG_METADATAITEMTYPE
256 {
257     OMX_U32 nSize;
258     OMX_VERSIONTYPE nVersion;
259     OMX_METADATASCOPETYPE eScopeMode;
260     OMX_U32 nScopeSpecifier;
261     OMX_U32 nMetadataItemIndex;
262     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 */
274 typedef 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 */
284 typedef struct OMX_CONFIG_CONTAINERNODEIDTYPE
285 {
286     OMX_U32 nSize;
287     OMX_VERSIONTYPE nVersion;
288     OMX_BOOL bAllKeys;
289     OMX_U32 nParentNodeID;
290     OMX_U32 nNodeIndex;
291     OMX_U32 nNodeID;
292     OMX_STRING cNodeName;
293     OMX_BOOL bIsLeafType;
294 } OMX_CONFIG_CONTAINERNODEIDTYPE;
295 
296 /** @ingroup metadata */
297 typedef 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
302                          * the three key fields below are ignored */
303     OMX_METADATACHARSETTYPE eKeyCharset;
304     OMX_U32 nKeySizeUsed;
305     OMX_U8   nKey [128];
306     OMX_U32 nLanguageCountrySizeUsed;
307     OMX_U8 nLanguageCountry[128];
308     OMX_BOOL bEnabled;  /* if true then key is part of filter (e.g.
309                          * retained for query later). If false then
310                          * key is not part of filter */
311 } OMX_PARAM_METADATAFILTERTYPE;
312 
313 /** The OMX_HANDLETYPE structure defines the component handle.  The component
314  *  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).
321  *
322  *  @ingroup comp
323  */
324 typedef 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 
332     /** 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
336         this structure found herein. */
337     OMX_VERSIONTYPE nVersion;
338 
339     /** 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
342         data area. */
343     OMX_PTR pComponentPrivate;
344 
345     /** 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
348         returned to the IL Client by OMX in all callbacks */
349     OMX_PTR pApplicationPrivate;
350 
351     /** refer to OMX_GetComponentVersion in OMX_core.h or the OMX IL
352         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 
361     /** refer to OMX_SendCommand in OMX_core.h or the OMX IL
362         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 
370     /** refer to OMX_GetParameter in OMX_core.h or the OMX IL
371         specification for details on the GetParameter method.
372      */
373     OMX_ERRORTYPE (*GetParameter)(
374             OMX_IN  OMX_HANDLETYPE hComponent,
375             OMX_IN  OMX_INDEXTYPE nParamIndex,
376             OMX_INOUT OMX_PTR pComponentParameterStructure);
377 
378 
379     /** refer to OMX_SetParameter in OMX_core.h or the OMX IL
380         specification for details on the SetParameter method.
381      */
382     OMX_ERRORTYPE (*SetParameter)(
383             OMX_IN  OMX_HANDLETYPE hComponent,
384             OMX_IN  OMX_INDEXTYPE nIndex,
385             OMX_IN  OMX_PTR pComponentParameterStructure);
386 
387 
388     /** refer to OMX_GetConfig in OMX_core.h or the OMX IL
389         specification for details on the GetConfig method.
390      */
391     OMX_ERRORTYPE (*GetConfig)(
392             OMX_IN  OMX_HANDLETYPE hComponent,
393             OMX_IN  OMX_INDEXTYPE nIndex,
394             OMX_INOUT OMX_PTR pComponentConfigStructure);
395 
396 
397     /** refer to OMX_SetConfig in OMX_core.h or the OMX IL
398         specification for details on the SetConfig method.
399      */
400     OMX_ERRORTYPE (*SetConfig)(
401             OMX_IN  OMX_HANDLETYPE hComponent,
402             OMX_IN  OMX_INDEXTYPE nIndex,
403             OMX_IN  OMX_PTR pComponentConfigStructure);
404 
405 
406     /** refer to OMX_GetExtensionIndex in OMX_core.h or the OMX IL
407         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 
415     /** refer to OMX_GetState in OMX_core.h or the OMX IL
416         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 
422 
423     /** The ComponentTunnelRequest method will interact with another OMX
424         component to determine if tunneling is possible and to setup the
425         tunneling.  The return codes for this method can be used to
426         determine if tunneling is not possible, or if tunneling is not
427         supported.
428 
429         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.
434         A component may also support proprietary communication.
435 
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 
442         When this method is invoked when nPort in an output port, the
443         component will:
444         1.  Populate the pTunnelSetup structure with the output port's
445             requirements and constraints for the tunnel.
446 
447         When this method is invoked when nPort in an input port, the
448         component will:
449         1.  Query the necessary parameters from the output port to
450             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.
456 
457         The component will return from this call within 5 msec.
458 
459         @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
466             Handle of the component to tunnel with.  This is the component
467             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,
489         OMX_INOUT  OMX_TUNNELSETUPTYPE* pTunnelSetup);
490 
491     /** refer to OMX_UseBuffer in OMX_core.h or the OMX IL
492         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 
503     /** refer to OMX_AllocateBuffer in OMX_core.h or the OMX IL
504         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 
514     /** refer to OMX_FreeBuffer in OMX_core.h or the OMX IL
515         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 
523     /** refer to OMX_EmptyThisBuffer in OMX_core.h or the OMX IL
524         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 
531     /** refer to OMX_FillThisBuffer in OMX_core.h or the OMX IL
532         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
546             pointer to an OMX_CALLBACKTYPE structure used to provide the
547             callback information to the component
548         @param [in] pAppData
549             pointer to an application defined value.  It is anticipated that
550             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,
559             OMX_IN  OMX_CALLBACKTYPE* pCallbacks,
560             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,
586         OMX_OUT OMX_U8 *cRole,
587         OMX_IN OMX_U32 nIndex);
588 
589 } OMX_COMPONENTTYPE;
590 
591 #ifdef __cplusplus
592 }
593 #endif /* __cplusplus */
594 
595 #endif
596 /* File EOF */
597