1334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* ------------------------------------------------------------------
2334de520b0369215b7931fefa424fb92d295f0ebJames Dong * Copyright (C) 1998-2009 PacketVideo
3334de520b0369215b7931fefa424fb92d295f0ebJames Dong *
4334de520b0369215b7931fefa424fb92d295f0ebJames Dong * Licensed under the Apache License, Version 2.0 (the "License");
5334de520b0369215b7931fefa424fb92d295f0ebJames Dong * you may not use this file except in compliance with the License.
6334de520b0369215b7931fefa424fb92d295f0ebJames Dong * You may obtain a copy of the License at
7334de520b0369215b7931fefa424fb92d295f0ebJames Dong *
8334de520b0369215b7931fefa424fb92d295f0ebJames Dong *      http://www.apache.org/licenses/LICENSE-2.0
9334de520b0369215b7931fefa424fb92d295f0ebJames Dong *
10334de520b0369215b7931fefa424fb92d295f0ebJames Dong * Unless required by applicable law or agreed to in writing, software
11334de520b0369215b7931fefa424fb92d295f0ebJames Dong * distributed under the License is distributed on an "AS IS" BASIS,
12334de520b0369215b7931fefa424fb92d295f0ebJames Dong * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13334de520b0369215b7931fefa424fb92d295f0ebJames Dong * express or implied.
14334de520b0369215b7931fefa424fb92d295f0ebJames Dong * See the License for the specific language governing permissions
15334de520b0369215b7931fefa424fb92d295f0ebJames Dong * and limitations under the License.
16334de520b0369215b7931fefa424fb92d295f0ebJames Dong * -------------------------------------------------------------------
17334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
18334de520b0369215b7931fefa424fb92d295f0ebJames Dong/*
19a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar * Copyright (c) 2008 The Khronos Group Inc.
20a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar *
21334de520b0369215b7931fefa424fb92d295f0ebJames Dong * Permission is hereby granted, free of charge, to any person obtaining
22334de520b0369215b7931fefa424fb92d295f0ebJames Dong * a copy of this software and associated documentation files (the
23334de520b0369215b7931fefa424fb92d295f0ebJames Dong * "Software"), to deal in the Software without restriction, including
24334de520b0369215b7931fefa424fb92d295f0ebJames Dong * without limitation the rights to use, copy, modify, merge, publish,
25334de520b0369215b7931fefa424fb92d295f0ebJames Dong * distribute, sublicense, and/or sell copies of the Software, and to
26334de520b0369215b7931fefa424fb92d295f0ebJames Dong * permit persons to whom the Software is furnished to do so, subject
27a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar * to the following conditions:
28334de520b0369215b7931fefa424fb92d295f0ebJames Dong * The above copyright notice and this permission notice shall be included
29a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar * in all copies or substantial portions of the Software.
30a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar *
31334de520b0369215b7931fefa424fb92d295f0ebJames Dong * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
32334de520b0369215b7931fefa424fb92d295f0ebJames Dong * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
33334de520b0369215b7931fefa424fb92d295f0ebJames Dong * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
34334de520b0369215b7931fefa424fb92d295f0ebJames Dong * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
35334de520b0369215b7931fefa424fb92d295f0ebJames Dong * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
36334de520b0369215b7931fefa424fb92d295f0ebJames Dong * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
37a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38334de520b0369215b7931fefa424fb92d295f0ebJames Dong *
39334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
40334de520b0369215b7931fefa424fb92d295f0ebJames Dong
41334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** OMX_Core.h - OpenMax IL version 1.1.2
42334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  The OMX_Core header file contains the definitions used by both the
43334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  application and the component to access common items.
44334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
45334de520b0369215b7931fefa424fb92d295f0ebJames Dong
46334de520b0369215b7931fefa424fb92d295f0ebJames Dong#ifndef OMX_Core_h
47334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_Core_h
48334de520b0369215b7931fefa424fb92d295f0ebJames Dong
49334de520b0369215b7931fefa424fb92d295f0ebJames Dong#ifdef __cplusplus
50334de520b0369215b7931fefa424fb92d295f0ebJames Dongextern "C" {
51334de520b0369215b7931fefa424fb92d295f0ebJames Dong#endif /* __cplusplus */
52334de520b0369215b7931fefa424fb92d295f0ebJames Dong
53334de520b0369215b7931fefa424fb92d295f0ebJames Dong
54334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* Each OMX header shall include all required header files to allow the
55334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  header to compile without errors.  The includes below are required
56a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar *  for this header file to compile successfully
57334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
58334de520b0369215b7931fefa424fb92d295f0ebJames Dong
59334de520b0369215b7931fefa424fb92d295f0ebJames Dong#include <OMX_Index.h>
60334de520b0369215b7931fefa424fb92d295f0ebJames Dong
61334de520b0369215b7931fefa424fb92d295f0ebJames Dong
62334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_COMMANDTYPE enumeration is used to specify the action in the
63a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar *  OMX_SendCommand macro.
64334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  @ingroup core
65334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
66334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef enum OMX_COMMANDTYPE
67334de520b0369215b7931fefa424fb92d295f0ebJames Dong{
68334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_CommandStateSet,    /**< Change the component state */
69334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_CommandFlush,       /**< Flush the data queue(s) of a component */
70334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_CommandPortDisable, /**< Disable a port on a component. */
71334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_CommandPortEnable,  /**< Enable a port on a component. */
72334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_CommandMarkBuffer,  /**< Mark a component/buffer for observation */
73a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    OMX_CommandKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
74334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_CommandVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
75334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_CommandMax = 0X7FFFFFFF
76334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_COMMANDTYPE;
77334de520b0369215b7931fefa424fb92d295f0ebJames Dong
78334de520b0369215b7931fefa424fb92d295f0ebJames Dong
79334de520b0369215b7931fefa424fb92d295f0ebJames Dong
80334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_STATETYPE enumeration is used to indicate or change the component
81334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  state.  This enumeration reflects the current state of the component when
82334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  used with the OMX_GetState macro or becomes the parameter in a state change
83334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  command when used with the OMX_SendCommand macro.
84334de520b0369215b7931fefa424fb92d295f0ebJames Dong *
85334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  The component will be in the Loaded state after the component is initially
86334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  loaded into memory.  In the Loaded state, the component is not allowed to
87334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  allocate or hold resources other than to build it's internal parameter
88334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  and configuration tables.  The application will send one or more
89334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  SetParameters/GetParameters and SetConfig/GetConfig commands to the
90334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  component and the component will record each of these parameter and
91334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  configuration changes for use later.  When the application sends the
92334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  Idle command, the component will acquire the resources needed for the
93334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  specified configuration and will transition to the idle state if the
94334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  allocation is successful.  If the component cannot successfully
95334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  transition to the idle state for any reason, the state of the component
96a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar *  shall be fully rolled back to the Loaded state (e.g. all allocated
97334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  resources shall be released).  When the component receives the command
98334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  to go to the Executing state, it shall begin processing buffers by
99334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  sending all input buffers it holds to the application.  While
100334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  the component is in the Idle state, the application may also send the
101334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  Pause command.  If the component receives the pause command while in the
102a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar *  Idle state, the component shall send all input buffers it holds to the
103334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  application, but shall not begin processing buffers.  This will allow the
104334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  application to prefill buffers.
105a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar *
106334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  @ingroup comp
107334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
108334de520b0369215b7931fefa424fb92d295f0ebJames Dong
109334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef enum OMX_STATETYPE
110334de520b0369215b7931fefa424fb92d295f0ebJames Dong{
111a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    OMX_StateInvalid,      /**< component has detected that it's internal data
112334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                structures are corrupted to the point that
113334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                it cannot determine it's state properly */
114334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_StateLoaded,      /**< component has been loaded but has not completed
115334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                initialization.  The OMX_SetParameter macro
116a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar                                and the OMX_GetParameter macro are the only
117a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar                                valid macros allowed to be sent to the
118334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                component in this state. */
119334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_StateIdle,        /**< component initialization has been completed
120334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                successfully and the component is ready to
121334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                to start. */
122334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_StateExecuting,   /**< component has accepted the start command and
123334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                is processing data (if data is available) */
124334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_StatePause,       /**< component has received pause command */
125a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    OMX_StateWaitForResources, /**< component is waiting for resources, either after
126334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                preemption or before it gets the resources requested.
127334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                See specification for complete details. */
128a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    OMX_StateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
129334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_StateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
130334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_StateMax = 0X7FFFFFFF
131334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_STATETYPE;
132334de520b0369215b7931fefa424fb92d295f0ebJames Dong
133a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/** The OMX_ERRORTYPE enumeration defines the standard OMX Errors.  These
134a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar *  errors should cover most of the common failure cases.  However,
135a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar *  vendors are free to add additional error messages of their own as
136334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  long as they follow these rules:
137334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  1.  Vendor error messages shall be in the range of 0x90000000 to
138334de520b0369215b7931fefa424fb92d295f0ebJames Dong *      0x9000FFFF.
139334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  2.  Vendor error messages shall be defined in a header file provided
140334de520b0369215b7931fefa424fb92d295f0ebJames Dong *      with the component.  No error messages are allowed that are
141334de520b0369215b7931fefa424fb92d295f0ebJames Dong *      not defined.
142334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
143334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef enum OMX_ERRORTYPE
144334de520b0369215b7931fefa424fb92d295f0ebJames Dong{
145334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorNone = 0,
146334de520b0369215b7931fefa424fb92d295f0ebJames Dong
147334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** There were insufficient resources to perform the requested operation */
148334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorInsufficientResources = (OMX_S32) 0x80001000,
149334de520b0369215b7931fefa424fb92d295f0ebJames Dong
150334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** There was an error, but the cause of the error could not be determined */
151334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorUndefined = (OMX_S32) 0x80001001,
152334de520b0369215b7931fefa424fb92d295f0ebJames Dong
153334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** The component name string was not valid */
154334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorInvalidComponentName = (OMX_S32) 0x80001002,
155334de520b0369215b7931fefa424fb92d295f0ebJames Dong
156334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** No component with the specified name string was found */
157334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorComponentNotFound = (OMX_S32) 0x80001003,
158334de520b0369215b7931fefa424fb92d295f0ebJames Dong
159334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** The component specified did not have a "OMX_ComponentInit" or
160334de520b0369215b7931fefa424fb92d295f0ebJames Dong      "OMX_ComponentDeInit entry point */
161334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorInvalidComponent = (OMX_S32) 0x80001004,
162334de520b0369215b7931fefa424fb92d295f0ebJames Dong
163334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** One or more parameters were not valid */
164334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorBadParameter = (OMX_S32) 0x80001005,
165334de520b0369215b7931fefa424fb92d295f0ebJames Dong
166334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** The requested function is not implemented */
167334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorNotImplemented = (OMX_S32) 0x80001006,
168334de520b0369215b7931fefa424fb92d295f0ebJames Dong
169334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** The buffer was emptied before the next buffer was ready */
170334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorUnderflow = (OMX_S32) 0x80001007,
171334de520b0369215b7931fefa424fb92d295f0ebJames Dong
172334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** The buffer was not available when it was needed */
173334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorOverflow = (OMX_S32) 0x80001008,
174334de520b0369215b7931fefa424fb92d295f0ebJames Dong
175334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** The hardware failed to respond as expected */
176334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorHardware = (OMX_S32) 0x80001009,
177334de520b0369215b7931fefa424fb92d295f0ebJames Dong
178334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** The component is in the state OMX_StateInvalid */
179334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorInvalidState = (OMX_S32) 0x8000100A,
180334de520b0369215b7931fefa424fb92d295f0ebJames Dong
181334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** Stream is found to be corrupt */
182334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorStreamCorrupt = (OMX_S32) 0x8000100B,
183334de520b0369215b7931fefa424fb92d295f0ebJames Dong
184334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** Ports being connected are not compatible */
185334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorPortsNotCompatible = (OMX_S32) 0x8000100C,
186334de520b0369215b7931fefa424fb92d295f0ebJames Dong
187334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** Resources allocated to an idle component have been
188334de520b0369215b7931fefa424fb92d295f0ebJames Dong      lost resulting in the component returning to the loaded state */
189334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorResourcesLost = (OMX_S32) 0x8000100D,
190334de520b0369215b7931fefa424fb92d295f0ebJames Dong
191334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** No more indicies can be enumerated */
192334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorNoMore = (OMX_S32) 0x8000100E,
193334de520b0369215b7931fefa424fb92d295f0ebJames Dong
194334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** The component detected a version mismatch */
195334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorVersionMismatch = (OMX_S32) 0x8000100F,
196334de520b0369215b7931fefa424fb92d295f0ebJames Dong
197334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** The component is not ready to return data at this time */
198334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorNotReady = (OMX_S32) 0x80001010,
199334de520b0369215b7931fefa424fb92d295f0ebJames Dong
200334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** There was a timeout that occurred */
201334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorTimeout = (OMX_S32) 0x80001011,
202334de520b0369215b7931fefa424fb92d295f0ebJames Dong
203334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** This error occurs when trying to transition into the state you are already in */
204334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorSameState = (OMX_S32) 0x80001012,
205334de520b0369215b7931fefa424fb92d295f0ebJames Dong
206a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar  /** Resources allocated to an executing or paused component have been
207334de520b0369215b7931fefa424fb92d295f0ebJames Dong      preempted, causing the component to return to the idle state */
208a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar  OMX_ErrorResourcesPreempted = (OMX_S32) 0x80001013,
209334de520b0369215b7931fefa424fb92d295f0ebJames Dong
210a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar  /** A non-supplier port sends this error to the IL client (via the EventHandler callback)
211334de520b0369215b7931fefa424fb92d295f0ebJames Dong      during the allocation of buffers (on a transition from the LOADED to the IDLE state or
212a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar      on a port restart) when it deems that it has waited an unusually long time for the supplier
213334de520b0369215b7931fefa424fb92d295f0ebJames Dong      to send it an allocated buffer via a UseBuffer call. */
214334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorPortUnresponsiveDuringAllocation = (OMX_S32) 0x80001014,
215334de520b0369215b7931fefa424fb92d295f0ebJames Dong
216a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar  /** A non-supplier port sends this error to the IL client (via the EventHandler callback)
217a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar      during the deallocation of buffers (on a transition from the IDLE to LOADED state or
218a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar      on a port stop) when it deems that it has waited an unusually long time for the supplier
219334de520b0369215b7931fefa424fb92d295f0ebJames Dong      to request the deallocation of a buffer header via a FreeBuffer call. */
220334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorPortUnresponsiveDuringDeallocation = (OMX_S32) 0x80001015,
221334de520b0369215b7931fefa424fb92d295f0ebJames Dong
222a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar  /** A supplier port sends this error to the IL client (via the EventHandler callback)
223a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar      during the stopping of a port (either on a transition from the IDLE to LOADED
224a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar      state or a port stop) when it deems that it has waited an unusually long time for
225334de520b0369215b7931fefa424fb92d295f0ebJames Dong      the non-supplier to return a buffer via an EmptyThisBuffer or FillThisBuffer call. */
226334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorPortUnresponsiveDuringStop = (OMX_S32) 0x80001016,
227334de520b0369215b7931fefa424fb92d295f0ebJames Dong
228334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** Attempting a state transtion that is not allowed */
229334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorIncorrectStateTransition = (OMX_S32) 0x80001017,
230334de520b0369215b7931fefa424fb92d295f0ebJames Dong
231334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /* Attempting a command that is not allowed during the present state. */
232a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar  OMX_ErrorIncorrectStateOperation = (OMX_S32) 0x80001018,
233334de520b0369215b7931fefa424fb92d295f0ebJames Dong
234334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** The values encapsulated in the parameter or config structure are not supported. */
235334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorUnsupportedSetting = (OMX_S32) 0x80001019,
236334de520b0369215b7931fefa424fb92d295f0ebJames Dong
237334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** The parameter or config indicated by the given index is not supported. */
238334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorUnsupportedIndex = (OMX_S32) 0x8000101A,
239334de520b0369215b7931fefa424fb92d295f0ebJames Dong
240334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** The port index supplied is incorrect. */
241334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorBadPortIndex = (OMX_S32) 0x8000101B,
242334de520b0369215b7931fefa424fb92d295f0ebJames Dong
243334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** The port has lost one or more of its buffers and it thus unpopulated. */
244334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorPortUnpopulated = (OMX_S32) 0x8000101C,
245334de520b0369215b7931fefa424fb92d295f0ebJames Dong
246334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** Component suspended due to temporary loss of resources */
247334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorComponentSuspended = (OMX_S32) 0x8000101D,
248334de520b0369215b7931fefa424fb92d295f0ebJames Dong
249334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** Component suspended due to an inability to acquire dynamic resources */
250334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorDynamicResourcesUnavailable = (OMX_S32) 0x8000101E,
251334de520b0369215b7931fefa424fb92d295f0ebJames Dong
252a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar  /** When the macroblock error reporting is enabled the component returns new error
253334de520b0369215b7931fefa424fb92d295f0ebJames Dong  for every frame that has errors */
254334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorMbErrorsInFrame = (OMX_S32) 0x8000101F,
255334de520b0369215b7931fefa424fb92d295f0ebJames Dong
256334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** A component reports this error when it cannot parse or determine the format of an input stream. */
257a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar  OMX_ErrorFormatNotDetected = (OMX_S32) 0x80001020,
258334de520b0369215b7931fefa424fb92d295f0ebJames Dong
259334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** The content open operation failed. */
260334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorContentPipeOpenFailed = (OMX_S32) 0x80001021,
261334de520b0369215b7931fefa424fb92d295f0ebJames Dong
262334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** The content creation operation failed. */
263334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorContentPipeCreationFailed = (OMX_S32) 0x80001022,
264334de520b0369215b7931fefa424fb92d295f0ebJames Dong
265334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** Separate table information is being used */
266334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorSeperateTablesUsed = (OMX_S32) 0x80001023,
267334de520b0369215b7931fefa424fb92d295f0ebJames Dong
268334de520b0369215b7931fefa424fb92d295f0ebJames Dong  /** Tunneling is unsupported by the component*/
269334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorTunnelingUnsupported = (OMX_S32) 0x80001024,
270334de520b0369215b7931fefa424fb92d295f0ebJames Dong
271a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar  OMX_ErrorKhronosExtensions = (OMX_S32)0x8F000000, /**< Reserved region for introducing Khronos Standard Extensions */
272334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorVendorStartUnused = (OMX_S32)0x90000000, /**< Reserved region for introducing Vendor Extensions */
273334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_ErrorMax = 0x7FFFFFFF
274334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_ERRORTYPE;
275334de520b0369215b7931fefa424fb92d295f0ebJames Dong
276334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** @ingroup core */
277334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef OMX_ERRORTYPE (* OMX_COMPONENTINITTYPE)(OMX_IN  OMX_HANDLETYPE hComponent);
278334de520b0369215b7931fefa424fb92d295f0ebJames Dong
279334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** @ingroup core */
280334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef struct OMX_COMPONENTREGISTERTYPE
281334de520b0369215b7931fefa424fb92d295f0ebJames Dong{
282334de520b0369215b7931fefa424fb92d295f0ebJames Dong  const char          * pName;       /* Component name, 128 byte limit (including '\0') applies */
283334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_COMPONENTINITTYPE pInitialize; /* Component instance initialization function */
284334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_COMPONENTREGISTERTYPE;
285334de520b0369215b7931fefa424fb92d295f0ebJames Dong
286334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** @ingroup core */
287334de520b0369215b7931fefa424fb92d295f0ebJames Dongextern OMX_COMPONENTREGISTERTYPE OMX_ComponentRegistered[];
288334de520b0369215b7931fefa424fb92d295f0ebJames Dong
289334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** @ingroup rpm */
290334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef struct OMX_PRIORITYMGMTTYPE {
291334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nSize;             /**< size of the structure in bytes */
292334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_VERSIONTYPE nVersion;  /**< OMX specification version information */
293334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nGroupPriority;            /**< Priority of the component group */
294334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nGroupID;                  /**< ID of the component group */
295334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_PRIORITYMGMTTYPE;
296334de520b0369215b7931fefa424fb92d295f0ebJames Dong
297334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* Component name and Role names are limited to 128 characters including the terminating '\0'. */
298334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_MAX_STRINGNAME_SIZE 128
299334de520b0369215b7931fefa424fb92d295f0ebJames Dong
300334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** @ingroup comp */
301334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef struct OMX_PARAM_COMPONENTROLETYPE {
302334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_U32 nSize;              /**< size of the structure in bytes */
303334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_VERSIONTYPE nVersion;   /**< OMX specification version information */
304334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_U8 cRole[OMX_MAX_STRINGNAME_SIZE];  /**< name of standard component which defines component role */
305334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_PARAM_COMPONENTROLETYPE;
306334de520b0369215b7931fefa424fb92d295f0ebJames Dong
307a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/** End of Stream Buffer Flag:
308334de520b0369215b7931fefa424fb92d295f0ebJames Dong  *
309a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar  * A component sets EOS when it has no more data to emit on a particular
310a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar  * output port. Thus an output port shall set EOS on the last buffer it
311a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar  * emits. A component's determination of when an output port should
312334de520b0369215b7931fefa424fb92d295f0ebJames Dong  * cease sending data is implemenation specific.
313334de520b0369215b7931fefa424fb92d295f0ebJames Dong  * @ingroup buf
314334de520b0369215b7931fefa424fb92d295f0ebJames Dong  */
315334de520b0369215b7931fefa424fb92d295f0ebJames Dong
316a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar#define OMX_BUFFERFLAG_EOS 0x00000001
317334de520b0369215b7931fefa424fb92d295f0ebJames Dong
318a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/** Start Time Buffer Flag:
319334de520b0369215b7931fefa424fb92d295f0ebJames Dong *
320334de520b0369215b7931fefa424fb92d295f0ebJames Dong * The source of a stream (e.g. a demux component) sets the STARTTIME
321334de520b0369215b7931fefa424fb92d295f0ebJames Dong * flag on the buffer that contains the starting timestamp for the
322334de520b0369215b7931fefa424fb92d295f0ebJames Dong * stream. The starting timestamp corresponds to the first data that
323334de520b0369215b7931fefa424fb92d295f0ebJames Dong * should be displayed at startup or after a seek.
324334de520b0369215b7931fefa424fb92d295f0ebJames Dong * The first timestamp of the stream is not necessarily the start time.
325a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar * For instance, in the case of a seek to a particular video frame,
326a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar * the target frame may be an interframe. Thus the first buffer of
327334de520b0369215b7931fefa424fb92d295f0ebJames Dong * the stream will be the intra-frame preceding the target frame and
328334de520b0369215b7931fefa424fb92d295f0ebJames Dong * the starttime will occur with the target frame (with any other
329334de520b0369215b7931fefa424fb92d295f0ebJames Dong * required frames required to reconstruct the target intervening).
330334de520b0369215b7931fefa424fb92d295f0ebJames Dong *
331a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar * The STARTTIME flag is directly associated with the buffer's
332a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar * timestamp ' thus its association to buffer data and its
333334de520b0369215b7931fefa424fb92d295f0ebJames Dong * propagation is identical to the timestamp's.
334334de520b0369215b7931fefa424fb92d295f0ebJames Dong *
335a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar * When a Sync Component client receives a buffer with the
336a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar * STARTTIME flag it shall perform a SetConfig on its sync port
337334de520b0369215b7931fefa424fb92d295f0ebJames Dong * using OMX_ConfigTimeClientStartTime and passing the buffer's
338334de520b0369215b7931fefa424fb92d295f0ebJames Dong * timestamp.
339a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar *
340334de520b0369215b7931fefa424fb92d295f0ebJames Dong * @ingroup buf
341334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
342334de520b0369215b7931fefa424fb92d295f0ebJames Dong
343334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_BUFFERFLAG_STARTTIME 0x00000002
344334de520b0369215b7931fefa424fb92d295f0ebJames Dong
345334de520b0369215b7931fefa424fb92d295f0ebJames Dong
346a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
347a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/** Decode Only Buffer Flag:
348334de520b0369215b7931fefa424fb92d295f0ebJames Dong *
349334de520b0369215b7931fefa424fb92d295f0ebJames Dong * The source of a stream (e.g. a demux component) sets the DECODEONLY
350334de520b0369215b7931fefa424fb92d295f0ebJames Dong * flag on any buffer that should shall be decoded but should not be
351a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar * displayed. This flag is used, for instance, when a source seeks to
352a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar * a target interframe that requires the decode of frames preceding the
353a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar * target to facilitate the target's reconstruction. In this case the
354a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar * source would emit the frames preceding the target downstream
355334de520b0369215b7931fefa424fb92d295f0ebJames Dong * but mark them as decode only.
356334de520b0369215b7931fefa424fb92d295f0ebJames Dong *
357a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar * The DECODEONLY is associated with buffer data and propagated in a
358334de520b0369215b7931fefa424fb92d295f0ebJames Dong * manner identical to the buffer timestamp.
359334de520b0369215b7931fefa424fb92d295f0ebJames Dong *
360a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar * A component that renders data should ignore all buffers with
361334de520b0369215b7931fefa424fb92d295f0ebJames Dong * the DECODEONLY flag set.
362a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar *
363334de520b0369215b7931fefa424fb92d295f0ebJames Dong * @ingroup buf
364334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
365334de520b0369215b7931fefa424fb92d295f0ebJames Dong
366334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_BUFFERFLAG_DECODEONLY 0x00000004
367334de520b0369215b7931fefa424fb92d295f0ebJames Dong
368334de520b0369215b7931fefa424fb92d295f0ebJames Dong
369a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/* Data Corrupt Flag: This flag is set when the IL client believes the data in the associated buffer is corrupt
370334de520b0369215b7931fefa424fb92d295f0ebJames Dong * @ingroup buf
371334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
372334de520b0369215b7931fefa424fb92d295f0ebJames Dong
373334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_BUFFERFLAG_DATACORRUPT 0x00000008
374334de520b0369215b7931fefa424fb92d295f0ebJames Dong
375334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* End of Frame: The buffer contains exactly one end of frame and no data
376334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  occurs after the end of frame. This flag is an optional hint. The absence
377a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar *  of this flag does not imply the absence of an end of frame within the buffer.
378334de520b0369215b7931fefa424fb92d295f0ebJames Dong * @ingroup buf
379334de520b0369215b7931fefa424fb92d295f0ebJames Dong*/
380334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_BUFFERFLAG_ENDOFFRAME 0x00000010
381334de520b0369215b7931fefa424fb92d295f0ebJames Dong
382a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/* Sync Frame Flag: This flag is set when the buffer content contains a coded sync frame '
383a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar *  a frame that has no dependency on any other frame information
384334de520b0369215b7931fefa424fb92d295f0ebJames Dong *  @ingroup buf
385334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
386334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_BUFFERFLAG_SYNCFRAME 0x00000020
387334de520b0369215b7931fefa424fb92d295f0ebJames Dong
388334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* Extra data present flag: there is extra data appended to the data stream
389a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar * residing in the buffer
390a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar * @ingroup buf
391334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
392334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_BUFFERFLAG_EXTRADATA 0x00000040
393334de520b0369215b7931fefa424fb92d295f0ebJames Dong
394a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/** Codec Config Buffer Flag:
395334de520b0369215b7931fefa424fb92d295f0ebJames Dong* OMX_BUFFERFLAG_CODECCONFIG is an optional flag that is set by an
396334de520b0369215b7931fefa424fb92d295f0ebJames Dong* output port when all bytes in the buffer form part or all of a set of
397334de520b0369215b7931fefa424fb92d295f0ebJames Dong* codec specific configuration data.  Examples include SPS/PPS nal units
398334de520b0369215b7931fefa424fb92d295f0ebJames Dong* for OMX_VIDEO_CodingAVC or AudioSpecificConfig data for
399a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar* OMX_AUDIO_CodingAAC.  Any component that for a given stream sets
400334de520b0369215b7931fefa424fb92d295f0ebJames Dong* OMX_BUFFERFLAG_CODECCONFIG shall not mix codec configuration bytes
401334de520b0369215b7931fefa424fb92d295f0ebJames Dong* with frame data in the same buffer, and shall send all buffers
402334de520b0369215b7931fefa424fb92d295f0ebJames Dong* containing codec configuration bytes before any buffers containing
403334de520b0369215b7931fefa424fb92d295f0ebJames Dong* frame data that those configurations bytes describe.
404334de520b0369215b7931fefa424fb92d295f0ebJames Dong* If the stream format for a particular codec has a frame specific
405334de520b0369215b7931fefa424fb92d295f0ebJames Dong* header at the start of each frame, for example OMX_AUDIO_CodingMP3 or
406334de520b0369215b7931fefa424fb92d295f0ebJames Dong* OMX_AUDIO_CodingAAC in ADTS mode, then these shall be presented as
407334de520b0369215b7931fefa424fb92d295f0ebJames Dong* normal without setting OMX_BUFFERFLAG_CODECCONFIG.
408334de520b0369215b7931fefa424fb92d295f0ebJames Dong * @ingroup buf
409334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
410334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_BUFFERFLAG_CODECCONFIG 0x00000080
411334de520b0369215b7931fefa424fb92d295f0ebJames Dong
412334de520b0369215b7931fefa424fb92d295f0ebJames Dong
413334de520b0369215b7931fefa424fb92d295f0ebJames Dong
414334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** @ingroup buf */
415334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef struct OMX_BUFFERHEADERTYPE
416334de520b0369215b7931fefa424fb92d295f0ebJames Dong{
417334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_U32 nSize;              /**< size of the structure in bytes */
418334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_VERSIONTYPE nVersion;   /**< OMX specification version information */
419a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    OMX_U8* pBuffer;            /**< Pointer to actual block of memory
420334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     that is acting as the buffer */
421334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_U32 nAllocLen;          /**< size of the buffer allocated, in bytes */
422a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    OMX_U32 nFilledLen;         /**< number of bytes currently in the
423334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     buffer */
424334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_U32 nOffset;            /**< start offset of valid data in bytes from
425334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     the start of the buffer */
426334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_PTR pAppPrivate;        /**< pointer to any data the application
427334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     wants to associate with this buffer */
428334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_PTR pPlatformPrivate;   /**< pointer to any data the platform
429a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar                                     wants to associate with this buffer */
430334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_PTR pInputPortPrivate;  /**< pointer to any data the input port
431334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     wants to associate with this buffer */
432334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_PTR pOutputPortPrivate; /**< pointer to any data the output port
433334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     wants to associate with this buffer */
434a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    OMX_HANDLETYPE hMarkTargetComponent; /**< The component that will generate a
435334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                              mark event upon processing this buffer. */
436a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    OMX_PTR pMarkData;          /**< Application specific data associated with
437a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar                                     the mark sent on a mark event to disambiguate
438334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     this mark from others. */
439334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_U32 nTickCount;         /**< Optional entry that the component and
440334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     application can update with a tick count
441334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     when they access the component.  This
442334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     value should be in microseconds.  Since
443334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     this is a value relative to an arbitrary
444a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar                                     starting point, this value cannot be used
445334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     to determine absolute time.  This is an
446334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     optional entry and not all components
447334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     will update it.*/
448a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar OMX_TICKS nTimeStamp;          /**< Timestamp corresponding to the sample
449a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar                                     starting at the first logical sample
450a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar                                     boundary in the buffer. Timestamps of
451334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     successive samples within the buffer may
452a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar                                     be inferred by adding the duration of the
453334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     of the preceding buffer to the timestamp
454334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     of the preceding buffer.*/
455334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_U32     nFlags;           /**< buffer specific flags */
456a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar  OMX_U32 nOutputPortIndex;     /**< The index of the output port (if any) using
457334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     this buffer */
458334de520b0369215b7931fefa424fb92d295f0ebJames Dong  OMX_U32 nInputPortIndex;      /**< The index of the input port (if any) using
459334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                     this buffer */
460334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_BUFFERHEADERTYPE;
461334de520b0369215b7931fefa424fb92d295f0ebJames Dong
462a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/** The OMX_EXTRADATATYPE enumeration is used to define the
463334de520b0369215b7931fefa424fb92d295f0ebJames Dong * possible extra data payload types.
464334de520b0369215b7931fefa424fb92d295f0ebJames Dong * NB: this enum is binary backwards compatible with the previous
465334de520b0369215b7931fefa424fb92d295f0ebJames Dong * OMX_EXTRADATA_QUANT define.  This should be replaced with
466334de520b0369215b7931fefa424fb92d295f0ebJames Dong * OMX_ExtraDataQuantization.
467334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
468334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef enum OMX_EXTRADATATYPE
469334de520b0369215b7931fefa424fb92d295f0ebJames Dong{
470a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar   OMX_ExtraDataNone = 0,                       /**< Indicates that no more extra data sections follow */
471334de520b0369215b7931fefa424fb92d295f0ebJames Dong   OMX_ExtraDataQuantization,                   /**< The data payload contains quantization data */
472a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar   OMX_ExtraDataKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
473334de520b0369215b7931fefa424fb92d295f0ebJames Dong   OMX_ExtraDataVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
474334de520b0369215b7931fefa424fb92d295f0ebJames Dong   OMX_ExtraDataMax = 0x7FFFFFFF
475334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_EXTRADATATYPE;
476334de520b0369215b7931fefa424fb92d295f0ebJames Dong
477334de520b0369215b7931fefa424fb92d295f0ebJames Dong
478334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef struct OMX_OTHER_EXTRADATATYPE  {
479334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_U32 nSize;
480a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    OMX_VERSIONTYPE nVersion;
481334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_U32 nPortIndex;
482334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_EXTRADATATYPE eType;       /* Extra Data type */
483334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_U32 nDataSize;   /* Size of the supporting data to follow */
484334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_U8  data[1];     /* Supporting data hint  */
485334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_OTHER_EXTRADATATYPE;
486334de520b0369215b7931fefa424fb92d295f0ebJames Dong
487334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** @ingroup comp */
488334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef struct OMX_PORT_PARAM_TYPE {
489334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_U32 nSize;              /**< size of the structure in bytes */
490334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_VERSIONTYPE nVersion;   /**< OMX specification version information */
491334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_U32 nPorts;             /**< The number of ports for this component */
492334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_U32 nStartPortNumber;   /** first port number for this type of port */
493a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar} OMX_PORT_PARAM_TYPE;
494334de520b0369215b7931fefa424fb92d295f0ebJames Dong
495334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** @ingroup comp */
496334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef enum OMX_EVENTTYPE
497334de520b0369215b7931fefa424fb92d295f0ebJames Dong{
498334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_EventCmdComplete,         /**< component has sucessfully completed a command */
499334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_EventError,               /**< component has detected an error condition */
500334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_EventMark,                /**< component has detected a buffer mark */
501334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_EventPortSettingsChanged, /**< component is reported a port settings change */
502a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    OMX_EventBufferFlag,          /**< component has detected an EOS */
503334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_EventResourcesAcquired,   /**< component has been granted resources and is
504334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                       automatically starting the state change from
505334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                       OMX_StateWaitForResources to OMX_StateIdle. */
5060f7723f6b48e3324f6cd3fa001413b1ea5e32efbLajos Molnar    OMX_EventComponentResumed,     /**< Component resumed due to reacquisition of resources */
5070f7723f6b48e3324f6cd3fa001413b1ea5e32efbLajos Molnar    OMX_EventDynamicResourcesAvailable, /**< Component has acquired previously unavailable dynamic resources */
5080f7723f6b48e3324f6cd3fa001413b1ea5e32efbLajos Molnar    OMX_EventPortFormatDetected,      /**< Component has detected a supported format. */
5090f7723f6b48e3324f6cd3fa001413b1ea5e32efbLajos Molnar    OMX_EventKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
5100f7723f6b48e3324f6cd3fa001413b1ea5e32efbLajos Molnar    OMX_EventVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
5110f7723f6b48e3324f6cd3fa001413b1ea5e32efbLajos Molnar
512bcaa8d5a6c059d22d2fcf32ffab1a99f3b64c756Lajos Molnar    /** Event when tunneled decoder has rendered an output or reached EOS
513e21d7f500f034c61da605c80f9852bca5beb35f6Lajos Molnar     *  nData1 must contain the number of timestamps returned
514e21d7f500f034c61da605c80f9852bca5beb35f6Lajos Molnar     *  pEventData must point to an array of the OMX_VIDEO_RENDEREVENTTYPE structs containing the
515e21d7f500f034c61da605c80f9852bca5beb35f6Lajos Molnar     *  render-timestamps of each frame. Component may batch rendered timestamps using this event,
516e21d7f500f034c61da605c80f9852bca5beb35f6Lajos Molnar     *  but must signal the event no more than 40ms after the first frame in the batch. The frames
517e21d7f500f034c61da605c80f9852bca5beb35f6Lajos Molnar     *  must be ordered by system timestamp inside and across batches.
518e21d7f500f034c61da605c80f9852bca5beb35f6Lajos Molnar     *
51990093ba0191066d68b218fe344835c03db96cfa6Lajos Molnar     *  The component shall signal the render-timestamp of the very first frame (as well as the
52090093ba0191066d68b218fe344835c03db96cfa6Lajos Molnar     *  first frame after each flush) unbatched (with nData1 set to 1) within 5 msec.
52190093ba0191066d68b218fe344835c03db96cfa6Lajos Molnar     *
522e21d7f500f034c61da605c80f9852bca5beb35f6Lajos Molnar     *  If component is doing frame-rate conversion, it must signal the render time of each
523e21d7f500f034c61da605c80f9852bca5beb35f6Lajos Molnar     *  converted frame, and must interpolate media timestamps for in-between frames.
524bcaa8d5a6c059d22d2fcf32ffab1a99f3b64c756Lajos Molnar     *
525bcaa8d5a6c059d22d2fcf32ffab1a99f3b64c756Lajos Molnar     *  When the component reached EOS, it must signal an EOS timestamp using the same mechanism.
526bcaa8d5a6c059d22d2fcf32ffab1a99f3b64c756Lajos Molnar     *  This is in addition to the timestamp of the last rendered frame, and should follow that
527bcaa8d5a6c059d22d2fcf32ffab1a99f3b64c756Lajos Molnar     *  frame.
5280f7723f6b48e3324f6cd3fa001413b1ea5e32efbLajos Molnar     */
5290f7723f6b48e3324f6cd3fa001413b1ea5e32efbLajos Molnar    OMX_EventOutputRendered = 0x7F000001,
5304c6d82bce7afa78f91ac38c37f2ad4d134013390Lajos Molnar
5314c6d82bce7afa78f91ac38c37f2ad4d134013390Lajos Molnar    /** For framework internal use only: event sent by OMXNodeInstance when it receives a graphic
5324c6d82bce7afa78f91ac38c37f2ad4d134013390Lajos Molnar     *  input buffer with a new dataspace for encoding. |arg1| will contain the dataspace. |arg2|
5334c6d82bce7afa78f91ac38c37f2ad4d134013390Lajos Molnar     *  will contain the ColorAspects requested by the component (or framework defaults) using
5344c6d82bce7afa78f91ac38c37f2ad4d134013390Lajos Molnar     *  the following bitfield layout:
5354c6d82bce7afa78f91ac38c37f2ad4d134013390Lajos Molnar     *
5364c6d82bce7afa78f91ac38c37f2ad4d134013390Lajos Molnar     *       +----------+-------------+----------------+------------+
5374c6d82bce7afa78f91ac38c37f2ad4d134013390Lajos Molnar     *       |   Range  |  Primaries  |  MatrixCoeffs  |  Transfer  |
5384c6d82bce7afa78f91ac38c37f2ad4d134013390Lajos Molnar     *       +----------+-------------+----------------+------------+
5394c6d82bce7afa78f91ac38c37f2ad4d134013390Lajos Molnar     *  bits:  31....24   23.......16   15...........8   7........0
5404c6d82bce7afa78f91ac38c37f2ad4d134013390Lajos Molnar     *
5414c6d82bce7afa78f91ac38c37f2ad4d134013390Lajos Molnar     *  TODO: We would really need to tie this to an output buffer, but OMX does not provide a
5424c6d82bce7afa78f91ac38c37f2ad4d134013390Lajos Molnar     *  fool-proof way to do that for video encoders.
5434c6d82bce7afa78f91ac38c37f2ad4d134013390Lajos Molnar     */
5444c6d82bce7afa78f91ac38c37f2ad4d134013390Lajos Molnar    OMX_EventDataSpaceChanged,
5450f7723f6b48e3324f6cd3fa001413b1ea5e32efbLajos Molnar    OMX_EventMax = 0x7FFFFFFF
546334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_EVENTTYPE;
547334de520b0369215b7931fefa424fb92d295f0ebJames Dong
548334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef struct OMX_CALLBACKTYPE
549334de520b0369215b7931fefa424fb92d295f0ebJames Dong{
550334de520b0369215b7931fefa424fb92d295f0ebJames Dong    /** The EventHandler method is used to notify the application when an
551334de520b0369215b7931fefa424fb92d295f0ebJames Dong        event of interest occurs.  Events are defined in the OMX_EVENTTYPE
552334de520b0369215b7931fefa424fb92d295f0ebJames Dong        enumeration.  Please see that enumeration for details of what will
553334de520b0369215b7931fefa424fb92d295f0ebJames Dong        be returned for each type of event. Callbacks should not return
554a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        an error to the component, so if an error occurs, the application
555334de520b0369215b7931fefa424fb92d295f0ebJames Dong        shall handle it internally.  This is a blocking call.
556334de520b0369215b7931fefa424fb92d295f0ebJames Dong
557334de520b0369215b7931fefa424fb92d295f0ebJames Dong        The application should return from this call within 5 msec to avoid
558334de520b0369215b7931fefa424fb92d295f0ebJames Dong        blocking the component for an excessively long period of time.
559334de520b0369215b7931fefa424fb92d295f0ebJames Dong
560334de520b0369215b7931fefa424fb92d295f0ebJames Dong        @param hComponent
561334de520b0369215b7931fefa424fb92d295f0ebJames Dong            handle of the component to access.  This is the component
562334de520b0369215b7931fefa424fb92d295f0ebJames Dong            handle returned by the call to the GetHandle function.
563334de520b0369215b7931fefa424fb92d295f0ebJames Dong        @param pAppData
564a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar            pointer to an application defined value that was provided in the
565334de520b0369215b7931fefa424fb92d295f0ebJames Dong            pAppData parameter to the OMX_GetHandle method for the component.
566a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar            This application defined value is provided so that the application
567334de520b0369215b7931fefa424fb92d295f0ebJames Dong            can have a component specific context when receiving the callback.
568334de520b0369215b7931fefa424fb92d295f0ebJames Dong        @param eEvent
569334de520b0369215b7931fefa424fb92d295f0ebJames Dong            Event that the component wants to notify the application about.
570334de520b0369215b7931fefa424fb92d295f0ebJames Dong        @param nData1
571a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar            nData will be the OMX_ERRORTYPE for an error event and will be
572334de520b0369215b7931fefa424fb92d295f0ebJames Dong            an OMX_COMMANDTYPE for a command complete event and OMX_INDEXTYPE for a OMX_PortSettingsChanged event.
573334de520b0369215b7931fefa424fb92d295f0ebJames Dong         @param nData2
574334de520b0369215b7931fefa424fb92d295f0ebJames Dong            nData2 will hold further information related to the event. Can be OMX_STATETYPE for
575334de520b0369215b7931fefa424fb92d295f0ebJames Dong            a OMX_CommandStateSet command or port index for a OMX_PortSettingsChanged event.
576334de520b0369215b7931fefa424fb92d295f0ebJames Dong            Default value is 0 if not used. )
577334de520b0369215b7931fefa424fb92d295f0ebJames Dong        @param pEventData
578334de520b0369215b7931fefa424fb92d295f0ebJames Dong            Pointer to additional event-specific data (see spec for meaning).
579334de520b0369215b7931fefa424fb92d295f0ebJames Dong      */
580334de520b0369215b7931fefa424fb92d295f0ebJames Dong
581334de520b0369215b7931fefa424fb92d295f0ebJames Dong   OMX_ERRORTYPE (*EventHandler)(
582334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_IN OMX_HANDLETYPE hComponent,
583334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_IN OMX_PTR pAppData,
584334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_IN OMX_EVENTTYPE eEvent,
585334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_IN OMX_U32 nData1,
586334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_IN OMX_U32 nData2,
587334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_IN OMX_PTR pEventData);
588334de520b0369215b7931fefa424fb92d295f0ebJames Dong
589334de520b0369215b7931fefa424fb92d295f0ebJames Dong    /** The EmptyBufferDone method is used to return emptied buffers from an
590a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        input port back to the application for reuse.  This is a blocking call
591334de520b0369215b7931fefa424fb92d295f0ebJames Dong        so the application should not attempt to refill the buffers during this
592334de520b0369215b7931fefa424fb92d295f0ebJames Dong        call, but should queue them and refill them in another thread.  There
593334de520b0369215b7931fefa424fb92d295f0ebJames Dong        is no error return, so the application shall handle any errors generated
594a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        internally.
595a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
596334de520b0369215b7931fefa424fb92d295f0ebJames Dong        The application should return from this call within 5 msec.
597a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
598334de520b0369215b7931fefa424fb92d295f0ebJames Dong        @param hComponent
599334de520b0369215b7931fefa424fb92d295f0ebJames Dong            handle of the component to access.  This is the component
600334de520b0369215b7931fefa424fb92d295f0ebJames Dong            handle returned by the call to the GetHandle function.
601334de520b0369215b7931fefa424fb92d295f0ebJames Dong        @param pAppData
602a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar            pointer to an application defined value that was provided in the
603334de520b0369215b7931fefa424fb92d295f0ebJames Dong            pAppData parameter to the OMX_GetHandle method for the component.
604a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar            This application defined value is provided so that the application
605334de520b0369215b7931fefa424fb92d295f0ebJames Dong            can have a component specific context when receiving the callback.
606334de520b0369215b7931fefa424fb92d295f0ebJames Dong        @param pBuffer
607334de520b0369215b7931fefa424fb92d295f0ebJames Dong            pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer
608334de520b0369215b7931fefa424fb92d295f0ebJames Dong            or AllocateBuffer indicating the buffer that was emptied.
609334de520b0369215b7931fefa424fb92d295f0ebJames Dong        @ingroup buf
610334de520b0369215b7931fefa424fb92d295f0ebJames Dong     */
611334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_ERRORTYPE (*EmptyBufferDone)(
612334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_IN OMX_HANDLETYPE hComponent,
613334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_IN OMX_PTR pAppData,
614334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_IN OMX_BUFFERHEADERTYPE* pBuffer);
615334de520b0369215b7931fefa424fb92d295f0ebJames Dong
616334de520b0369215b7931fefa424fb92d295f0ebJames Dong    /** The FillBufferDone method is used to return filled buffers from an
617a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        output port back to the application for emptying and then reuse.
618a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        This is a blocking call so the application should not attempt to
619a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        empty the buffers during this call, but should queue the buffers
620a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        and empty them in another thread.  There is no error return, so
621a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        the application shall handle any errors generated internally.  The
622334de520b0369215b7931fefa424fb92d295f0ebJames Dong        application shall also update the buffer header to indicate the
623a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        number of bytes placed into the buffer.
624334de520b0369215b7931fefa424fb92d295f0ebJames Dong
625334de520b0369215b7931fefa424fb92d295f0ebJames Dong        The application should return from this call within 5 msec.
626a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
627334de520b0369215b7931fefa424fb92d295f0ebJames Dong        @param hComponent
628334de520b0369215b7931fefa424fb92d295f0ebJames Dong            handle of the component to access.  This is the component
629334de520b0369215b7931fefa424fb92d295f0ebJames Dong            handle returned by the call to the GetHandle function.
630334de520b0369215b7931fefa424fb92d295f0ebJames Dong        @param pAppData
631a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar            pointer to an application defined value that was provided in the
632334de520b0369215b7931fefa424fb92d295f0ebJames Dong            pAppData parameter to the OMX_GetHandle method for the component.
633a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar            This application defined value is provided so that the application
634334de520b0369215b7931fefa424fb92d295f0ebJames Dong            can have a component specific context when receiving the callback.
635334de520b0369215b7931fefa424fb92d295f0ebJames Dong        @param pBuffer
636334de520b0369215b7931fefa424fb92d295f0ebJames Dong            pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer
637334de520b0369215b7931fefa424fb92d295f0ebJames Dong            or AllocateBuffer indicating the buffer that was filled.
638334de520b0369215b7931fefa424fb92d295f0ebJames Dong        @ingroup buf
639334de520b0369215b7931fefa424fb92d295f0ebJames Dong     */
640334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_ERRORTYPE (*FillBufferDone)(
641334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_OUT OMX_HANDLETYPE hComponent,
642334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_OUT OMX_PTR pAppData,
643334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer);
644334de520b0369215b7931fefa424fb92d295f0ebJames Dong
645334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_CALLBACKTYPE;
646334de520b0369215b7931fefa424fb92d295f0ebJames Dong
647334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_BUFFERSUPPLIERTYPE enumeration is used to dictate port supplier
648334de520b0369215b7931fefa424fb92d295f0ebJames Dong    preference when tunneling between two ports.
649334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup tun buf
650334de520b0369215b7931fefa424fb92d295f0ebJames Dong*/
651334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef enum OMX_BUFFERSUPPLIERTYPE
652334de520b0369215b7931fefa424fb92d295f0ebJames Dong{
653334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_BufferSupplyUnspecified = 0x0, /**< port supplying the buffers is unspecified,
654334de520b0369215b7931fefa424fb92d295f0ebJames Dong                                              or don't care */
655334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_BufferSupplyInput,             /**< input port supplies the buffers */
656334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_BufferSupplyOutput,            /**< output port supplies the buffers */
657a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    OMX_BufferSupplyKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
658334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_BufferSupplyVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
659334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_BufferSupplyMax = 0x7FFFFFFF
660334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_BUFFERSUPPLIERTYPE;
661334de520b0369215b7931fefa424fb92d295f0ebJames Dong
662334de520b0369215b7931fefa424fb92d295f0ebJames Dong
663a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/** buffer supplier parameter
664334de520b0369215b7931fefa424fb92d295f0ebJames Dong * @ingroup tun
665334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
666334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef struct OMX_PARAM_BUFFERSUPPLIERTYPE {
667334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_U32 nSize; /**< size of the structure in bytes */
668334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
669334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_U32 nPortIndex; /**< port that this structure applies to */
670334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_BUFFERSUPPLIERTYPE eBufferSupplier; /**< buffer supplier */
671334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_PARAM_BUFFERSUPPLIERTYPE;
672334de520b0369215b7931fefa424fb92d295f0ebJames Dong
673334de520b0369215b7931fefa424fb92d295f0ebJames Dong
674a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/**< indicates that buffers received by an input port of a tunnel
675a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar     may not modify the data in the buffers
676334de520b0369215b7931fefa424fb92d295f0ebJames Dong     @ingroup tun
677334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
678a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar#define OMX_PORTTUNNELFLAG_READONLY 0x00000001
679334de520b0369215b7931fefa424fb92d295f0ebJames Dong
680334de520b0369215b7931fefa424fb92d295f0ebJames Dong
681334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_TUNNELSETUPTYPE structure is used to pass data from an output
682334de520b0369215b7931fefa424fb92d295f0ebJames Dong    port to an input port as part the two ComponentTunnelRequest calls
683a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    resulting from a OMX_SetupTunnel call from the IL Client.
684334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup tun
685a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar */
686334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef struct OMX_TUNNELSETUPTYPE
687334de520b0369215b7931fefa424fb92d295f0ebJames Dong{
688334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_U32 nTunnelFlags;             /**< bit flags for tunneling */
689334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_BUFFERSUPPLIERTYPE eSupplier; /**< supplier preference */
690a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar} OMX_TUNNELSETUPTYPE;
691334de520b0369215b7931fefa424fb92d295f0ebJames Dong
692334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* OMX Component headers is included to enable the core to use
693a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar   macros for functions into the component for OMX release 1.0.
694334de520b0369215b7931fefa424fb92d295f0ebJames Dong   Developers should not access any structures or data from within
695334de520b0369215b7931fefa424fb92d295f0ebJames Dong   the component header directly */
696334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* TO BE REMOVED - #include <OMX_Component.h> */
697334de520b0369215b7931fefa424fb92d295f0ebJames Dong
698a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/** GetComponentVersion will return information about the component.
699334de520b0369215b7931fefa424fb92d295f0ebJames Dong    This is a blocking call.  This macro will go directly from the
700334de520b0369215b7931fefa424fb92d295f0ebJames Dong    application to the component (via a core macro).  The
701334de520b0369215b7931fefa424fb92d295f0ebJames Dong    component will return from this call within 5 msec.
702334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] hComponent
703334de520b0369215b7931fefa424fb92d295f0ebJames Dong        handle of component to execute the command
704334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [out] pComponentName
705a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        pointer to an empty string of length 128 bytes.  The component
706a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        will write its name into this string.  The name will be
707a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        terminated by a single zero byte.  The name of a component will
708a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        be 127 bytes or less to leave room for the trailing zero byte.
709334de520b0369215b7931fefa424fb92d295f0ebJames Dong        An example of a valid component name is "OMX.ABC.ChannelMixer\0".
710334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [out] pComponentVersion
711a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        pointer to an OMX Version structure that the component will fill
712a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        in.  The component will fill in a value that indicates the
713a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        component version.  NOTE: the component version is NOT the same
714a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        as the OMX Specification version (found in all structures).  The
715a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        component version is defined by the vendor of the component and
716334de520b0369215b7931fefa424fb92d295f0ebJames Dong        its value is entirely up to the component vendor.
717334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [out] pSpecVersion
718a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        pointer to an OMX Version structure that the component will fill
719a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        in.  The SpecVersion is the version of the specification that the
720a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        component was built against.  Please note that this value may or
721a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        may not match the structure's version.  For example, if the
722a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        component was built against the 2.0 specification, but the
723a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        application (which creates the structure is built against the
724334de520b0369215b7931fefa424fb92d295f0ebJames Dong        1.0 specification the versions would be different.
725334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [out] pComponentUUID
726a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        pointer to the UUID of the component which will be filled in by
727a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        the component.  The UUID is a unique identifier that is set at
728a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        RUN time for the component and is unique to each instantion of
729334de520b0369215b7931fefa424fb92d295f0ebJames Dong        the component.
730334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
731334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
732334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
733334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup comp
734334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
735334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_GetComponentVersion(                            \
736334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
737334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pComponentName,                                     \
738334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pComponentVersion,                                  \
739334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pSpecVersion,                                       \
740334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pComponentUUID)                                     \
7411597660e9559184011bd558e6237a7797762d000Chih-Hung Hsieh    ((OMX_COMPONENTTYPE*)(hComponent))->GetComponentVersion(\
742334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
743334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pComponentName,                                     \
744334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pComponentVersion,                                  \
745334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pSpecVersion,                                       \
746334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pComponentUUID)                 /* Macro End */
747334de520b0369215b7931fefa424fb92d295f0ebJames Dong
748334de520b0369215b7931fefa424fb92d295f0ebJames Dong
749334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** Send a command to the component.  This call is a non-blocking call.
750334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The component should check the parameters and then queue the command
751a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    to the component thread to be executed.  The component thread shall
752a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    send the EventHandler() callback at the conclusion of the command.
753334de520b0369215b7931fefa424fb92d295f0ebJames Dong    This macro will go directly from the application to the component (via
754334de520b0369215b7931fefa424fb92d295f0ebJames Dong    a core macro).  The component will return from this call within 5 msec.
755a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
756334de520b0369215b7931fefa424fb92d295f0ebJames Dong    When the command is "OMX_CommandStateSet" the component will queue a
757334de520b0369215b7931fefa424fb92d295f0ebJames Dong    state transition to the new state idenfied in nParam.
758a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
75990093ba0191066d68b218fe344835c03db96cfa6Lajos Molnar    The component shall transition from executing to loaded state within 500 msec.
76090093ba0191066d68b218fe344835c03db96cfa6Lajos Molnar
761334de520b0369215b7931fefa424fb92d295f0ebJames Dong    When the command is "OMX_CommandFlush", to flush a port's buffer queues,
762a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    the command will force the component to return all buffers NOT CURRENTLY
763a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    BEING PROCESSED to the application, in the order in which the buffers
764334de520b0369215b7931fefa424fb92d295f0ebJames Dong    were received.
765a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
76690093ba0191066d68b218fe344835c03db96cfa6Lajos Molnar    The component shall finish flusing each port within 5 msec.
76790093ba0191066d68b218fe344835c03db96cfa6Lajos Molnar
768a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    When the command is "OMX_CommandPortDisable" or
769334de520b0369215b7931fefa424fb92d295f0ebJames Dong    "OMX_CommandPortEnable", the component's port (given by the value of
770a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    nParam) will be stopped or restarted.
771a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
77290093ba0191066d68b218fe344835c03db96cfa6Lajos Molnar    The component shall finish disabling/reenabling each port within 5 msec.
77390093ba0191066d68b218fe344835c03db96cfa6Lajos Molnar
774334de520b0369215b7931fefa424fb92d295f0ebJames Dong    When the command "OMX_CommandMarkBuffer" is used to mark a buffer, the
775334de520b0369215b7931fefa424fb92d295f0ebJames Dong    pCmdData will point to a OMX_MARKTYPE structure containing the component
776334de520b0369215b7931fefa424fb92d295f0ebJames Dong    handle of the component to examine the buffer chain for the mark.  nParam1
777334de520b0369215b7931fefa424fb92d295f0ebJames Dong    contains the index of the port on which the buffer mark is applied.
778334de520b0369215b7931fefa424fb92d295f0ebJames Dong
779a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    Specification text for more details.
780a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
781334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] hComponent
782334de520b0369215b7931fefa424fb92d295f0ebJames Dong        handle of component to execute the command
783334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] Cmd
784334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Command for the component to execute
785334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] nParam
786a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        Parameter for the command to be executed.  When Cmd has the value
787a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        OMX_CommandStateSet, value is a member of OMX_STATETYPE.  When Cmd has
788a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        the value OMX_CommandFlush, value of nParam indicates which port(s)
789a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        to flush. -1 is used to flush all ports a single port index will
790334de520b0369215b7931fefa424fb92d295f0ebJames Dong        only flush that port.  When Cmd has the value "OMX_CommandPortDisable"
791a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        or "OMX_CommandPortEnable", the component's port is given by
792334de520b0369215b7931fefa424fb92d295f0ebJames Dong        the value of nParam.  When Cmd has the value "OMX_CommandMarkBuffer"
793334de520b0369215b7931fefa424fb92d295f0ebJames Dong        the components pot is given by the value of nParam.
794334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] pCmdData
795334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Parameter pointing to the OMX_MARKTYPE structure when Cmd has the value
796a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        "OMX_CommandMarkBuffer".
797334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
798334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
799334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
800334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup comp
801334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
802334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_SendCommand(                                    \
803334de520b0369215b7931fefa424fb92d295f0ebJames Dong         hComponent,                                        \
804334de520b0369215b7931fefa424fb92d295f0ebJames Dong         Cmd,                                               \
805334de520b0369215b7931fefa424fb92d295f0ebJames Dong         nParam,                                            \
806334de520b0369215b7931fefa424fb92d295f0ebJames Dong         pCmdData)                                          \
8071597660e9559184011bd558e6237a7797762d000Chih-Hung Hsieh     ((OMX_COMPONENTTYPE*)(hComponent))->SendCommand(       \
808334de520b0369215b7931fefa424fb92d295f0ebJames Dong         hComponent,                                        \
809334de520b0369215b7931fefa424fb92d295f0ebJames Dong         Cmd,                                               \
810334de520b0369215b7931fefa424fb92d295f0ebJames Dong         nParam,                                            \
811334de520b0369215b7931fefa424fb92d295f0ebJames Dong         pCmdData)                          /* Macro End */
812334de520b0369215b7931fefa424fb92d295f0ebJames Dong
813334de520b0369215b7931fefa424fb92d295f0ebJames Dong
814a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/** The OMX_GetParameter macro will get one of the current parameter
815a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    settings from the component.  This macro cannot only be invoked when
816334de520b0369215b7931fefa424fb92d295f0ebJames Dong    the component is in the OMX_StateInvalid state.  The nParamIndex
817334de520b0369215b7931fefa424fb92d295f0ebJames Dong    parameter is used to indicate which structure is being requested from
818a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    the component.  The application shall allocate the correct structure
819a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    and shall fill in the structure size and version information before
820334de520b0369215b7931fefa424fb92d295f0ebJames Dong    invoking this macro.  When the parameter applies to a port, the
821334de520b0369215b7931fefa424fb92d295f0ebJames Dong    caller shall fill in the appropriate nPortIndex value indicating the
822a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    port on which the parameter applies. If the component has not had
823a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    any settings changed, then the component should return a set of
824a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    valid DEFAULT  parameters for the component.  This is a blocking
825a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    call.
826a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
827334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The component should return from this call within 20 msec.
828a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
829334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] hComponent
830334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Handle of the component to be accessed.  This is the component
831334de520b0369215b7931fefa424fb92d295f0ebJames Dong        handle returned by the call to the OMX_GetHandle function.
832334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] nParamIndex
833334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Index of the structure to be filled.  This value is from the
834334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_INDEXTYPE enumeration.
835334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in,out] pComponentParameterStructure
836a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        Pointer to application allocated structure to be filled by the
837334de520b0369215b7931fefa424fb92d295f0ebJames Dong        component.
838334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
839334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
840334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
841334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup comp
842334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
843334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_GetParameter(                                   \
844334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
845334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nParamIndex,                                        \
8461597660e9559184011bd558e6237a7797762d000Chih-Hung Hsieh        pComponentParameterStructure)                       \
8471597660e9559184011bd558e6237a7797762d000Chih-Hung Hsieh    ((OMX_COMPONENTTYPE*)(hComponent))->GetParameter(       \
848334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
849334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nParamIndex,                                        \
850334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pComponentParameterStructure)    /* Macro End */
851334de520b0369215b7931fefa424fb92d295f0ebJames Dong
852334de520b0369215b7931fefa424fb92d295f0ebJames Dong
853334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_SetParameter macro will send an initialization parameter
854334de520b0369215b7931fefa424fb92d295f0ebJames Dong    structure to a component.  Each structure shall be sent one at a time,
855334de520b0369215b7931fefa424fb92d295f0ebJames Dong    in a separate invocation of the macro.  This macro can only be
856334de520b0369215b7931fefa424fb92d295f0ebJames Dong    invoked when the component is in the OMX_StateLoaded state, or the
857a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    port is disabled (when the parameter applies to a port). The
858334de520b0369215b7931fefa424fb92d295f0ebJames Dong    nParamIndex parameter is used to indicate which structure is being
859a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    passed to the component.  The application shall allocate the
860a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    correct structure and shall fill in the structure size and version
861334de520b0369215b7931fefa424fb92d295f0ebJames Dong    information (as well as the actual data) before invoking this macro.
862334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The application is free to dispose of this structure after the call
863a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    as the component is required to copy any data it shall retain.  This
864a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    is a blocking call.
865a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
866334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The component should return from this call within 20 msec.
867a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
868334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] hComponent
869334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Handle of the component to be accessed.  This is the component
870334de520b0369215b7931fefa424fb92d295f0ebJames Dong        handle returned by the call to the OMX_GetHandle function.
871334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] nIndex
872334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Index of the structure to be sent.  This value is from the
873334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_INDEXTYPE enumeration.
874334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] pComponentParameterStructure
875334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pointer to application allocated structure to be used for
876334de520b0369215b7931fefa424fb92d295f0ebJames Dong        initialization by the component.
877334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
878334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
879334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
880334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup comp
881334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
882334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_SetParameter(                                   \
883334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
884334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nParamIndex,                                        \
8851597660e9559184011bd558e6237a7797762d000Chih-Hung Hsieh        pComponentParameterStructure)                       \
8861597660e9559184011bd558e6237a7797762d000Chih-Hung Hsieh    ((OMX_COMPONENTTYPE*)(hComponent))->SetParameter(       \
887334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
888334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nParamIndex,                                        \
889334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pComponentParameterStructure)    /* Macro End */
890334de520b0369215b7931fefa424fb92d295f0ebJames Dong
891334de520b0369215b7931fefa424fb92d295f0ebJames Dong
892a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/** The OMX_GetConfig macro will get one of the configuration structures
893a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    from a component.  This macro can be invoked anytime after the
894a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    component has been loaded.  The nParamIndex call parameter is used to
895a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    indicate which structure is being requested from the component.  The
896a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    application shall allocate the correct structure and shall fill in the
897a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    structure size and version information before invoking this macro.
898a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    If the component has not had this configuration parameter sent before,
899a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    then the component should return a set of valid DEFAULT values for the
900a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    component.  This is a blocking call.
901a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
902334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The component should return from this call within 5 msec.
903a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
904334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] hComponent
905334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Handle of the component to be accessed.  This is the component
906334de520b0369215b7931fefa424fb92d295f0ebJames Dong        handle returned by the call to the OMX_GetHandle function.
907334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] nIndex
908334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Index of the structure to be filled.  This value is from the
909334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_INDEXTYPE enumeration.
910334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in,out] pComponentConfigStructure
911a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        pointer to application allocated structure to be filled by the
912334de520b0369215b7931fefa424fb92d295f0ebJames Dong        component.
913334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
914334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
915334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
916334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup comp
917a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar*/
918334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_GetConfig(                                      \
919334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
920334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nConfigIndex,                                       \
9211597660e9559184011bd558e6237a7797762d000Chih-Hung Hsieh        pComponentConfigStructure)                          \
9221597660e9559184011bd558e6237a7797762d000Chih-Hung Hsieh    ((OMX_COMPONENTTYPE*)(hComponent))->GetConfig(          \
923334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
924334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nConfigIndex,                                       \
925334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pComponentConfigStructure)       /* Macro End */
926334de520b0369215b7931fefa424fb92d295f0ebJames Dong
927334de520b0369215b7931fefa424fb92d295f0ebJames Dong
928a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/** The OMX_SetConfig macro will send one of the configuration
929334de520b0369215b7931fefa424fb92d295f0ebJames Dong    structures to a component.  Each structure shall be sent one at a time,
930a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    each in a separate invocation of the macro.  This macro can be invoked
931a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    anytime after the component has been loaded.  The application shall
932a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    allocate the correct structure and shall fill in the structure size
933a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    and version information (as well as the actual data) before invoking
934a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    this macro.  The application is free to dispose of this structure after
935a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    the call as the component is required to copy any data it shall retain.
936a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    This is a blocking call.
937a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
938334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The component should return from this call within 5 msec.
939a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
940334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] hComponent
941334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Handle of the component to be accessed.  This is the component
942334de520b0369215b7931fefa424fb92d295f0ebJames Dong        handle returned by the call to the OMX_GetHandle function.
943334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] nConfigIndex
944334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Index of the structure to be sent.  This value is from the
945334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_INDEXTYPE enumeration above.
946334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] pComponentConfigStructure
947334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pointer to application allocated structure to be used for
948334de520b0369215b7931fefa424fb92d295f0ebJames Dong        initialization by the component.
949334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
950334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
951334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
952334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup comp
953334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
954334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_SetConfig(                                      \
955334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
956334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nConfigIndex,                                       \
9571597660e9559184011bd558e6237a7797762d000Chih-Hung Hsieh        pComponentConfigStructure)                          \
9581597660e9559184011bd558e6237a7797762d000Chih-Hung Hsieh    ((OMX_COMPONENTTYPE*)(hComponent))->SetConfig(          \
959334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
960334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nConfigIndex,                                       \
961334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pComponentConfigStructure)       /* Macro End */
962334de520b0369215b7931fefa424fb92d295f0ebJames Dong
963334de520b0369215b7931fefa424fb92d295f0ebJames Dong
964a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/** The OMX_GetExtensionIndex macro will invoke a component to translate
965a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    a vendor specific configuration or parameter string into an OMX
966a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    structure index.  There is no requirement for the vendor to support
967a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    this command for the indexes already found in the OMX_INDEXTYPE
968a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    enumeration (this is done to save space in small components).  The
969334de520b0369215b7931fefa424fb92d295f0ebJames Dong    component shall support all vendor supplied extension indexes not found
970a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    in the master OMX_INDEXTYPE enumeration.  This is a blocking call.
971a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
972334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The component should return from this call within 5 msec.
973a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
974334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] hComponent
975334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Handle of the component to be accessed.  This is the component
976334de520b0369215b7931fefa424fb92d295f0ebJames Dong        handle returned by the call to the GetHandle function.
977334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] cParameterName
978334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_STRING that shall be less than 128 characters long including
979a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        the trailing null byte.  This is the string that will get
980334de520b0369215b7931fefa424fb92d295f0ebJames Dong        translated by the component into a configuration index.
981334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [out] pIndexType
982334de520b0369215b7931fefa424fb92d295f0ebJames Dong        a pointer to a OMX_INDEXTYPE to receive the index value.
983334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
984334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
985334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
986334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup comp
987334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
988334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_GetExtensionIndex(                              \
989334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
990334de520b0369215b7931fefa424fb92d295f0ebJames Dong        cParameterName,                                     \
991334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pIndexType)                                         \
9921597660e9559184011bd558e6237a7797762d000Chih-Hung Hsieh    ((OMX_COMPONENTTYPE*)(hComponent))->GetExtensionIndex(  \
993334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
994334de520b0369215b7931fefa424fb92d295f0ebJames Dong        cParameterName,                                     \
995334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pIndexType)                     /* Macro End */
996334de520b0369215b7931fefa424fb92d295f0ebJames Dong
997334de520b0369215b7931fefa424fb92d295f0ebJames Dong
998a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/** The OMX_GetState macro will invoke the component to get the current
999334de520b0369215b7931fefa424fb92d295f0ebJames Dong    state of the component and place the state value into the location
1000a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    pointed to by pState.
1001a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1002334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The component should return from this call within 5 msec.
1003a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1004334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] hComponent
1005334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Handle of the component to be accessed.  This is the component
1006334de520b0369215b7931fefa424fb92d295f0ebJames Dong        handle returned by the call to the OMX_GetHandle function.
1007334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [out] pState
1008334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pointer to the location to receive the state.  The value returned
1009a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        is one of the OMX_STATETYPE members
1010334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
1011334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
1012334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1013334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup comp
1014334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
1015334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_GetState(                                       \
1016334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
1017334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pState)                                             \
10181597660e9559184011bd558e6237a7797762d000Chih-Hung Hsieh    ((OMX_COMPONENTTYPE*)(hComponent))->GetState(           \
1019334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
1020334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pState)                         /* Macro End */
1021334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1022334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1023334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_UseBuffer macro will request that the component use
1024a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    a buffer (and allocate its own buffer header) already allocated
1025a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    by another component, or by the IL Client. This is a blocking
1026334de520b0369215b7931fefa424fb92d295f0ebJames Dong    call.
1027a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1028334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The component should return from this call within 20 msec.
1029a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1030334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] hComponent
1031334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Handle of the component to be accessed.  This is the component
1032334de520b0369215b7931fefa424fb92d295f0ebJames Dong        handle returned by the call to the OMX_GetHandle function.
1033334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [out] ppBuffer
1034a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        pointer to an OMX_BUFFERHEADERTYPE structure used to receive the
1035334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pointer to the buffer header
1036334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
1037334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
1038334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1039334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup comp buf
1040334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
1041334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1042334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_UseBuffer(                                      \
1043334de520b0369215b7931fefa424fb92d295f0ebJames Dong           hComponent,                                      \
1044334de520b0369215b7931fefa424fb92d295f0ebJames Dong           ppBufferHdr,                                     \
1045334de520b0369215b7931fefa424fb92d295f0ebJames Dong           nPortIndex,                                      \
1046334de520b0369215b7931fefa424fb92d295f0ebJames Dong           pAppPrivate,                                     \
1047334de520b0369215b7931fefa424fb92d295f0ebJames Dong           nSizeBytes,                                      \
1048334de520b0369215b7931fefa424fb92d295f0ebJames Dong           pBuffer)                                         \
10491597660e9559184011bd558e6237a7797762d000Chih-Hung Hsieh    ((OMX_COMPONENTTYPE*)(hComponent))->UseBuffer(          \
1050334de520b0369215b7931fefa424fb92d295f0ebJames Dong           hComponent,                                      \
1051334de520b0369215b7931fefa424fb92d295f0ebJames Dong           ppBufferHdr,                                     \
1052334de520b0369215b7931fefa424fb92d295f0ebJames Dong           nPortIndex,                                      \
1053334de520b0369215b7931fefa424fb92d295f0ebJames Dong           pAppPrivate,                                     \
1054334de520b0369215b7931fefa424fb92d295f0ebJames Dong           nSizeBytes,                                      \
1055334de520b0369215b7931fefa424fb92d295f0ebJames Dong           pBuffer)
1056334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1057334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1058a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/** The OMX_AllocateBuffer macro will request that the component allocate
1059a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    a new buffer and buffer header.  The component will allocate the
1060a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    buffer and the buffer header and return a pointer to the buffer
1061334de520b0369215b7931fefa424fb92d295f0ebJames Dong    header.  This is a blocking call.
1062a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1063334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The component should return from this call within 5 msec.
1064a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1065334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] hComponent
1066334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Handle of the component to be accessed.  This is the component
1067334de520b0369215b7931fefa424fb92d295f0ebJames Dong        handle returned by the call to the OMX_GetHandle function.
1068334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [out] ppBuffer
1069a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        pointer to an OMX_BUFFERHEADERTYPE structure used to receive
1070334de520b0369215b7931fefa424fb92d295f0ebJames Dong        the pointer to the buffer header
1071334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] nPortIndex
1072334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nPortIndex is used to select the port on the component the buffer will
1073334de520b0369215b7931fefa424fb92d295f0ebJames Dong        be used with.  The port can be found by using the nPortIndex
1074334de520b0369215b7931fefa424fb92d295f0ebJames Dong        value as an index into the Port Definition array of the component.
1075334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] pAppPrivate
1076a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        pAppPrivate is used to initialize the pAppPrivate member of the
1077334de520b0369215b7931fefa424fb92d295f0ebJames Dong        buffer header structure.
1078334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] nSizeBytes
1079334de520b0369215b7931fefa424fb92d295f0ebJames Dong        size of the buffer to allocate.  Used when bAllocateNew is true.
1080334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
1081334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
1082334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1083334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup comp buf
1084a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar */
1085334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_AllocateBuffer(                                 \
1086334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
1087334de520b0369215b7931fefa424fb92d295f0ebJames Dong        ppBuffer,                                           \
1088334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nPortIndex,                                         \
1089334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pAppPrivate,                                        \
1090334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nSizeBytes)                                         \
10911597660e9559184011bd558e6237a7797762d000Chih-Hung Hsieh    ((OMX_COMPONENTTYPE*)(hComponent))->AllocateBuffer(     \
1092334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
1093334de520b0369215b7931fefa424fb92d295f0ebJames Dong        ppBuffer,                                           \
1094334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nPortIndex,                                         \
1095334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pAppPrivate,                                        \
1096334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nSizeBytes)                     /* Macro End */
1097334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1098334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1099334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_FreeBuffer macro will release a buffer header from the component
1100a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    which was allocated using either OMX_AllocateBuffer or OMX_UseBuffer. If
1101a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    the component allocated the buffer (see the OMX_UseBuffer macro) then
1102a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    the component shall free the buffer and buffer header. This is a
1103a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    blocking call.
1104a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1105334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The component should return from this call within 20 msec.
1106a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1107334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] hComponent
1108334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Handle of the component to be accessed.  This is the component
1109334de520b0369215b7931fefa424fb92d295f0ebJames Dong        handle returned by the call to the OMX_GetHandle function.
1110334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] nPortIndex
1111334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nPortIndex is used to select the port on the component the buffer will
1112334de520b0369215b7931fefa424fb92d295f0ebJames Dong        be used with.
1113334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] pBuffer
1114334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer
1115334de520b0369215b7931fefa424fb92d295f0ebJames Dong        or AllocateBuffer.
1116334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
1117334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
1118334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1119334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup comp buf
1120334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
1121334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_FreeBuffer(                                     \
1122334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
1123334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nPortIndex,                                         \
1124334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pBuffer)                                            \
11251597660e9559184011bd558e6237a7797762d000Chih-Hung Hsieh    ((OMX_COMPONENTTYPE*)(hComponent))->FreeBuffer(         \
1126334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
1127334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nPortIndex,                                         \
1128334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pBuffer)                        /* Macro End */
1129334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1130334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1131a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/** The OMX_EmptyThisBuffer macro will send a buffer full of data to an
1132334de520b0369215b7931fefa424fb92d295f0ebJames Dong    input port of a component.  The buffer will be emptied by the component
1133334de520b0369215b7931fefa424fb92d295f0ebJames Dong    and returned to the application via the EmptyBufferDone call back.
1134334de520b0369215b7931fefa424fb92d295f0ebJames Dong    This is a non-blocking call in that the component will record the buffer
1135a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    and return immediately and then empty the buffer, later, at the proper
1136a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    time.  As expected, this macro may be invoked only while the component
1137334de520b0369215b7931fefa424fb92d295f0ebJames Dong    is in the OMX_StateExecuting.  If nPortIndex does not specify an input
1138a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    port, the component shall return an error.
1139a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1140334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The component should return from this call within 5 msec.
1141a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1142334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] hComponent
1143334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Handle of the component to be accessed.  This is the component
1144334de520b0369215b7931fefa424fb92d295f0ebJames Dong        handle returned by the call to the OMX_GetHandle function.
1145334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] pBuffer
1146334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer
1147334de520b0369215b7931fefa424fb92d295f0ebJames Dong        or AllocateBuffer.
1148334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
1149334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
1150334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1151334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup comp buf
1152334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
1153334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_EmptyThisBuffer(                                \
1154334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
1155334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pBuffer)                                            \
11561597660e9559184011bd558e6237a7797762d000Chih-Hung Hsieh    ((OMX_COMPONENTTYPE*)(hComponent))->EmptyThisBuffer(    \
1157334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
1158334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pBuffer)                        /* Macro End */
1159334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1160334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1161a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/** The OMX_FillThisBuffer macro will send an empty buffer to an
1162334de520b0369215b7931fefa424fb92d295f0ebJames Dong    output port of a component.  The buffer will be filled by the component
1163334de520b0369215b7931fefa424fb92d295f0ebJames Dong    and returned to the application via the FillBufferDone call back.
1164334de520b0369215b7931fefa424fb92d295f0ebJames Dong    This is a non-blocking call in that the component will record the buffer
1165a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    and return immediately and then fill the buffer, later, at the proper
1166a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    time.  As expected, this macro may be invoked only while the component
1167334de520b0369215b7931fefa424fb92d295f0ebJames Dong    is in the OMX_ExecutingState.  If nPortIndex does not specify an output
1168a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    port, the component shall return an error.
1169a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1170334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The component should return from this call within 5 msec.
1171a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1172334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] hComponent
1173334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Handle of the component to be accessed.  This is the component
1174334de520b0369215b7931fefa424fb92d295f0ebJames Dong        handle returned by the call to the OMX_GetHandle function.
1175334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] pBuffer
1176334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer
1177334de520b0369215b7931fefa424fb92d295f0ebJames Dong        or AllocateBuffer.
1178334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
1179334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
1180334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1181334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup comp buf
1182334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
1183334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_FillThisBuffer(                                 \
1184334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
1185334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pBuffer)                                            \
11861597660e9559184011bd558e6237a7797762d000Chih-Hung Hsieh    ((OMX_COMPONENTTYPE*)(hComponent))->FillThisBuffer(     \
1187334de520b0369215b7931fefa424fb92d295f0ebJames Dong        hComponent,                                         \
1188334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pBuffer)                        /* Macro End */
1189334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1190334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1191334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1192334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_UseEGLImage macro will request that the component use
1193334de520b0369215b7931fefa424fb92d295f0ebJames Dong    a EGLImage provided by EGL (and allocate its own buffer header)
1194334de520b0369215b7931fefa424fb92d295f0ebJames Dong    This is a blocking call.
1195a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1196334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The component should return from this call within 20 msec.
1197a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1198334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] hComponent
1199334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Handle of the component to be accessed.  This is the component
1200334de520b0369215b7931fefa424fb92d295f0ebJames Dong        handle returned by the call to the OMX_GetHandle function.
1201334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [out] ppBuffer
1202a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        pointer to an OMX_BUFFERHEADERTYPE structure used to receive the
1203334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pointer to the buffer header.  Note that the memory location used
1204334de520b0369215b7931fefa424fb92d295f0ebJames Dong        for this buffer is NOT visible to the IL Client.
1205334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] nPortIndex
1206334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nPortIndex is used to select the port on the component the buffer will
1207334de520b0369215b7931fefa424fb92d295f0ebJames Dong        be used with.  The port can be found by using the nPortIndex
1208334de520b0369215b7931fefa424fb92d295f0ebJames Dong        value as an index into the Port Definition array of the component.
1209334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] pAppPrivate
1210a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        pAppPrivate is used to initialize the pAppPrivate member of the
1211334de520b0369215b7931fefa424fb92d295f0ebJames Dong        buffer header structure.
1212334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] eglImage
1213334de520b0369215b7931fefa424fb92d295f0ebJames Dong        eglImage contains the handle of the EGLImage to use as a buffer on the
1214a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        specified port.  The component is expected to validate properties of
1215334de520b0369215b7931fefa424fb92d295f0ebJames Dong        the EGLImage against the configuration of the port to ensure the component
1216a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        can use the EGLImage as a buffer.
1217334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
1218334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
1219334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1220334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup comp buf
1221334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
1222334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_UseEGLImage(                                    \
1223334de520b0369215b7931fefa424fb92d295f0ebJames Dong           hComponent,                                      \
1224334de520b0369215b7931fefa424fb92d295f0ebJames Dong           ppBufferHdr,                                     \
1225334de520b0369215b7931fefa424fb92d295f0ebJames Dong           nPortIndex,                                      \
1226334de520b0369215b7931fefa424fb92d295f0ebJames Dong           pAppPrivate,                                     \
1227334de520b0369215b7931fefa424fb92d295f0ebJames Dong           eglImage)                                        \
12281597660e9559184011bd558e6237a7797762d000Chih-Hung Hsieh    ((OMX_COMPONENTTYPE*)(hComponent))->UseEGLImage(        \
1229334de520b0369215b7931fefa424fb92d295f0ebJames Dong           hComponent,                                      \
1230334de520b0369215b7931fefa424fb92d295f0ebJames Dong           ppBufferHdr,                                     \
1231334de520b0369215b7931fefa424fb92d295f0ebJames Dong           nPortIndex,                                      \
1232334de520b0369215b7931fefa424fb92d295f0ebJames Dong           pAppPrivate,                                     \
1233334de520b0369215b7931fefa424fb92d295f0ebJames Dong           eglImage)
1234334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1235334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_Init method is used to initialize the OMX core.  It shall be the
1236334de520b0369215b7931fefa424fb92d295f0ebJames Dong    first call made into OMX and it should only be executed one time without
1237a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    an interviening OMX_Deinit call.
1238a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1239334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The core should return from this call within 20 msec.
1240334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1241334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
1242334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
1243334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1244334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup core
1245334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
1246334de520b0369215b7931fefa424fb92d295f0ebJames DongOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Init(void);
1247334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1248334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1249a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/** The OMX_Deinit method is used to deinitialize the OMX core.  It shall be
1250a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    the last call made into OMX. In the event that the core determines that
1251a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    thare are components loaded when this call is made, the core may return
1252334de520b0369215b7931fefa424fb92d295f0ebJames Dong    with an error rather than try to unload the components.
1253a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1254334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The core should return from this call within 20 msec.
1255a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1256334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
1257334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
1258334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1259334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup core
1260334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
1261334de520b0369215b7931fefa424fb92d295f0ebJames DongOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Deinit(void);
1262334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1263334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1264334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_ComponentNameEnum method will enumerate through all the names of
1265334de520b0369215b7931fefa424fb92d295f0ebJames Dong    recognised valid components in the system. This function is provided
1266334de520b0369215b7931fefa424fb92d295f0ebJames Dong    as a means to detect all the components in the system run-time. There is
1267334de520b0369215b7931fefa424fb92d295f0ebJames Dong    no strict ordering to the enumeration order of component names, although
1268334de520b0369215b7931fefa424fb92d295f0ebJames Dong    each name will only be enumerated once.  If the OMX core supports run-time
1269334de520b0369215b7931fefa424fb92d295f0ebJames Dong    installation of new components, it is only requried to detect newly
1270334de520b0369215b7931fefa424fb92d295f0ebJames Dong    installed components when the first call to enumerate component names
1271334de520b0369215b7931fefa424fb92d295f0ebJames Dong    is made (i.e. when nIndex is 0x0).
1272a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1273334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The core should return from this call in 20 msec.
1274a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1275334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [out] cComponentName
1276334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pointer to a null terminated string with the component name.  The
1277334de520b0369215b7931fefa424fb92d295f0ebJames Dong        names of the components are strings less than 127 bytes in length
1278a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        plus the trailing null for a maximum size of 128 bytes.  An example
1279a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        of a valid component name is "OMX.TI.AUDIO.DSP.MIXER\0".  Names are
1280a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        assigned by the vendor, but shall start with "OMX." and then have
1281334de520b0369215b7931fefa424fb92d295f0ebJames Dong        the Vendor designation next.
1282334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] nNameLength
1283a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        number of characters in the cComponentName string.  With all
1284a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        component name strings restricted to less than 128 characters
1285334de520b0369215b7931fefa424fb92d295f0ebJames Dong        (including the trailing null) it is recomended that the caller
1286334de520b0369215b7931fefa424fb92d295f0ebJames Dong        provide a input string for the cComponentName of 128 characters.
1287334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] nIndex
1288a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        number containing the enumeration index for the component.
1289334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Multiple calls to OMX_ComponentNameEnum with increasing values
1290334de520b0369215b7931fefa424fb92d295f0ebJames Dong        of nIndex will enumerate through the component names in the
1291334de520b0369215b7931fefa424fb92d295f0ebJames Dong        system until OMX_ErrorNoMore is returned.  The value of nIndex
1292334de520b0369215b7931fefa424fb92d295f0ebJames Dong        is 0 to (N-1), where N is the number of valid installed components
1293334de520b0369215b7931fefa424fb92d295f0ebJames Dong        in the system.
1294334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
1295334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
1296a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        OMX_ErrorNone.  When the value of nIndex exceeds the number of
1297334de520b0369215b7931fefa424fb92d295f0ebJames Dong        components in the system minus 1, OMX_ErrorNoMore will be
1298334de520b0369215b7931fefa424fb92d295f0ebJames Dong        returned. Otherwise the appropriate OMX error will be returned.
1299334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup core
1300334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
1301334de520b0369215b7931fefa424fb92d295f0ebJames DongOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_ComponentNameEnum(
1302334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_OUT OMX_STRING cComponentName,
1303334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_IN  OMX_U32 nNameLength,
1304334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_IN  OMX_U32 nIndex);
1305334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1306334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1307334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_GetHandle method will locate the component specified by the
1308334de520b0369215b7931fefa424fb92d295f0ebJames Dong    component name given, load that component into memory and then invoke
1309a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    the component's methods to create an instance of the component.
1310a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1311334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The core should return from this call within 20 msec.
1312a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1313334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [out] pHandle
1314334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pointer to an OMX_HANDLETYPE pointer to be filled in by this method.
1315334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] cComponentName
1316334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pointer to a null terminated string with the component name.  The
1317334de520b0369215b7931fefa424fb92d295f0ebJames Dong        names of the components are strings less than 127 bytes in length
1318a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        plus the trailing null for a maximum size of 128 bytes.  An example
1319a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        of a valid component name is "OMX.TI.AUDIO.DSP.MIXER\0".  Names are
1320a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        assigned by the vendor, but shall start with "OMX." and then have
1321334de520b0369215b7931fefa424fb92d295f0ebJames Dong        the Vendor designation next.
1322334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] pAppData
1323334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pointer to an application defined value that will be returned
1324334de520b0369215b7931fefa424fb92d295f0ebJames Dong        during callbacks so that the application can identify the source
1325334de520b0369215b7931fefa424fb92d295f0ebJames Dong        of the callback.
1326334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] pCallBacks
1327334de520b0369215b7931fefa424fb92d295f0ebJames Dong        pointer to a OMX_CALLBACKTYPE structure that will be passed to the
1328a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        component to initialize it with.
1329334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
1330334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
1331334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1332334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup core
1333334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
1334334de520b0369215b7931fefa424fb92d295f0ebJames DongOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_GetHandle(
1335a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    OMX_OUT OMX_HANDLETYPE* pHandle,
1336334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_IN  OMX_STRING cComponentName,
1337334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_IN  OMX_PTR pAppData,
1338334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_IN  OMX_CALLBACKTYPE* pCallBacks);
1339334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1340334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1341a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar/** The OMX_FreeHandle method will free a handle allocated by the OMX_GetHandle
1342334de520b0369215b7931fefa424fb92d295f0ebJames Dong    method.  If the component reference count goes to zero, the component will
1343a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    be unloaded from memory.
1344a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1345a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    The core should return from this call within 20 msec when the component is
1346334de520b0369215b7931fefa424fb92d295f0ebJames Dong    in the OMX_StateLoaded state.
1347334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1348334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] hComponent
1349334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Handle of the component to be accessed.  This is the component
1350334de520b0369215b7931fefa424fb92d295f0ebJames Dong        handle returned by the call to the GetHandle function.
1351334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
1352334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
1353334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1354334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup core
1355334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
1356334de520b0369215b7931fefa424fb92d295f0ebJames DongOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_FreeHandle(
1357334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_IN  OMX_HANDLETYPE hComponent);
1358334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1359334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1360334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1361334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_SetupTunnel method will handle the necessary calls to the components
1362334de520b0369215b7931fefa424fb92d295f0ebJames Dong    to setup the specified tunnel the two components.  NOTE: This is
1363334de520b0369215b7931fefa424fb92d295f0ebJames Dong    an actual method (not a #define macro).  This method will make calls into
1364a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    the component ComponentTunnelRequest method to do the actual tunnel
1365a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    connection.
1366334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1367a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    The ComponentTunnelRequest method on both components will be called.
1368a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    This method shall not be called unless the component is in the
1369334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_StateLoaded state except when the ports used for the tunnel are
1370334de520b0369215b7931fefa424fb92d295f0ebJames Dong    disabled. In this case, the component may be in the OMX_StateExecuting,
1371a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    OMX_StatePause, or OMX_StateIdle states.
1372334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1373334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The core should return from this call within 20 msec.
1374a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1375334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] hOutput
1376334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Handle of the component to be accessed.  Also this is the handle
1377334de520b0369215b7931fefa424fb92d295f0ebJames Dong        of the component whose port, specified in the nPortOutput parameter
1378334de520b0369215b7931fefa424fb92d295f0ebJames Dong        will be used the source for the tunnel. This is the component handle
1379a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        returned by the call to the OMX_GetHandle function.  There is a
1380334de520b0369215b7931fefa424fb92d295f0ebJames Dong        requirement that hOutput be the source for the data when
1381334de520b0369215b7931fefa424fb92d295f0ebJames Dong        tunelling (i.e. nPortOutput is an output port).  If 0x0, the component
1382334de520b0369215b7931fefa424fb92d295f0ebJames Dong        specified in hInput will have it's port specified in nPortInput
1383334de520b0369215b7931fefa424fb92d295f0ebJames Dong        setup for communication with the application / IL client.
1384334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] nPortOutput
1385334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nPortOutput is used to select the source port on component to be
1386a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        used in the tunnel.
1387334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] hInput
1388334de520b0369215b7931fefa424fb92d295f0ebJames Dong        This is the component to setup the tunnel with. This is the handle
1389334de520b0369215b7931fefa424fb92d295f0ebJames Dong        of the component whose port, specified in the nPortInput parameter
1390334de520b0369215b7931fefa424fb92d295f0ebJames Dong        will be used the destination for the tunnel. This is the component handle
1391a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        returned by the call to the OMX_GetHandle function.  There is a
1392334de520b0369215b7931fefa424fb92d295f0ebJames Dong        requirement that hInput be the destination for the data when
1393334de520b0369215b7931fefa424fb92d295f0ebJames Dong        tunelling (i.e. nPortInut is an input port).   If 0x0, the component
1394334de520b0369215b7931fefa424fb92d295f0ebJames Dong        specified in hOutput will have it's port specified in nPortPOutput
1395334de520b0369215b7931fefa424fb92d295f0ebJames Dong        setup for communication with the application / IL client.
1396334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] nPortInput
1397334de520b0369215b7931fefa424fb92d295f0ebJames Dong        nPortInput is used to select the destination port on component to be
1398334de520b0369215b7931fefa424fb92d295f0ebJames Dong        used in the tunnel.
1399334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @return OMX_ERRORTYPE
1400334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If the command successfully executes, the return code will be
1401334de520b0369215b7931fefa424fb92d295f0ebJames Dong        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1402a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        When OMX_ErrorNotImplemented is returned, one or both components is
1403334de520b0369215b7931fefa424fb92d295f0ebJames Dong        a non-interop component and does not support tunneling.
1404a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1405334de520b0369215b7931fefa424fb92d295f0ebJames Dong        On failure, the ports of both components are setup for communication
1406334de520b0369215b7931fefa424fb92d295f0ebJames Dong        with the application / IL Client.
1407334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup core tun
1408334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
1409334de520b0369215b7931fefa424fb92d295f0ebJames DongOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_SetupTunnel(
1410334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_IN  OMX_HANDLETYPE hOutput,
1411334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_IN  OMX_U32 nPortOutput,
1412334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_IN  OMX_HANDLETYPE hInput,
1413334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_IN  OMX_U32 nPortInput);
1414a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1415334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** @ingroup cp */
1416334de520b0369215b7931fefa424fb92d295f0ebJames DongOMX_API OMX_ERRORTYPE   OMX_GetContentPipe(
1417334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_OUT OMX_HANDLETYPE *hPipe,
1418334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_IN OMX_STRING szURI);
1419334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1420334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_GetComponentsOfRole method will return the number of components that support the given
1421a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    role and (if the compNames field is non-NULL) the names of those components. The call will fail if
1422334de520b0369215b7931fefa424fb92d295f0ebJames Dong    an insufficiently sized array of names is supplied. To ensure the array is sufficiently sized the
1423334de520b0369215b7931fefa424fb92d295f0ebJames Dong    client should:
1424334de520b0369215b7931fefa424fb92d295f0ebJames Dong        * first call this function with the compNames field NULL to determine the number of component names
1425a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        * second call this function with the compNames field pointing to an array of names allocated
1426334de520b0369215b7931fefa424fb92d295f0ebJames Dong          according to the number returned by the first call.
1427334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1428334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The core should return from this call within 5 msec.
1429a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1430334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] role
1431a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        This is generic standard component name consisting only of component class
1432334de520b0369215b7931fefa424fb92d295f0ebJames Dong        name and the type within that class (e.g. 'audio_decoder.aac').
1433334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [inout] pNumComps
1434a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        This is used both as input and output.
1435a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1436334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If compNames is NULL, the input is ignored and the output specifies how many components support
1437334de520b0369215b7931fefa424fb92d295f0ebJames Dong        the given role.
1438a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1439a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        If compNames is not NULL, on input it bounds the size of the input structure and
1440334de520b0369215b7931fefa424fb92d295f0ebJames Dong        on output, it specifies the number of components string names listed within the compNames parameter.
1441334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [inout] compNames
1442a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        If NULL this field is ignored. If non-NULL this points to an array of 128-byte strings which accepts
1443a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        a list of the names of all physical components that implement the specified standard component name.
1444334de520b0369215b7931fefa424fb92d295f0ebJames Dong        Each name is NULL terminated. numComps indicates the number of names.
1445334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup core
1446334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
1447a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos MolnarOMX_API OMX_ERRORTYPE OMX_GetComponentsOfRole (
1448a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    OMX_IN      OMX_STRING role,
1449334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_INOUT   OMX_U32 *pNumComps,
1450334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_INOUT   OMX_U8  **compNames);
1451334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1452334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_GetRolesOfComponent method will return the number of roles supported by the given
1453a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    component and (if the roles field is non-NULL) the names of those roles. The call will fail if
1454334de520b0369215b7931fefa424fb92d295f0ebJames Dong    an insufficiently sized array of names is supplied. To ensure the array is sufficiently sized the
1455334de520b0369215b7931fefa424fb92d295f0ebJames Dong    client should:
1456334de520b0369215b7931fefa424fb92d295f0ebJames Dong        * first call this function with the roles field NULL to determine the number of role names
1457a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        * second call this function with the roles field pointing to an array of names allocated
1458334de520b0369215b7931fefa424fb92d295f0ebJames Dong          according to the number returned by the first call.
1459334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1460334de520b0369215b7931fefa424fb92d295f0ebJames Dong    The core should return from this call within 5 msec.
1461334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1462334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [in] compName
1463334de520b0369215b7931fefa424fb92d295f0ebJames Dong        This is the name of the component being queried about.
1464334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [inout] pNumRoles
1465a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        This is used both as input and output.
1466a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1467334de520b0369215b7931fefa424fb92d295f0ebJames Dong        If roles is NULL, the input is ignored and the output specifies how many roles the component supports.
1468a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar
1469a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        If compNames is not NULL, on input it bounds the size of the input structure and
1470334de520b0369215b7931fefa424fb92d295f0ebJames Dong        on output, it specifies the number of roles string names listed within the roles parameter.
1471334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @param [out] roles
1472a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        If NULL this field is ignored. If non-NULL this points to an array of 128-byte strings
1473a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar        which accepts a list of the names of all standard components roles implemented on the
1474334de520b0369215b7931fefa424fb92d295f0ebJames Dong        specified component name. numComps indicates the number of names.
1475334de520b0369215b7931fefa424fb92d295f0ebJames Dong    @ingroup core
1476334de520b0369215b7931fefa424fb92d295f0ebJames Dong */
1477a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos MolnarOMX_API OMX_ERRORTYPE OMX_GetRolesOfComponent (
1478a1ae5a4fe52192525f510dc14ecf1f7d4fb107f5Lajos Molnar    OMX_IN      OMX_STRING compName,
1479334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_INOUT   OMX_U32 *pNumRoles,
1480334de520b0369215b7931fefa424fb92d295f0ebJames Dong    OMX_OUT     OMX_U8 **roles);
1481334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1482334de520b0369215b7931fefa424fb92d295f0ebJames Dong#ifdef __cplusplus
1483334de520b0369215b7931fefa424fb92d295f0ebJames Dong}
1484334de520b0369215b7931fefa424fb92d295f0ebJames Dong#endif /* __cplusplus */
1485334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1486334de520b0369215b7931fefa424fb92d295f0ebJames Dong#endif
1487334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* File EOF */
1488334de520b0369215b7931fefa424fb92d295f0ebJames Dong
1489