1dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/*
2dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * Copyright (c) 2008 The Khronos Group Inc.
3dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *
4dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * Permission is hereby granted, free of charge, to any person obtaining
5dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * a copy of this software and associated documentation files (the
6dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * "Software"), to deal in the Software without restriction, including
7dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * without limitation the rights to use, copy, modify, merge, publish,
8dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * distribute, sublicense, and/or sell copies of the Software, and to
9dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * permit persons to whom the Software is furnished to do so, subject
10dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * to the following conditions:
11dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * The above copyright notice and this permission notice shall be included
12dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * in all copies or substantial portions of the Software.
13dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *
14dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *
22dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
23dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
24dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** OMX_Core.h - OpenMax IL version 1.1.2
25dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  The OMX_Core header file contains the definitions used by both the
26dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  application and the component to access common items.
27dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
28dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
29dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#ifndef OMX_Core_h
30dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_Core_h
31dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
32dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#ifdef __cplusplus
33dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pellyextern "C" {
34dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#endif /* __cplusplus */
35dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
36dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
37dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/* Each OMX header shall include all required header files to allow the
38dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  header to compile without errors.  The includes below are required
39dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  for this header file to compile successfully
40dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
41dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
42dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#include <OMX_Index.h>
43dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
44dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
45dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_COMMANDTYPE enumeration is used to specify the action in the
46dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  OMX_SendCommand macro.
47dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  @ingroup core
48dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
49dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pellytypedef enum OMX_COMMANDTYPE
50dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly{
51dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_CommandStateSet,    /**< Change the component state */
52dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_CommandFlush,       /**< Flush the data queue(s) of a component */
53dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_CommandPortDisable, /**< Disable a port on a component. */
54dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_CommandPortEnable,  /**< Enable a port on a component. */
55dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_CommandMarkBuffer,  /**< Mark a component/buffer for observation */
56dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_CommandKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
57dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_CommandVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
58dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_CommandMax = 0X7FFFFFFF
59dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly} OMX_COMMANDTYPE;
60dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
61dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
62dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
63dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_STATETYPE enumeration is used to indicate or change the component
64dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  state.  This enumeration reflects the current state of the component when
65dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  used with the OMX_GetState macro or becomes the parameter in a state change
66dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  command when used with the OMX_SendCommand macro.
67dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *
68dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  The component will be in the Loaded state after the component is initially
69dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  loaded into memory.  In the Loaded state, the component is not allowed to
70dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  allocate or hold resources other than to build it's internal parameter
71dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  and configuration tables.  The application will send one or more
72dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  SetParameters/GetParameters and SetConfig/GetConfig commands to the
73dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  component and the component will record each of these parameter and
74dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  configuration changes for use later.  When the application sends the
75dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  Idle command, the component will acquire the resources needed for the
76dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  specified configuration and will transition to the idle state if the
77dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  allocation is successful.  If the component cannot successfully
78dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  transition to the idle state for any reason, the state of the component
79dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  shall be fully rolled back to the Loaded state (e.g. all allocated
80dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  resources shall be released).  When the component receives the command
81dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  to go to the Executing state, it shall begin processing buffers by
82dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  sending all input buffers it holds to the application.  While
83dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  the component is in the Idle state, the application may also send the
84dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  Pause command.  If the component receives the pause command while in the
85dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  Idle state, the component shall send all input buffers it holds to the
86dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  application, but shall not begin processing buffers.  This will allow the
87dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  application to prefill buffers.
88dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *
89dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  @ingroup comp
90dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
91dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
92dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pellytypedef enum OMX_STATETYPE
93dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly{
94dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_StateInvalid,      /**< component has detected that it's internal data
95dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                structures are corrupted to the point that
96dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                it cannot determine it's state properly */
97dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_StateLoaded,      /**< component has been loaded but has not completed
98dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                initialization.  The OMX_SetParameter macro
99dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                and the OMX_GetParameter macro are the only
100dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                valid macros allowed to be sent to the
101dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                component in this state. */
102dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_StateIdle,        /**< component initialization has been completed
103dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                successfully and the component is ready to
104dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                to start. */
105dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_StateExecuting,   /**< component has accepted the start command and
106dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                is processing data (if data is available) */
107dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_StatePause,       /**< component has received pause command */
108dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_StateWaitForResources, /**< component is waiting for resources, either after
109dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                preemption or before it gets the resources requested.
110dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                See specification for complete details. */
111dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_StateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
112dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_StateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
113dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_StateMax = 0X7FFFFFFF
114dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly} OMX_STATETYPE;
115dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
116dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_ERRORTYPE enumeration defines the standard OMX Errors.  These
117dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  errors should cover most of the common failure cases.  However,
118dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  vendors are free to add additional error messages of their own as
119dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  long as they follow these rules:
120dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  1.  Vendor error messages shall be in the range of 0x90000000 to
121dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *      0x9000FFFF.
122dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  2.  Vendor error messages shall be defined in a header file provided
123dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *      with the component.  No error messages are allowed that are
124dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *      not defined.
125dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
126dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pellytypedef enum OMX_ERRORTYPE
127dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly{
128dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorNone = 0,
129dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
130dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** There were insufficient resources to perform the requested operation */
131dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorInsufficientResources = (OMX_S32) 0x80001000,
132dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
133dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** There was an error, but the cause of the error could not be determined */
134dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorUndefined = (OMX_S32) 0x80001001,
135dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
136dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** The component name string was not valid */
137dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorInvalidComponentName = (OMX_S32) 0x80001002,
138dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
139dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** No component with the specified name string was found */
140dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorComponentNotFound = (OMX_S32) 0x80001003,
141dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
142dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** The component specified did not have a "OMX_ComponentInit" or
143dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly      "OMX_ComponentDeInit entry point */
144dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorInvalidComponent = (OMX_S32) 0x80001004,
145dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
146dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** One or more parameters were not valid */
147dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorBadParameter = (OMX_S32) 0x80001005,
148dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
149dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** The requested function is not implemented */
150dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorNotImplemented = (OMX_S32) 0x80001006,
151dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
152dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** The buffer was emptied before the next buffer was ready */
153dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorUnderflow = (OMX_S32) 0x80001007,
154dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
155dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** The buffer was not available when it was needed */
156dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorOverflow = (OMX_S32) 0x80001008,
157dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
158dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** The hardware failed to respond as expected */
159dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorHardware = (OMX_S32) 0x80001009,
160dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
161dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** The component is in the state OMX_StateInvalid */
162dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorInvalidState = (OMX_S32) 0x8000100A,
163dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
164dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** Stream is found to be corrupt */
165dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorStreamCorrupt = (OMX_S32) 0x8000100B,
166dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
167dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** Ports being connected are not compatible */
168dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorPortsNotCompatible = (OMX_S32) 0x8000100C,
169dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
170dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** Resources allocated to an idle component have been
171dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly      lost resulting in the component returning to the loaded state */
172dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorResourcesLost = (OMX_S32) 0x8000100D,
173dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
174dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** No more indicies can be enumerated */
175dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorNoMore = (OMX_S32) 0x8000100E,
176dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
177dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** The component detected a version mismatch */
178dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorVersionMismatch = (OMX_S32) 0x8000100F,
179dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
180dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** The component is not ready to return data at this time */
181dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorNotReady = (OMX_S32) 0x80001010,
182dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
183dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** There was a timeout that occurred */
184dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorTimeout = (OMX_S32) 0x80001011,
185dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
186dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** This error occurs when trying to transition into the state you are already in */
187dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorSameState = (OMX_S32) 0x80001012,
188dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
189dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** Resources allocated to an executing or paused component have been
190dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly      preempted, causing the component to return to the idle state */
191dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorResourcesPreempted = (OMX_S32) 0x80001013,
192dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
193dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** A non-supplier port sends this error to the IL client (via the EventHandler callback)
194dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly      during the allocation of buffers (on a transition from the LOADED to the IDLE state or
195dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly      on a port restart) when it deems that it has waited an unusually long time for the supplier
196dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly      to send it an allocated buffer via a UseBuffer call. */
197dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorPortUnresponsiveDuringAllocation = (OMX_S32) 0x80001014,
198dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
199dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** A non-supplier port sends this error to the IL client (via the EventHandler callback)
200dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly      during the deallocation of buffers (on a transition from the IDLE to LOADED state or
201dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly      on a port stop) when it deems that it has waited an unusually long time for the supplier
202dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly      to request the deallocation of a buffer header via a FreeBuffer call. */
203dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorPortUnresponsiveDuringDeallocation = (OMX_S32) 0x80001015,
204dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
205dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** A supplier port sends this error to the IL client (via the EventHandler callback)
206dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly      during the stopping of a port (either on a transition from the IDLE to LOADED
207dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly      state or a port stop) when it deems that it has waited an unusually long time for
208dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly      the non-supplier to return a buffer via an EmptyThisBuffer or FillThisBuffer call. */
209dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorPortUnresponsiveDuringStop = (OMX_S32) 0x80001016,
210dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
211dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** Attempting a state transtion that is not allowed */
212dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorIncorrectStateTransition = (OMX_S32) 0x80001017,
213dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
214dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /* Attempting a command that is not allowed during the present state. */
215dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorIncorrectStateOperation = (OMX_S32) 0x80001018,
216dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
217dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** The values encapsulated in the parameter or config structure are not supported. */
218dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorUnsupportedSetting = (OMX_S32) 0x80001019,
219dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
220dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** The parameter or config indicated by the given index is not supported. */
221dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorUnsupportedIndex = (OMX_S32) 0x8000101A,
222dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
223dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** The port index supplied is incorrect. */
224dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorBadPortIndex = (OMX_S32) 0x8000101B,
225dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
226dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** The port has lost one or more of its buffers and it thus unpopulated. */
227dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorPortUnpopulated = (OMX_S32) 0x8000101C,
228dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
229dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** Component suspended due to temporary loss of resources */
230dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorComponentSuspended = (OMX_S32) 0x8000101D,
231dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
232dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** Component suspended due to an inability to acquire dynamic resources */
233dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorDynamicResourcesUnavailable = (OMX_S32) 0x8000101E,
234dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
235dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** When the macroblock error reporting is enabled the component returns new error
236dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  for every frame that has errors */
237dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorMbErrorsInFrame = (OMX_S32) 0x8000101F,
238dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
239dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** A component reports this error when it cannot parse or determine the format of an input stream. */
240dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorFormatNotDetected = (OMX_S32) 0x80001020,
241dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
242dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** The content open operation failed. */
243dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorContentPipeOpenFailed = (OMX_S32) 0x80001021,
244dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
245dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** The content creation operation failed. */
246dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorContentPipeCreationFailed = (OMX_S32) 0x80001022,
247dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
248dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** Separate table information is being used */
249dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorSeperateTablesUsed = (OMX_S32) 0x80001023,
250dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
251dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  /** Tunneling is unsupported by the component*/
252dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorTunnelingUnsupported = (OMX_S32) 0x80001024,
253dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
254dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorKhronosExtensions = (OMX_S32)0x8F000000, /**< Reserved region for introducing Khronos Standard Extensions */
255dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorVendorStartUnused = (OMX_S32)0x90000000, /**< Reserved region for introducing Vendor Extensions */
256dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_ErrorMax = 0x7FFFFFFF
257dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly} OMX_ERRORTYPE;
258dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
259dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** @ingroup core */
260dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pellytypedef OMX_ERRORTYPE (* OMX_COMPONENTINITTYPE)(OMX_IN  OMX_HANDLETYPE hComponent);
261dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
262dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** @ingroup core */
263dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pellytypedef struct OMX_COMPONENTREGISTERTYPE
264dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly{
265dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  const char          * pName;       /* Component name, 128 byte limit (including '\0') applies */
266dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_COMPONENTINITTYPE pInitialize; /* Component instance initialization function */
267dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly} OMX_COMPONENTREGISTERTYPE;
268dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
269dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** @ingroup core */
270dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pellyextern OMX_COMPONENTREGISTERTYPE OMX_ComponentRegistered[];
271dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
272dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** @ingroup rpm */
273dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pellytypedef struct OMX_PRIORITYMGMTTYPE {
274dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly OMX_U32 nSize;             /**< size of the structure in bytes */
275dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly OMX_VERSIONTYPE nVersion;  /**< OMX specification version information */
276dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly OMX_U32 nGroupPriority;            /**< Priority of the component group */
277dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly OMX_U32 nGroupID;                  /**< ID of the component group */
278dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly} OMX_PRIORITYMGMTTYPE;
279dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
280dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/* Component name and Role names are limited to 128 characters including the terminating '\0'. */
281dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_MAX_STRINGNAME_SIZE 128
282dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
283dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** @ingroup comp */
284dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pellytypedef struct OMX_PARAM_COMPONENTROLETYPE {
285dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_U32 nSize;              /**< size of the structure in bytes */
286dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_VERSIONTYPE nVersion;   /**< OMX specification version information */
287dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_U8 cRole[OMX_MAX_STRINGNAME_SIZE];  /**< name of standard component which defines component role */
288dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly} OMX_PARAM_COMPONENTROLETYPE;
289dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
290dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** End of Stream Buffer Flag:
291dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  *
292dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  * A component sets EOS when it has no more data to emit on a particular
293dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  * output port. Thus an output port shall set EOS on the last buffer it
294dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  * emits. A component's determination of when an output port should
295dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  * cease sending data is implemenation specific.
296dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  * @ingroup buf
297dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  */
298dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
299dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_BUFFERFLAG_EOS 0x00000001
300dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
301dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** Start Time Buffer Flag:
302dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *
303dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * The source of a stream (e.g. a demux component) sets the STARTTIME
304dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * flag on the buffer that contains the starting timestamp for the
305dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * stream. The starting timestamp corresponds to the first data that
306dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * should be displayed at startup or after a seek.
307dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * The first timestamp of the stream is not necessarily the start time.
308dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * For instance, in the case of a seek to a particular video frame,
309dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * the target frame may be an interframe. Thus the first buffer of
310dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * the stream will be the intra-frame preceding the target frame and
311dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * the starttime will occur with the target frame (with any other
312dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * required frames required to reconstruct the target intervening).
313dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *
314dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * The STARTTIME flag is directly associated with the buffer's
315dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * timestamp ' thus its association to buffer data and its
316dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * propagation is identical to the timestamp's.
317dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *
318dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * When a Sync Component client receives a buffer with the
319dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * STARTTIME flag it shall perform a SetConfig on its sync port
320dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * using OMX_ConfigTimeClientStartTime and passing the buffer's
321dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * timestamp.
322dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *
323dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * @ingroup buf
324dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
325dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
326dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_BUFFERFLAG_STARTTIME 0x00000002
327dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
328dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
329dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
330dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** Decode Only Buffer Flag:
331dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *
332dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * The source of a stream (e.g. a demux component) sets the DECODEONLY
333dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * flag on any buffer that should shall be decoded but should not be
334dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * displayed. This flag is used, for instance, when a source seeks to
335dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * a target interframe that requires the decode of frames preceding the
336dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * target to facilitate the target's reconstruction. In this case the
337dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * source would emit the frames preceding the target downstream
338dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * but mark them as decode only.
339dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *
340dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * The DECODEONLY is associated with buffer data and propagated in a
341dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * manner identical to the buffer timestamp.
342dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *
343dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * A component that renders data should ignore all buffers with
344dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * the DECODEONLY flag set.
345dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *
346dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * @ingroup buf
347dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
348dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
349dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_BUFFERFLAG_DECODEONLY 0x00000004
350dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
351dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
352dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/* Data Corrupt Flag: This flag is set when the IL client believes the data in the associated buffer is corrupt
353dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * @ingroup buf
354dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
355dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
356dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_BUFFERFLAG_DATACORRUPT 0x00000008
357dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
358dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/* End of Frame: The buffer contains exactly one end of frame and no data
359dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  occurs after the end of frame. This flag is an optional hint. The absence
360dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  of this flag does not imply the absence of an end of frame within the buffer.
361dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * @ingroup buf
362dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly*/
363dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_BUFFERFLAG_ENDOFFRAME 0x00000010
364dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
365dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/* Sync Frame Flag: This flag is set when the buffer content contains a coded sync frame '
366dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  a frame that has no dependency on any other frame information
367dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly *  @ingroup buf
368dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
369dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_BUFFERFLAG_SYNCFRAME 0x00000020
370dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
371dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/* Extra data present flag: there is extra data appended to the data stream
372dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * residing in the buffer
373dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * @ingroup buf
374dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
375dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_BUFFERFLAG_EXTRADATA 0x00000040
376dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
377dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** Codec Config Buffer Flag:
378dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly* OMX_BUFFERFLAG_CODECCONFIG is an optional flag that is set by an
379dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly* output port when all bytes in the buffer form part or all of a set of
380dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly* codec specific configuration data.  Examples include SPS/PPS nal units
381dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly* for OMX_VIDEO_CodingAVC or AudioSpecificConfig data for
382dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly* OMX_AUDIO_CodingAAC.  Any component that for a given stream sets
383dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly* OMX_BUFFERFLAG_CODECCONFIG shall not mix codec configuration bytes
384dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly* with frame data in the same buffer, and shall send all buffers
385dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly* containing codec configuration bytes before any buffers containing
386dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly* frame data that those configurations bytes describe.
387dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly* If the stream format for a particular codec has a frame specific
388dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly* header at the start of each frame, for example OMX_AUDIO_CodingMP3 or
389dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly* OMX_AUDIO_CodingAAC in ADTS mode, then these shall be presented as
390dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly* normal without setting OMX_BUFFERFLAG_CODECCONFIG.
391dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * @ingroup buf
392dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
393dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_BUFFERFLAG_CODECCONFIG 0x00000080
394dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
395dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
396dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
397dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** @ingroup buf */
398dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pellytypedef struct OMX_BUFFERHEADERTYPE
399dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly{
400dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_U32 nSize;              /**< size of the structure in bytes */
401dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_VERSIONTYPE nVersion;   /**< OMX specification version information */
402dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_U8* pBuffer;            /**< Pointer to actual block of memory
403dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     that is acting as the buffer */
404dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_U32 nAllocLen;          /**< size of the buffer allocated, in bytes */
405dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_U32 nFilledLen;         /**< number of bytes currently in the
406dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     buffer */
407dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_U32 nOffset;            /**< start offset of valid data in bytes from
408dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     the start of the buffer */
409dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_PTR pAppPrivate;        /**< pointer to any data the application
410dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     wants to associate with this buffer */
411dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_PTR pPlatformPrivate;   /**< pointer to any data the platform
412dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     wants to associate with this buffer */
413dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_PTR pInputPortPrivate;  /**< pointer to any data the input port
414dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     wants to associate with this buffer */
415dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_PTR pOutputPortPrivate; /**< pointer to any data the output port
416dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     wants to associate with this buffer */
417dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_HANDLETYPE hMarkTargetComponent; /**< The component that will generate a
418dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                              mark event upon processing this buffer. */
419dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_PTR pMarkData;          /**< Application specific data associated with
420dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     the mark sent on a mark event to disambiguate
421dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     this mark from others. */
422dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_U32 nTickCount;         /**< Optional entry that the component and
423dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     application can update with a tick count
424dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     when they access the component.  This
425dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     value should be in microseconds.  Since
426dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     this is a value relative to an arbitrary
427dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     starting point, this value cannot be used
428dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     to determine absolute time.  This is an
429dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     optional entry and not all components
430dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     will update it.*/
431dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly OMX_TICKS nTimeStamp;          /**< Timestamp corresponding to the sample
432dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     starting at the first logical sample
433dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     boundary in the buffer. Timestamps of
434dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     successive samples within the buffer may
435dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     be inferred by adding the duration of the
436dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     of the preceding buffer to the timestamp
437dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     of the preceding buffer.*/
438dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_U32     nFlags;           /**< buffer specific flags */
439dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_U32 nOutputPortIndex;     /**< The index of the output port (if any) using
440dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     this buffer */
441dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly  OMX_U32 nInputPortIndex;      /**< The index of the input port (if any) using
442dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                     this buffer */
443dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly} OMX_BUFFERHEADERTYPE;
444dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
445dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_EXTRADATATYPE enumeration is used to define the
446dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * possible extra data payload types.
447dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * NB: this enum is binary backwards compatible with the previous
448dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * OMX_EXTRADATA_QUANT define.  This should be replaced with
449dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * OMX_ExtraDataQuantization.
450dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
451dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pellytypedef enum OMX_EXTRADATATYPE
452dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly{
453dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly   OMX_ExtraDataNone = 0,                       /**< Indicates that no more extra data sections follow */
454dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly   OMX_ExtraDataQuantization,                   /**< The data payload contains quantization data */
455dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly   OMX_ExtraDataKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
456dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly   OMX_ExtraDataVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
457dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly   OMX_ExtraDataMax = 0x7FFFFFFF
458dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly} OMX_EXTRADATATYPE;
459dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
460dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
461dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pellytypedef struct OMX_OTHER_EXTRADATATYPE  {
462dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_U32 nSize;
463dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_VERSIONTYPE nVersion;
464dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_U32 nPortIndex;
465dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_EXTRADATATYPE eType;       /* Extra Data type */
466dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_U32 nDataSize;   /* Size of the supporting data to follow */
467dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_U8  data[1];     /* Supporting data hint  */
468dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly} OMX_OTHER_EXTRADATATYPE;
469dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
470dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** @ingroup comp */
471dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pellytypedef struct OMX_PORT_PARAM_TYPE {
472dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_U32 nSize;              /**< size of the structure in bytes */
473dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_VERSIONTYPE nVersion;   /**< OMX specification version information */
474dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_U32 nPorts;             /**< The number of ports for this component */
475dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_U32 nStartPortNumber;   /** first port number for this type of port */
476dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly} OMX_PORT_PARAM_TYPE;
477dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
478dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** @ingroup comp */
479dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pellytypedef enum OMX_EVENTTYPE
480dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly{
481dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_EventCmdComplete,         /**< component has sucessfully completed a command */
482dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_EventError,               /**< component has detected an error condition */
483dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_EventMark,                /**< component has detected a buffer mark */
484dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_EventPortSettingsChanged, /**< component is reported a port settings change */
485dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_EventBufferFlag,          /**< component has detected an EOS */
486dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_EventResourcesAcquired,   /**< component has been granted resources and is
487dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                       automatically starting the state change from
488dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                       OMX_StateWaitForResources to OMX_StateIdle. */
489dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly   OMX_EventComponentResumed,     /**< Component resumed due to reacquisition of resources */
490dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly   OMX_EventDynamicResourcesAvailable, /**< Component has acquired previously unavailable dynamic resources */
491dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly   OMX_EventPortFormatDetected,      /**< Component has detected a supported format. */
492dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly   OMX_EventKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
493dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly   OMX_EventVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
494dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly   OMX_EventMax = 0x7FFFFFFF
495dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly} OMX_EVENTTYPE;
496dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
497dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pellytypedef struct OMX_CALLBACKTYPE
498dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly{
499dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    /** The EventHandler method is used to notify the application when an
500dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        event of interest occurs.  Events are defined in the OMX_EVENTTYPE
501dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        enumeration.  Please see that enumeration for details of what will
502dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        be returned for each type of event. Callbacks should not return
503dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        an error to the component, so if an error occurs, the application
504dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        shall handle it internally.  This is a blocking call.
505dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
506dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        The application should return from this call within 5 msec to avoid
507dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        blocking the component for an excessively long period of time.
508dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
509dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        @param hComponent
510dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            handle of the component to access.  This is the component
511dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            handle returned by the call to the GetHandle function.
512dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        @param pAppData
513dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            pointer to an application defined value that was provided in the
514dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            pAppData parameter to the OMX_GetHandle method for the component.
515dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            This application defined value is provided so that the application
516dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            can have a component specific context when receiving the callback.
517dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        @param eEvent
518dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            Event that the component wants to notify the application about.
519dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        @param nData1
520dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            nData will be the OMX_ERRORTYPE for an error event and will be
521dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            an OMX_COMMANDTYPE for a command complete event and OMX_INDEXTYPE for a OMX_PortSettingsChanged event.
522dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly         @param nData2
523dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            nData2 will hold further information related to the event. Can be OMX_STATETYPE for
524dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            a OMX_CommandStateSet command or port index for a OMX_PortSettingsChanged event.
525dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            Default value is 0 if not used. )
526dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        @param pEventData
527dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            Pointer to additional event-specific data (see spec for meaning).
528dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly      */
529dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
530dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly   OMX_ERRORTYPE (*EventHandler)(
531dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_IN OMX_HANDLETYPE hComponent,
532dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_IN OMX_PTR pAppData,
533dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_IN OMX_EVENTTYPE eEvent,
534dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_IN OMX_U32 nData1,
535dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_IN OMX_U32 nData2,
536dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_IN OMX_PTR pEventData);
537dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
538dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    /** The EmptyBufferDone method is used to return emptied buffers from an
539dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        input port back to the application for reuse.  This is a blocking call
540dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        so the application should not attempt to refill the buffers during this
541dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        call, but should queue them and refill them in another thread.  There
542dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        is no error return, so the application shall handle any errors generated
543dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        internally.
544dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
545dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        The application should return from this call within 5 msec.
546dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
547dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        @param hComponent
548dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            handle of the component to access.  This is the component
549dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            handle returned by the call to the GetHandle function.
550dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        @param pAppData
551dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            pointer to an application defined value that was provided in the
552dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            pAppData parameter to the OMX_GetHandle method for the component.
553dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            This application defined value is provided so that the application
554dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            can have a component specific context when receiving the callback.
555dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        @param pBuffer
556dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer
557dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            or AllocateBuffer indicating the buffer that was emptied.
558dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        @ingroup buf
559dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly     */
560dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_ERRORTYPE (*EmptyBufferDone)(
561dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_IN OMX_HANDLETYPE hComponent,
562dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_IN OMX_PTR pAppData,
563dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_IN OMX_BUFFERHEADERTYPE* pBuffer);
564dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
565dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    /** The FillBufferDone method is used to return filled buffers from an
566dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        output port back to the application for emptying and then reuse.
567dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        This is a blocking call so the application should not attempt to
568dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        empty the buffers during this call, but should queue the buffers
569dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        and empty them in another thread.  There is no error return, so
570dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        the application shall handle any errors generated internally.  The
571dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        application shall also update the buffer header to indicate the
572dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        number of bytes placed into the buffer.
573dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
574dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        The application should return from this call within 5 msec.
575dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
576dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        @param hComponent
577dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            handle of the component to access.  This is the component
578dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            handle returned by the call to the GetHandle function.
579dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        @param pAppData
580dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            pointer to an application defined value that was provided in the
581dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            pAppData parameter to the OMX_GetHandle method for the component.
582dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            This application defined value is provided so that the application
583dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            can have a component specific context when receiving the callback.
584dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        @param pBuffer
585dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer
586dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly            or AllocateBuffer indicating the buffer that was filled.
587dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        @ingroup buf
588dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly     */
589dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_ERRORTYPE (*FillBufferDone)(
590dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_OUT OMX_HANDLETYPE hComponent,
591dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_OUT OMX_PTR pAppData,
592dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer);
593dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
594dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly} OMX_CALLBACKTYPE;
595dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
596dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_BUFFERSUPPLIERTYPE enumeration is used to dictate port supplier
597dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    preference when tunneling between two ports.
598dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup tun buf
599dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly*/
600dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pellytypedef enum OMX_BUFFERSUPPLIERTYPE
601dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly{
602dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_BufferSupplyUnspecified = 0x0, /**< port supplying the buffers is unspecified,
603dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly                                              or don't care */
604dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_BufferSupplyInput,             /**< input port supplies the buffers */
605dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_BufferSupplyOutput,            /**< output port supplies the buffers */
606dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_BufferSupplyKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
607dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_BufferSupplyVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
608dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_BufferSupplyMax = 0x7FFFFFFF
609dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly} OMX_BUFFERSUPPLIERTYPE;
610dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
611dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
612dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** buffer supplier parameter
613dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly * @ingroup tun
614dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
615dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pellytypedef struct OMX_PARAM_BUFFERSUPPLIERTYPE {
616dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_U32 nSize; /**< size of the structure in bytes */
617dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
618dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_U32 nPortIndex; /**< port that this structure applies to */
619dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_BUFFERSUPPLIERTYPE eBufferSupplier; /**< buffer supplier */
620dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly} OMX_PARAM_BUFFERSUPPLIERTYPE;
621dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
622dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
623dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/**< indicates that buffers received by an input port of a tunnel
624dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly     may not modify the data in the buffers
625dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly     @ingroup tun
626dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
627dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_PORTTUNNELFLAG_READONLY 0x00000001
628dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
629dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
630dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_TUNNELSETUPTYPE structure is used to pass data from an output
631dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    port to an input port as part the two ComponentTunnelRequest calls
632dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    resulting from a OMX_SetupTunnel call from the IL Client.
633dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup tun
634dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
635dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pellytypedef struct OMX_TUNNELSETUPTYPE
636dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly{
637dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_U32 nTunnelFlags;             /**< bit flags for tunneling */
638dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_BUFFERSUPPLIERTYPE eSupplier; /**< supplier preference */
639dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly} OMX_TUNNELSETUPTYPE;
640dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
641dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/* OMX Component headers is included to enable the core to use
642dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly   macros for functions into the component for OMX release 1.0.
643dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly   Developers should not access any structures or data from within
644dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly   the component header directly */
645dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/* TO BE REMOVED - #include <OMX_Component.h> */
646dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
647dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** GetComponentVersion will return information about the component.
648dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    This is a blocking call.  This macro will go directly from the
649dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    application to the component (via a core macro).  The
650dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    component will return from this call within 5 msec.
651dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] hComponent
652dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        handle of component to execute the command
653dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [out] pComponentName
654dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to an empty string of length 128 bytes.  The component
655dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        will write its name into this string.  The name will be
656dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        terminated by a single zero byte.  The name of a component will
657dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        be 127 bytes or less to leave room for the trailing zero byte.
658dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        An example of a valid component name is "OMX.ABC.ChannelMixer\0".
659dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [out] pComponentVersion
660dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to an OMX Version structure that the component will fill
661dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        in.  The component will fill in a value that indicates the
662dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        component version.  NOTE: the component version is NOT the same
663dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        as the OMX Specification version (found in all structures).  The
664dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        component version is defined by the vendor of the component and
665dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        its value is entirely up to the component vendor.
666dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [out] pSpecVersion
667dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to an OMX Version structure that the component will fill
668dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        in.  The SpecVersion is the version of the specification that the
669dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        component was built against.  Please note that this value may or
670dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        may not match the structure's version.  For example, if the
671dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        component was built against the 2.0 specification, but the
672dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        application (which creates the structure is built against the
673dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        1.0 specification the versions would be different.
674dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [out] pComponentUUID
675dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to the UUID of the component which will be filled in by
676dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        the component.  The UUID is a unique identifier that is set at
677dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        RUN time for the component and is unique to each instantion of
678dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        the component.
679dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
680dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
681dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
682dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup comp
683dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
684dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_GetComponentVersion(                            \
685dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
686dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pComponentName,                                     \
687dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pComponentVersion,                                  \
688dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pSpecVersion,                                       \
689dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pComponentUUID)                                     \
690dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    ((OMX_COMPONENTTYPE*)hComponent)->GetComponentVersion(  \
691dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
692dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pComponentName,                                     \
693dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pComponentVersion,                                  \
694dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pSpecVersion,                                       \
695dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pComponentUUID)                 /* Macro End */
696dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
697dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
698dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** Send a command to the component.  This call is a non-blocking call.
699dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The component should check the parameters and then queue the command
700dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    to the component thread to be executed.  The component thread shall
701dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    send the EventHandler() callback at the conclusion of the command.
702dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    This macro will go directly from the application to the component (via
703dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    a core macro).  The component will return from this call within 5 msec.
704dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
705dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    When the command is "OMX_CommandStateSet" the component will queue a
706dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    state transition to the new state idenfied in nParam.
707dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
708dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    When the command is "OMX_CommandFlush", to flush a port's buffer queues,
709dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    the command will force the component to return all buffers NOT CURRENTLY
710dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    BEING PROCESSED to the application, in the order in which the buffers
711dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    were received.
712dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
713dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    When the command is "OMX_CommandPortDisable" or
714dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    "OMX_CommandPortEnable", the component's port (given by the value of
715dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    nParam) will be stopped or restarted.
716dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
717dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    When the command "OMX_CommandMarkBuffer" is used to mark a buffer, the
718dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    pCmdData will point to a OMX_MARKTYPE structure containing the component
719dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    handle of the component to examine the buffer chain for the mark.  nParam1
720dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    contains the index of the port on which the buffer mark is applied.
721dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
722dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    Specification text for more details.
723dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
724dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] hComponent
725dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        handle of component to execute the command
726dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] Cmd
727dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Command for the component to execute
728dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] nParam
729dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Parameter for the command to be executed.  When Cmd has the value
730dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_CommandStateSet, value is a member of OMX_STATETYPE.  When Cmd has
731dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        the value OMX_CommandFlush, value of nParam indicates which port(s)
732dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        to flush. -1 is used to flush all ports a single port index will
733dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        only flush that port.  When Cmd has the value "OMX_CommandPortDisable"
734dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        or "OMX_CommandPortEnable", the component's port is given by
735dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        the value of nParam.  When Cmd has the value "OMX_CommandMarkBuffer"
736dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        the components pot is given by the value of nParam.
737dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] pCmdData
738dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Parameter pointing to the OMX_MARKTYPE structure when Cmd has the value
739dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        "OMX_CommandMarkBuffer".
740dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
741dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
742dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
743dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup comp
744dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
745dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_SendCommand(                                    \
746dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly         hComponent,                                        \
747dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly         Cmd,                                               \
748dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly         nParam,                                            \
749dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly         pCmdData)                                          \
750dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly     ((OMX_COMPONENTTYPE*)hComponent)->SendCommand(         \
751dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly         hComponent,                                        \
752dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly         Cmd,                                               \
753dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly         nParam,                                            \
754dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly         pCmdData)                          /* Macro End */
755dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
756dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
757dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_GetParameter macro will get one of the current parameter
758dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    settings from the component.  This macro cannot only be invoked when
759dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    the component is in the OMX_StateInvalid state.  The nParamIndex
760dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    parameter is used to indicate which structure is being requested from
761dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    the component.  The application shall allocate the correct structure
762dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    and shall fill in the structure size and version information before
763dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    invoking this macro.  When the parameter applies to a port, the
764dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    caller shall fill in the appropriate nPortIndex value indicating the
765dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    port on which the parameter applies. If the component has not had
766dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    any settings changed, then the component should return a set of
767dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    valid DEFAULT  parameters for the component.  This is a blocking
768dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    call.
769dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
770dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The component should return from this call within 20 msec.
771dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
772dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] hComponent
773dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Handle of the component to be accessed.  This is the component
774dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        handle returned by the call to the OMX_GetHandle function.
775dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] nParamIndex
776dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Index of the structure to be filled.  This value is from the
777dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_INDEXTYPE enumeration.
778dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in,out] pComponentParameterStructure
779dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Pointer to application allocated structure to be filled by the
780dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        component.
781dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
782dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
783dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
784dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup comp
785dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
786dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_GetParameter(                                   \
787dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
788dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nParamIndex,                                        \
789dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pComponentParameterStructure)                        \
790dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    ((OMX_COMPONENTTYPE*)hComponent)->GetParameter(         \
791dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
792dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nParamIndex,                                        \
793dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pComponentParameterStructure)    /* Macro End */
794dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
795dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
796dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_SetParameter macro will send an initialization parameter
797dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    structure to a component.  Each structure shall be sent one at a time,
798dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    in a separate invocation of the macro.  This macro can only be
799dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    invoked when the component is in the OMX_StateLoaded state, or the
800dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    port is disabled (when the parameter applies to a port). The
801dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    nParamIndex parameter is used to indicate which structure is being
802dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    passed to the component.  The application shall allocate the
803dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    correct structure and shall fill in the structure size and version
804dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    information (as well as the actual data) before invoking this macro.
805dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The application is free to dispose of this structure after the call
806dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    as the component is required to copy any data it shall retain.  This
807dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    is a blocking call.
808dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
809dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The component should return from this call within 20 msec.
810dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
811dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] hComponent
812dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Handle of the component to be accessed.  This is the component
813dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        handle returned by the call to the OMX_GetHandle function.
814dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] nIndex
815dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Index of the structure to be sent.  This value is from the
816dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_INDEXTYPE enumeration.
817dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] pComponentParameterStructure
818dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to application allocated structure to be used for
819dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        initialization by the component.
820dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
821dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
822dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
823dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup comp
824dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
825dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_SetParameter(                                   \
826dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
827dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nParamIndex,                                        \
828dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pComponentParameterStructure)                        \
829dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    ((OMX_COMPONENTTYPE*)hComponent)->SetParameter(         \
830dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
831dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nParamIndex,                                        \
832dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pComponentParameterStructure)    /* Macro End */
833dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
834dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
835dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_GetConfig macro will get one of the configuration structures
836dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    from a component.  This macro can be invoked anytime after the
837dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    component has been loaded.  The nParamIndex call parameter is used to
838dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    indicate which structure is being requested from the component.  The
839dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    application shall allocate the correct structure and shall fill in the
840dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    structure size and version information before invoking this macro.
841dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    If the component has not had this configuration parameter sent before,
842dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    then the component should return a set of valid DEFAULT values for the
843dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    component.  This is a blocking call.
844dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
845dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The component should return from this call within 5 msec.
846dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
847dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] hComponent
848dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Handle of the component to be accessed.  This is the component
849dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        handle returned by the call to the OMX_GetHandle function.
850dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] nIndex
851dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Index of the structure to be filled.  This value is from the
852dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_INDEXTYPE enumeration.
853dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in,out] pComponentConfigStructure
854dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to application allocated structure to be filled by the
855dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        component.
856dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
857dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
858dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
859dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup comp
860dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly*/
861dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_GetConfig(                                      \
862dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
863dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nConfigIndex,                                       \
864dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pComponentConfigStructure)                           \
865dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    ((OMX_COMPONENTTYPE*)hComponent)->GetConfig(            \
866dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
867dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nConfigIndex,                                       \
868dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pComponentConfigStructure)       /* Macro End */
869dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
870dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
871dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_SetConfig macro will send one of the configuration
872dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    structures to a component.  Each structure shall be sent one at a time,
873dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    each in a separate invocation of the macro.  This macro can be invoked
874dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    anytime after the component has been loaded.  The application shall
875dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    allocate the correct structure and shall fill in the structure size
876dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    and version information (as well as the actual data) before invoking
877dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    this macro.  The application is free to dispose of this structure after
878dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    the call as the component is required to copy any data it shall retain.
879dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    This is a blocking call.
880dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
881dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The component should return from this call within 5 msec.
882dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
883dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] hComponent
884dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Handle of the component to be accessed.  This is the component
885dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        handle returned by the call to the OMX_GetHandle function.
886dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] nConfigIndex
887dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Index of the structure to be sent.  This value is from the
888dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_INDEXTYPE enumeration above.
889dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] pComponentConfigStructure
890dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to application allocated structure to be used for
891dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        initialization by the component.
892dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
893dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
894dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
895dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup comp
896dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
897dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_SetConfig(                                      \
898dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
899dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nConfigIndex,                                       \
900dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pComponentConfigStructure)                           \
901dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    ((OMX_COMPONENTTYPE*)hComponent)->SetConfig(            \
902dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
903dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nConfigIndex,                                       \
904dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pComponentConfigStructure)       /* Macro End */
905dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
906dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
907dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_GetExtensionIndex macro will invoke a component to translate
908dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    a vendor specific configuration or parameter string into an OMX
909dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    structure index.  There is no requirement for the vendor to support
910dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    this command for the indexes already found in the OMX_INDEXTYPE
911dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    enumeration (this is done to save space in small components).  The
912dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    component shall support all vendor supplied extension indexes not found
913dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    in the master OMX_INDEXTYPE enumeration.  This is a blocking call.
914dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
915dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The component should return from this call within 5 msec.
916dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
917dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] hComponent
918dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Handle of the component to be accessed.  This is the component
919dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        handle returned by the call to the GetHandle function.
920dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] cParameterName
921dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_STRING that shall be less than 128 characters long including
922dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        the trailing null byte.  This is the string that will get
923dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        translated by the component into a configuration index.
924dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [out] pIndexType
925dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        a pointer to a OMX_INDEXTYPE to receive the index value.
926dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
927dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
928dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
929dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup comp
930dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
931dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_GetExtensionIndex(                              \
932dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
933dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        cParameterName,                                     \
934dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pIndexType)                                         \
935dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    ((OMX_COMPONENTTYPE*)hComponent)->GetExtensionIndex(    \
936dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
937dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        cParameterName,                                     \
938dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pIndexType)                     /* Macro End */
939dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
940dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
941dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_GetState macro will invoke the component to get the current
942dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    state of the component and place the state value into the location
943dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    pointed to by pState.
944dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
945dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The component should return from this call within 5 msec.
946dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
947dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] hComponent
948dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Handle of the component to be accessed.  This is the component
949dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        handle returned by the call to the OMX_GetHandle function.
950dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [out] pState
951dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to the location to receive the state.  The value returned
952dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        is one of the OMX_STATETYPE members
953dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
954dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
955dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
956dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup comp
957dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
958dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_GetState(                                       \
959dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
960dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pState)                                             \
961dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    ((OMX_COMPONENTTYPE*)hComponent)->GetState(             \
962dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
963dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pState)                         /* Macro End */
964dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
965dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
966dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_UseBuffer macro will request that the component use
967dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    a buffer (and allocate its own buffer header) already allocated
968dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    by another component, or by the IL Client. This is a blocking
969dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    call.
970dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
971dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The component should return from this call within 20 msec.
972dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
973dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] hComponent
974dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Handle of the component to be accessed.  This is the component
975dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        handle returned by the call to the OMX_GetHandle function.
976dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [out] ppBuffer
977dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to an OMX_BUFFERHEADERTYPE structure used to receive the
978dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to the buffer header
979dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
980dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
981dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
982dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup comp buf
983dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
984dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
985dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_UseBuffer(                                      \
986dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           hComponent,                                      \
987dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           ppBufferHdr,                                     \
988dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           nPortIndex,                                      \
989dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           pAppPrivate,                                     \
990dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           nSizeBytes,                                      \
991dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           pBuffer)                                         \
992dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    ((OMX_COMPONENTTYPE*)hComponent)->UseBuffer(            \
993dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           hComponent,                                      \
994dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           ppBufferHdr,                                     \
995dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           nPortIndex,                                      \
996dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           pAppPrivate,                                     \
997dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           nSizeBytes,                                      \
998dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           pBuffer)
999dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1000dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1001dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_AllocateBuffer macro will request that the component allocate
1002dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    a new buffer and buffer header.  The component will allocate the
1003dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    buffer and the buffer header and return a pointer to the buffer
1004dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    header.  This is a blocking call.
1005dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1006dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The component should return from this call within 5 msec.
1007dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1008dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] hComponent
1009dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Handle of the component to be accessed.  This is the component
1010dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        handle returned by the call to the OMX_GetHandle function.
1011dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [out] ppBuffer
1012dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to an OMX_BUFFERHEADERTYPE structure used to receive
1013dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        the pointer to the buffer header
1014dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] nPortIndex
1015dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nPortIndex is used to select the port on the component the buffer will
1016dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        be used with.  The port can be found by using the nPortIndex
1017dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        value as an index into the Port Definition array of the component.
1018dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] pAppPrivate
1019dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pAppPrivate is used to initialize the pAppPrivate member of the
1020dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        buffer header structure.
1021dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] nSizeBytes
1022dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        size of the buffer to allocate.  Used when bAllocateNew is true.
1023dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
1024dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
1025dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1026dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup comp buf
1027dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
1028dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_AllocateBuffer(                                 \
1029dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
1030dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        ppBuffer,                                           \
1031dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nPortIndex,                                         \
1032dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pAppPrivate,                                        \
1033dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nSizeBytes)                                         \
1034dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    ((OMX_COMPONENTTYPE*)hComponent)->AllocateBuffer(       \
1035dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
1036dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        ppBuffer,                                           \
1037dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nPortIndex,                                         \
1038dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pAppPrivate,                                        \
1039dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nSizeBytes)                     /* Macro End */
1040dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1041dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1042dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_FreeBuffer macro will release a buffer header from the component
1043dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    which was allocated using either OMX_AllocateBuffer or OMX_UseBuffer. If
1044dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    the component allocated the buffer (see the OMX_UseBuffer macro) then
1045dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    the component shall free the buffer and buffer header. This is a
1046dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    blocking call.
1047dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1048dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The component should return from this call within 20 msec.
1049dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1050dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] hComponent
1051dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Handle of the component to be accessed.  This is the component
1052dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        handle returned by the call to the OMX_GetHandle function.
1053dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] nPortIndex
1054dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nPortIndex is used to select the port on the component the buffer will
1055dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        be used with.
1056dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] pBuffer
1057dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer
1058dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        or AllocateBuffer.
1059dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
1060dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
1061dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1062dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup comp buf
1063dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
1064dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_FreeBuffer(                                     \
1065dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
1066dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nPortIndex,                                         \
1067dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pBuffer)                                            \
1068dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    ((OMX_COMPONENTTYPE*)hComponent)->FreeBuffer(           \
1069dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
1070dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nPortIndex,                                         \
1071dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pBuffer)                        /* Macro End */
1072dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1073dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1074dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_EmptyThisBuffer macro will send a buffer full of data to an
1075dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    input port of a component.  The buffer will be emptied by the component
1076dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    and returned to the application via the EmptyBufferDone call back.
1077dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    This is a non-blocking call in that the component will record the buffer
1078dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    and return immediately and then empty the buffer, later, at the proper
1079dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    time.  As expected, this macro may be invoked only while the component
1080dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    is in the OMX_StateExecuting.  If nPortIndex does not specify an input
1081dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    port, the component shall return an error.
1082dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1083dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The component should return from this call within 5 msec.
1084dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1085dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] hComponent
1086dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Handle of the component to be accessed.  This is the component
1087dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        handle returned by the call to the OMX_GetHandle function.
1088dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] pBuffer
1089dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer
1090dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        or AllocateBuffer.
1091dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
1092dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
1093dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1094dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup comp buf
1095dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
1096dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_EmptyThisBuffer(                                \
1097dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
1098dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pBuffer)                                            \
1099dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    ((OMX_COMPONENTTYPE*)hComponent)->EmptyThisBuffer(      \
1100dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
1101dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pBuffer)                        /* Macro End */
1102dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1103dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1104dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_FillThisBuffer macro will send an empty buffer to an
1105dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    output port of a component.  The buffer will be filled by the component
1106dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    and returned to the application via the FillBufferDone call back.
1107dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    This is a non-blocking call in that the component will record the buffer
1108dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    and return immediately and then fill the buffer, later, at the proper
1109dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    time.  As expected, this macro may be invoked only while the component
1110dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    is in the OMX_ExecutingState.  If nPortIndex does not specify an output
1111dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    port, the component shall return an error.
1112dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1113dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The component should return from this call within 5 msec.
1114dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1115dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] hComponent
1116dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Handle of the component to be accessed.  This is the component
1117dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        handle returned by the call to the OMX_GetHandle function.
1118dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] pBuffer
1119dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer
1120dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        or AllocateBuffer.
1121dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
1122dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
1123dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1124dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup comp buf
1125dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
1126dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_FillThisBuffer(                                 \
1127dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
1128dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pBuffer)                                            \
1129dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    ((OMX_COMPONENTTYPE*)hComponent)->FillThisBuffer(       \
1130dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        hComponent,                                         \
1131dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pBuffer)                        /* Macro End */
1132dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1133dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1134dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1135dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_UseEGLImage macro will request that the component use
1136dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    a EGLImage provided by EGL (and allocate its own buffer header)
1137dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    This is a blocking call.
1138dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1139dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The component should return from this call within 20 msec.
1140dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1141dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] hComponent
1142dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Handle of the component to be accessed.  This is the component
1143dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        handle returned by the call to the OMX_GetHandle function.
1144dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [out] ppBuffer
1145dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to an OMX_BUFFERHEADERTYPE structure used to receive the
1146dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to the buffer header.  Note that the memory location used
1147dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        for this buffer is NOT visible to the IL Client.
1148dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] nPortIndex
1149dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nPortIndex is used to select the port on the component the buffer will
1150dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        be used with.  The port can be found by using the nPortIndex
1151dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        value as an index into the Port Definition array of the component.
1152dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] pAppPrivate
1153dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pAppPrivate is used to initialize the pAppPrivate member of the
1154dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        buffer header structure.
1155dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] eglImage
1156dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        eglImage contains the handle of the EGLImage to use as a buffer on the
1157dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        specified port.  The component is expected to validate properties of
1158dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        the EGLImage against the configuration of the port to ensure the component
1159dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        can use the EGLImage as a buffer.
1160dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
1161dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
1162dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1163dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup comp buf
1164dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
1165dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#define OMX_UseEGLImage(                                    \
1166dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           hComponent,                                      \
1167dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           ppBufferHdr,                                     \
1168dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           nPortIndex,                                      \
1169dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           pAppPrivate,                                     \
1170dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           eglImage)                                        \
1171dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    ((OMX_COMPONENTTYPE*)hComponent)->UseEGLImage(          \
1172dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           hComponent,                                      \
1173dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           ppBufferHdr,                                     \
1174dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           nPortIndex,                                      \
1175dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           pAppPrivate,                                     \
1176dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly           eglImage)
1177dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1178dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_Init method is used to initialize the OMX core.  It shall be the
1179dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    first call made into OMX and it should only be executed one time without
1180dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    an interviening OMX_Deinit call.
1181dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1182dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The core should return from this call within 20 msec.
1183dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1184dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
1185dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
1186dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1187dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup core
1188dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
1189dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick PellyOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Init(void);
1190dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1191dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1192dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_Deinit method is used to deinitialize the OMX core.  It shall be
1193dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    the last call made into OMX. In the event that the core determines that
1194dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    thare are components loaded when this call is made, the core may return
1195dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    with an error rather than try to unload the components.
1196dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1197dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The core should return from this call within 20 msec.
1198dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1199dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
1200dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
1201dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1202dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup core
1203dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
1204dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick PellyOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Deinit(void);
1205dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1206dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1207dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_ComponentNameEnum method will enumerate through all the names of
1208dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    recognised valid components in the system. This function is provided
1209dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    as a means to detect all the components in the system run-time. There is
1210dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    no strict ordering to the enumeration order of component names, although
1211dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    each name will only be enumerated once.  If the OMX core supports run-time
1212dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    installation of new components, it is only requried to detect newly
1213dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    installed components when the first call to enumerate component names
1214dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    is made (i.e. when nIndex is 0x0).
1215dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1216dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The core should return from this call in 20 msec.
1217dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1218dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [out] cComponentName
1219dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to a null terminated string with the component name.  The
1220dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        names of the components are strings less than 127 bytes in length
1221dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        plus the trailing null for a maximum size of 128 bytes.  An example
1222dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        of a valid component name is "OMX.TI.AUDIO.DSP.MIXER\0".  Names are
1223dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        assigned by the vendor, but shall start with "OMX." and then have
1224dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        the Vendor designation next.
1225dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] nNameLength
1226dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        number of characters in the cComponentName string.  With all
1227dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        component name strings restricted to less than 128 characters
1228dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        (including the trailing null) it is recomended that the caller
1229dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        provide a input string for the cComponentName of 128 characters.
1230dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] nIndex
1231dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        number containing the enumeration index for the component.
1232dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Multiple calls to OMX_ComponentNameEnum with increasing values
1233dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        of nIndex will enumerate through the component names in the
1234dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        system until OMX_ErrorNoMore is returned.  The value of nIndex
1235dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        is 0 to (N-1), where N is the number of valid installed components
1236dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        in the system.
1237dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
1238dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
1239dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  When the value of nIndex exceeds the number of
1240dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        components in the system minus 1, OMX_ErrorNoMore will be
1241dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        returned. Otherwise the appropriate OMX error will be returned.
1242dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup core
1243dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
1244dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick PellyOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_ComponentNameEnum(
1245dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_OUT OMX_STRING cComponentName,
1246dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_IN  OMX_U32 nNameLength,
1247dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_IN  OMX_U32 nIndex);
1248dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1249dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1250dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_GetHandle method will locate the component specified by the
1251dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    component name given, load that component into memory and then invoke
1252dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    the component's methods to create an instance of the component.
1253dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1254dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The core should return from this call within 20 msec.
1255dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1256dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [out] pHandle
1257dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to an OMX_HANDLETYPE pointer to be filled in by this method.
1258dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] cComponentName
1259dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to a null terminated string with the component name.  The
1260dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        names of the components are strings less than 127 bytes in length
1261dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        plus the trailing null for a maximum size of 128 bytes.  An example
1262dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        of a valid component name is "OMX.TI.AUDIO.DSP.MIXER\0".  Names are
1263dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        assigned by the vendor, but shall start with "OMX." and then have
1264dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        the Vendor designation next.
1265dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] pAppData
1266dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to an application defined value that will be returned
1267dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        during callbacks so that the application can identify the source
1268dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        of the callback.
1269dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] pCallBacks
1270dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        pointer to a OMX_CALLBACKTYPE structure that will be passed to the
1271dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        component to initialize it with.
1272dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
1273dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
1274dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1275dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup core
1276dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
1277dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick PellyOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_GetHandle(
1278dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_OUT OMX_HANDLETYPE* pHandle,
1279dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_IN  OMX_STRING cComponentName,
1280dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_IN  OMX_PTR pAppData,
1281dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_IN  OMX_CALLBACKTYPE* pCallBacks);
1282dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1283dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1284dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_FreeHandle method will free a handle allocated by the OMX_GetHandle
1285dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    method.  If the component reference count goes to zero, the component will
1286dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    be unloaded from memory.
1287dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1288dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The core should return from this call within 20 msec when the component is
1289dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    in the OMX_StateLoaded state.
1290dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1291dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] hComponent
1292dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Handle of the component to be accessed.  This is the component
1293dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        handle returned by the call to the GetHandle function.
1294dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
1295dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
1296dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1297dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup core
1298dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
1299dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick PellyOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_FreeHandle(
1300dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_IN  OMX_HANDLETYPE hComponent);
1301dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1302dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1303dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1304dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_SetupTunnel method will handle the necessary calls to the components
1305dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    to setup the specified tunnel the two components.  NOTE: This is
1306dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    an actual method (not a #define macro).  This method will make calls into
1307dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    the component ComponentTunnelRequest method to do the actual tunnel
1308dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    connection.
1309dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1310dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The ComponentTunnelRequest method on both components will be called.
1311dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    This method shall not be called unless the component is in the
1312dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_StateLoaded state except when the ports used for the tunnel are
1313dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    disabled. In this case, the component may be in the OMX_StateExecuting,
1314dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_StatePause, or OMX_StateIdle states.
1315dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1316dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The core should return from this call within 20 msec.
1317dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1318dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] hOutput
1319dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Handle of the component to be accessed.  Also this is the handle
1320dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        of the component whose port, specified in the nPortOutput parameter
1321dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        will be used the source for the tunnel. This is the component handle
1322dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        returned by the call to the OMX_GetHandle function.  There is a
1323dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        requirement that hOutput be the source for the data when
1324dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        tunelling (i.e. nPortOutput is an output port).  If 0x0, the component
1325dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        specified in hInput will have it's port specified in nPortInput
1326dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        setup for communication with the application / IL client.
1327dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] nPortOutput
1328dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nPortOutput is used to select the source port on component to be
1329dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        used in the tunnel.
1330dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] hInput
1331dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        This is the component to setup the tunnel with. This is the handle
1332dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        of the component whose port, specified in the nPortInput parameter
1333dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        will be used the destination for the tunnel. This is the component handle
1334dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        returned by the call to the OMX_GetHandle function.  There is a
1335dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        requirement that hInput be the destination for the data when
1336dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        tunelling (i.e. nPortInut is an input port).   If 0x0, the component
1337dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        specified in hOutput will have it's port specified in nPortPOutput
1338dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        setup for communication with the application / IL client.
1339dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] nPortInput
1340dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        nPortInput is used to select the destination port on component to be
1341dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        used in the tunnel.
1342dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @return OMX_ERRORTYPE
1343dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If the command successfully executes, the return code will be
1344dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        OMX_ErrorNone.  Otherwise the appropriate OMX error will be returned.
1345dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        When OMX_ErrorNotImplemented is returned, one or both components is
1346dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        a non-interop component and does not support tunneling.
1347dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1348dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        On failure, the ports of both components are setup for communication
1349dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        with the application / IL Client.
1350dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup core tun
1351dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
1352dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick PellyOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_SetupTunnel(
1353dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_IN  OMX_HANDLETYPE hOutput,
1354dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_IN  OMX_U32 nPortOutput,
1355dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_IN  OMX_HANDLETYPE hInput,
1356dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_IN  OMX_U32 nPortInput);
1357dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1358dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** @ingroup cp */
1359dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick PellyOMX_API OMX_ERRORTYPE   OMX_GetContentPipe(
1360dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_OUT OMX_HANDLETYPE *hPipe,
1361dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_IN OMX_STRING szURI);
1362dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1363dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_GetComponentsOfRole method will return the number of components that support the given
1364dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    role and (if the compNames field is non-NULL) the names of those components. The call will fail if
1365dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    an insufficiently sized array of names is supplied. To ensure the array is sufficiently sized the
1366dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    client should:
1367dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        * first call this function with the compNames field NULL to determine the number of component names
1368dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        * second call this function with the compNames field pointing to an array of names allocated
1369dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly          according to the number returned by the first call.
1370dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1371dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The core should return from this call within 5 msec.
1372dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1373dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] role
1374dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        This is generic standard component name consisting only of component class
1375dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        name and the type within that class (e.g. 'audio_decoder.aac').
1376dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [inout] pNumComps
1377dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        This is used both as input and output.
1378dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1379dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If compNames is NULL, the input is ignored and the output specifies how many components support
1380dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        the given role.
1381dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1382dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If compNames is not NULL, on input it bounds the size of the input structure and
1383dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        on output, it specifies the number of components string names listed within the compNames parameter.
1384dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [inout] compNames
1385dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If NULL this field is ignored. If non-NULL this points to an array of 128-byte strings which accepts
1386dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        a list of the names of all physical components that implement the specified standard component name.
1387dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        Each name is NULL terminated. numComps indicates the number of names.
1388dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup core
1389dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
1390dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick PellyOMX_API OMX_ERRORTYPE OMX_GetComponentsOfRole (
1391dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly	OMX_IN      OMX_STRING role,
1392dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_INOUT   OMX_U32 *pNumComps,
1393dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_INOUT   OMX_U8  **compNames);
1394dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1395dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/** The OMX_GetRolesOfComponent method will return the number of roles supported by the given
1396dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    component and (if the roles field is non-NULL) the names of those roles. The call will fail if
1397dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    an insufficiently sized array of names is supplied. To ensure the array is sufficiently sized the
1398dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    client should:
1399dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        * first call this function with the roles field NULL to determine the number of role names
1400dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        * second call this function with the roles field pointing to an array of names allocated
1401dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly          according to the number returned by the first call.
1402dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1403dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    The core should return from this call within 5 msec.
1404dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1405dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [in] compName
1406dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        This is the name of the component being queried about.
1407dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [inout] pNumRoles
1408dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        This is used both as input and output.
1409dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1410dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If roles is NULL, the input is ignored and the output specifies how many roles the component supports.
1411dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1412dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If compNames is not NULL, on input it bounds the size of the input structure and
1413dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        on output, it specifies the number of roles string names listed within the roles parameter.
1414dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @param [out] roles
1415dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        If NULL this field is ignored. If non-NULL this points to an array of 128-byte strings
1416dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        which accepts a list of the names of all standard components roles implemented on the
1417dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly        specified component name. numComps indicates the number of names.
1418dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    @ingroup core
1419dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly */
1420dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick PellyOMX_API OMX_ERRORTYPE OMX_GetRolesOfComponent (
1421dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly	OMX_IN      OMX_STRING compName,
1422dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_INOUT   OMX_U32 *pNumRoles,
1423dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly    OMX_OUT     OMX_U8 **roles);
1424dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1425dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#ifdef __cplusplus
1426dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly}
1427dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#endif /* __cplusplus */
1428dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1429dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly#endif
1430dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly/* File EOF */
1431dcbe497a7b22a4e1e52189ea70bf75227f55aa8eNick Pelly
1432