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