120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/* 220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * Copyright (c) 2008 The Khronos Group Inc. 320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * 420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * Permission is hereby granted, free of charge, to any person obtaining 520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * a copy of this software and associated documentation files (the 620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * "Software"), to deal in the Software without restriction, including 720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * without limitation the rights to use, copy, modify, merge, publish, 820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * distribute, sublicense, and/or sell copies of the Software, and to 920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * permit persons to whom the Software is furnished to do so, subject 1020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * to the following conditions: 1120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * The above copyright notice and this permission notice shall be included 1220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * in all copies or substantial portions of the Software. 1320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * 1420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 1820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 1920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 2020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * 2220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 2320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 2420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** OMX_Core.h - OpenMax IL version 1.1.2 2520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * The OMX_Core header file contains the definitions used by both the 2620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * application and the component to access common items. 2720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 2820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 2920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#ifndef OMX_Core_h 3020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_Core_h 3120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 3220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#ifdef __cplusplus 3320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Changextern "C" { 3420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#endif /* __cplusplus */ 3520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 3620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 3720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/* Each OMX header shall include all required header files to allow the 3820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * header to compile without errors. The includes below are required 3920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * for this header file to compile successfully 4020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 4120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 4220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#include <OMX_Index.h> 4320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 4420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 4520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_COMMANDTYPE enumeration is used to specify the action in the 4620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * OMX_SendCommand macro. 4720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * @ingroup core 4820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 4920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Changtypedef enum OMX_COMMANDTYPE 5020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang{ 5120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_CommandStateSet, /**< Change the component state */ 5220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_CommandFlush, /**< Flush the data queue(s) of a component */ 5320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_CommandPortDisable, /**< Disable a port on a component. */ 5420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_CommandPortEnable, /**< Enable a port on a component. */ 5520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_CommandMarkBuffer, /**< Mark a component/buffer for observation */ 5620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_CommandKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 5720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_CommandVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ 5820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_CommandMax = 0X7FFFFFFF 5920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang} OMX_COMMANDTYPE; 6020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 6120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 6220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 6320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_STATETYPE enumeration is used to indicate or change the component 6420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * state. This enumeration reflects the current state of the component when 6520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * used with the OMX_GetState macro or becomes the parameter in a state change 6620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * command when used with the OMX_SendCommand macro. 6720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * 6820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * The component will be in the Loaded state after the component is initially 6920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * loaded into memory. In the Loaded state, the component is not allowed to 7020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * allocate or hold resources other than to build it's internal parameter 7120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * and configuration tables. The application will send one or more 7220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * SetParameters/GetParameters and SetConfig/GetConfig commands to the 7320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * component and the component will record each of these parameter and 7420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * configuration changes for use later. When the application sends the 7520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * Idle command, the component will acquire the resources needed for the 7620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * specified configuration and will transition to the idle state if the 7720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * allocation is successful. If the component cannot successfully 7820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * transition to the idle state for any reason, the state of the component 7920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * shall be fully rolled back to the Loaded state (e.g. all allocated 8020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * resources shall be released). When the component receives the command 8120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * to go to the Executing state, it shall begin processing buffers by 8220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * sending all input buffers it holds to the application. While 8320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * the component is in the Idle state, the application may also send the 8420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * Pause command. If the component receives the pause command while in the 8520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * Idle state, the component shall send all input buffers it holds to the 8620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * application, but shall not begin processing buffers. This will allow the 8720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * application to prefill buffers. 8820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * 8920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * @ingroup comp 9020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 9120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 9220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Changtypedef enum OMX_STATETYPE 9320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang{ 9420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_StateInvalid, /**< component has detected that it's internal data 9520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang structures are corrupted to the point that 9620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang it cannot determine it's state properly */ 9720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_StateLoaded, /**< component has been loaded but has not completed 9820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang initialization. The OMX_SetParameter macro 9920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang and the OMX_GetParameter macro are the only 10020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang valid macros allowed to be sent to the 10120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang component in this state. */ 10220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_StateIdle, /**< component initialization has been completed 10320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang successfully and the component is ready to 10420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang to start. */ 10520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_StateExecuting, /**< component has accepted the start command and 10620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang is processing data (if data is available) */ 10720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_StatePause, /**< component has received pause command */ 10820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_StateWaitForResources, /**< component is waiting for resources, either after 10920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang preemption or before it gets the resources requested. 11020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang See specification for complete details. */ 11120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_StateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 11220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_StateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ 11320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_StateMax = 0X7FFFFFFF 11420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang} OMX_STATETYPE; 11520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 11620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_ERRORTYPE enumeration defines the standard OMX Errors. These 11720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * errors should cover most of the common failure cases. However, 11820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * vendors are free to add additional error messages of their own as 11920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * long as they follow these rules: 12020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * 1. Vendor error messages shall be in the range of 0x90000000 to 12120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * 0x9000FFFF. 12220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * 2. Vendor error messages shall be defined in a header file provided 12320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * with the component. No error messages are allowed that are 12420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * not defined. 12520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 12620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Changtypedef enum OMX_ERRORTYPE 12720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang{ 12820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone = 0, 12920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 13020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** There were insufficient resources to perform the requested operation */ 13120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorInsufficientResources = (OMX_S32) 0x80001000, 13220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 13320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** There was an error, but the cause of the error could not be determined */ 13420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorUndefined = (OMX_S32) 0x80001001, 13520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 13620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** The component name string was not valid */ 13720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorInvalidComponentName = (OMX_S32) 0x80001002, 13820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 13920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** No component with the specified name string was found */ 14020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorComponentNotFound = (OMX_S32) 0x80001003, 14120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 14220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** The component specified did not have a "OMX_ComponentInit" or 14320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang "OMX_ComponentDeInit entry point */ 14420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorInvalidComponent = (OMX_S32) 0x80001004, 14520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 14620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** One or more parameters were not valid */ 14720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorBadParameter = (OMX_S32) 0x80001005, 14820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 14920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** The requested function is not implemented */ 15020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNotImplemented = (OMX_S32) 0x80001006, 15120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 15220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** The buffer was emptied before the next buffer was ready */ 15320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorUnderflow = (OMX_S32) 0x80001007, 15420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 15520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** The buffer was not available when it was needed */ 15620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorOverflow = (OMX_S32) 0x80001008, 15720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 15820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** The hardware failed to respond as expected */ 15920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorHardware = (OMX_S32) 0x80001009, 16020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 16120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** The component is in the state OMX_StateInvalid */ 16220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorInvalidState = (OMX_S32) 0x8000100A, 16320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 16420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** Stream is found to be corrupt */ 16520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorStreamCorrupt = (OMX_S32) 0x8000100B, 16620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 16720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** Ports being connected are not compatible */ 16820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorPortsNotCompatible = (OMX_S32) 0x8000100C, 16920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 17020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** Resources allocated to an idle component have been 17120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang lost resulting in the component returning to the loaded state */ 17220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorResourcesLost = (OMX_S32) 0x8000100D, 17320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 17420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** No more indicies can be enumerated */ 17520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNoMore = (OMX_S32) 0x8000100E, 17620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 17720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** The component detected a version mismatch */ 17820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorVersionMismatch = (OMX_S32) 0x8000100F, 17920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 18020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** The component is not ready to return data at this time */ 18120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNotReady = (OMX_S32) 0x80001010, 18220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 18320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** There was a timeout that occurred */ 18420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorTimeout = (OMX_S32) 0x80001011, 18520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 18620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** This error occurs when trying to transition into the state you are already in */ 18720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorSameState = (OMX_S32) 0x80001012, 18820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 18920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** Resources allocated to an executing or paused component have been 19020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang preempted, causing the component to return to the idle state */ 19120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorResourcesPreempted = (OMX_S32) 0x80001013, 19220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 19320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** A non-supplier port sends this error to the IL client (via the EventHandler callback) 19420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang during the allocation of buffers (on a transition from the LOADED to the IDLE state or 19520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang on a port restart) when it deems that it has waited an unusually long time for the supplier 19620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang to send it an allocated buffer via a UseBuffer call. */ 19720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorPortUnresponsiveDuringAllocation = (OMX_S32) 0x80001014, 19820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 19920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** A non-supplier port sends this error to the IL client (via the EventHandler callback) 20020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang during the deallocation of buffers (on a transition from the IDLE to LOADED state or 20120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang on a port stop) when it deems that it has waited an unusually long time for the supplier 20220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang to request the deallocation of a buffer header via a FreeBuffer call. */ 20320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorPortUnresponsiveDuringDeallocation = (OMX_S32) 0x80001015, 20420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 20520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** A supplier port sends this error to the IL client (via the EventHandler callback) 20620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang during the stopping of a port (either on a transition from the IDLE to LOADED 20720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang state or a port stop) when it deems that it has waited an unusually long time for 20820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the non-supplier to return a buffer via an EmptyThisBuffer or FillThisBuffer call. */ 20920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorPortUnresponsiveDuringStop = (OMX_S32) 0x80001016, 21020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 21120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** Attempting a state transtion that is not allowed */ 21220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorIncorrectStateTransition = (OMX_S32) 0x80001017, 21320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 21420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /* Attempting a command that is not allowed during the present state. */ 21520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorIncorrectStateOperation = (OMX_S32) 0x80001018, 21620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 21720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** The values encapsulated in the parameter or config structure are not supported. */ 21820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorUnsupportedSetting = (OMX_S32) 0x80001019, 21920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 22020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** The parameter or config indicated by the given index is not supported. */ 22120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorUnsupportedIndex = (OMX_S32) 0x8000101A, 22220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 22320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** The port index supplied is incorrect. */ 22420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorBadPortIndex = (OMX_S32) 0x8000101B, 22520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 22620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** The port has lost one or more of its buffers and it thus unpopulated. */ 22720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorPortUnpopulated = (OMX_S32) 0x8000101C, 22820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 22920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** Component suspended due to temporary loss of resources */ 23020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorComponentSuspended = (OMX_S32) 0x8000101D, 23120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 23220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** Component suspended due to an inability to acquire dynamic resources */ 23320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorDynamicResourcesUnavailable = (OMX_S32) 0x8000101E, 23420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 23520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** When the macroblock error reporting is enabled the component returns new error 23620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang for every frame that has errors */ 23720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorMbErrorsInFrame = (OMX_S32) 0x8000101F, 23820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 23920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** A component reports this error when it cannot parse or determine the format of an input stream. */ 24020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorFormatNotDetected = (OMX_S32) 0x80001020, 24120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 24220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** The content open operation failed. */ 24320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorContentPipeOpenFailed = (OMX_S32) 0x80001021, 24420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 24520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** The content creation operation failed. */ 24620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorContentPipeCreationFailed = (OMX_S32) 0x80001022, 24720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 24820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** Separate table information is being used */ 24920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorSeperateTablesUsed = (OMX_S32) 0x80001023, 25020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 25120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** Tunneling is unsupported by the component*/ 25220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorTunnelingUnsupported = (OMX_S32) 0x80001024, 25320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 25420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorKhronosExtensions = (OMX_S32)0x8F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 25520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorVendorStartUnused = (OMX_S32)0x90000000, /**< Reserved region for introducing Vendor Extensions */ 25620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorMax = 0x7FFFFFFF 25720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang} OMX_ERRORTYPE; 25820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 25920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** @ingroup core */ 26020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Changtypedef OMX_ERRORTYPE (* OMX_COMPONENTINITTYPE)(OMX_IN OMX_HANDLETYPE hComponent); 26120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 26220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** @ingroup core */ 26320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Changtypedef struct OMX_COMPONENTREGISTERTYPE 26420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang{ 26520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang const char * pName; /* Component name, 128 byte limit (including '\0') applies */ 26620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_COMPONENTINITTYPE pInitialize; /* Component instance initialization function */ 26720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang} OMX_COMPONENTREGISTERTYPE; 26820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 26920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** @ingroup core */ 27020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Changextern OMX_COMPONENTREGISTERTYPE OMX_ComponentRegistered[]; 27120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 27220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** @ingroup rpm */ 27320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Changtypedef struct OMX_PRIORITYMGMTTYPE { 27420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nSize; /**< size of the structure in bytes */ 27520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 27620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nGroupPriority; /**< Priority of the component group */ 27720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nGroupID; /**< ID of the component group */ 27820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang} OMX_PRIORITYMGMTTYPE; 27920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 28020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/* Component name and Role names are limited to 128 characters including the terminating '\0'. */ 28120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_MAX_STRINGNAME_SIZE 128 28220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 28320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** @ingroup comp */ 28420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Changtypedef struct OMX_PARAM_COMPONENTROLETYPE { 28520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nSize; /**< size of the structure in bytes */ 28620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 28720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U8 cRole[OMX_MAX_STRINGNAME_SIZE]; /**< name of standard component which defines component role */ 28820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang} OMX_PARAM_COMPONENTROLETYPE; 28920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 29020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** End of Stream Buffer Flag: 29120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * 29220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * A component sets EOS when it has no more data to emit on a particular 29320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * output port. Thus an output port shall set EOS on the last buffer it 29420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * emits. A component's determination of when an output port should 29520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * cease sending data is implemenation specific. 29620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * @ingroup buf 29720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 29820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 29920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_BUFFERFLAG_EOS 0x00000001 30020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 30120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** Start Time Buffer Flag: 30220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * 30320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * The source of a stream (e.g. a demux component) sets the STARTTIME 30420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * flag on the buffer that contains the starting timestamp for the 30520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * stream. The starting timestamp corresponds to the first data that 30620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * should be displayed at startup or after a seek. 30720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * The first timestamp of the stream is not necessarily the start time. 30820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * For instance, in the case of a seek to a particular video frame, 30920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * the target frame may be an interframe. Thus the first buffer of 31020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * the stream will be the intra-frame preceding the target frame and 31120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * the starttime will occur with the target frame (with any other 31220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * required frames required to reconstruct the target intervening). 31320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * 31420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * The STARTTIME flag is directly associated with the buffer's 31520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * timestamp ' thus its association to buffer data and its 31620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * propagation is identical to the timestamp's. 31720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * 31820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * When a Sync Component client receives a buffer with the 31920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * STARTTIME flag it shall perform a SetConfig on its sync port 32020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * using OMX_ConfigTimeClientStartTime and passing the buffer's 32120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * timestamp. 32220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * 32320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * @ingroup buf 32420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 32520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 32620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_BUFFERFLAG_STARTTIME 0x00000002 32720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 32820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 32920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 33020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** Decode Only Buffer Flag: 33120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * 33220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * The source of a stream (e.g. a demux component) sets the DECODEONLY 33320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * flag on any buffer that should shall be decoded but should not be 33420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * displayed. This flag is used, for instance, when a source seeks to 33520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * a target interframe that requires the decode of frames preceding the 33620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * target to facilitate the target's reconstruction. In this case the 33720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * source would emit the frames preceding the target downstream 33820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * but mark them as decode only. 33920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * 34020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * The DECODEONLY is associated with buffer data and propagated in a 34120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * manner identical to the buffer timestamp. 34220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * 34320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * A component that renders data should ignore all buffers with 34420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * the DECODEONLY flag set. 34520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * 34620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * @ingroup buf 34720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 34820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 34920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_BUFFERFLAG_DECODEONLY 0x00000004 35020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 35120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 35220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/* Data Corrupt Flag: This flag is set when the IL client believes the data in the associated buffer is corrupt 35320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * @ingroup buf 35420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 35520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 35620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_BUFFERFLAG_DATACORRUPT 0x00000008 35720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 35820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/* End of Frame: The buffer contains exactly one end of frame and no data 35920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * occurs after the end of frame. This flag is an optional hint. The absence 36020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * of this flag does not imply the absence of an end of frame within the buffer. 36120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * @ingroup buf 36220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang*/ 36320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_BUFFERFLAG_ENDOFFRAME 0x00000010 36420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 36520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/* Sync Frame Flag: This flag is set when the buffer content contains a coded sync frame ' 36620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * a frame that has no dependency on any other frame information 36720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * @ingroup buf 36820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 36920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_BUFFERFLAG_SYNCFRAME 0x00000020 37020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 37120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/* Extra data present flag: there is extra data appended to the data stream 37220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * residing in the buffer 37320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * @ingroup buf 37420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 37520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_BUFFERFLAG_EXTRADATA 0x00000040 37620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 37720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** Codec Config Buffer Flag: 37820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang* OMX_BUFFERFLAG_CODECCONFIG is an optional flag that is set by an 37920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang* output port when all bytes in the buffer form part or all of a set of 38020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang* codec specific configuration data. Examples include SPS/PPS nal units 38120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang* for OMX_VIDEO_CodingAVC or AudioSpecificConfig data for 38220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang* OMX_AUDIO_CodingAAC. Any component that for a given stream sets 38320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang* OMX_BUFFERFLAG_CODECCONFIG shall not mix codec configuration bytes 38420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang* with frame data in the same buffer, and shall send all buffers 38520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang* containing codec configuration bytes before any buffers containing 38620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang* frame data that those configurations bytes describe. 38720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang* If the stream format for a particular codec has a frame specific 38820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang* header at the start of each frame, for example OMX_AUDIO_CodingMP3 or 38920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang* OMX_AUDIO_CodingAAC in ADTS mode, then these shall be presented as 39020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang* normal without setting OMX_BUFFERFLAG_CODECCONFIG. 39120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * @ingroup buf 39220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 39320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_BUFFERFLAG_CODECCONFIG 0x00000080 39420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 39520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 39620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 39720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** @ingroup buf */ 39820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Changtypedef struct OMX_BUFFERHEADERTYPE 39920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang{ 40020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nSize; /**< size of the structure in bytes */ 40120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 40220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U8* pBuffer; /**< Pointer to actual block of memory 40320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang that is acting as the buffer */ 40420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nAllocLen; /**< size of the buffer allocated, in bytes */ 40520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nFilledLen; /**< number of bytes currently in the 40620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang buffer */ 40720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nOffset; /**< start offset of valid data in bytes from 40820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the start of the buffer */ 40920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_PTR pAppPrivate; /**< pointer to any data the application 41020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang wants to associate with this buffer */ 41120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_PTR pPlatformPrivate; /**< pointer to any data the platform 41220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang wants to associate with this buffer */ 41320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_PTR pInputPortPrivate; /**< pointer to any data the input port 41420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang wants to associate with this buffer */ 41520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_PTR pOutputPortPrivate; /**< pointer to any data the output port 41620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang wants to associate with this buffer */ 41720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_HANDLETYPE hMarkTargetComponent; /**< The component that will generate a 41820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang mark event upon processing this buffer. */ 41920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_PTR pMarkData; /**< Application specific data associated with 42020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the mark sent on a mark event to disambiguate 42120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang this mark from others. */ 42220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nTickCount; /**< Optional entry that the component and 42320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang application can update with a tick count 42420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang when they access the component. This 42520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang value should be in microseconds. Since 42620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang this is a value relative to an arbitrary 42720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang starting point, this value cannot be used 42820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang to determine absolute time. This is an 42920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang optional entry and not all components 43020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang will update it.*/ 43120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_TICKS nTimeStamp; /**< Timestamp corresponding to the sample 43220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang starting at the first logical sample 43320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang boundary in the buffer. Timestamps of 43420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang successive samples within the buffer may 43520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang be inferred by adding the duration of the 43620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang of the preceding buffer to the timestamp 43720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang of the preceding buffer.*/ 43820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nFlags; /**< buffer specific flags */ 43920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nOutputPortIndex; /**< The index of the output port (if any) using 44020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang this buffer */ 44120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nInputPortIndex; /**< The index of the input port (if any) using 44220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang this buffer */ 44320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang} OMX_BUFFERHEADERTYPE; 44420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 44520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_EXTRADATATYPE enumeration is used to define the 44620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * possible extra data payload types. 44720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * NB: this enum is binary backwards compatible with the previous 44820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * OMX_EXTRADATA_QUANT define. This should be replaced with 44920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * OMX_ExtraDataQuantization. 45020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 45120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Changtypedef enum OMX_EXTRADATATYPE 45220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang{ 45320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ExtraDataNone = 0, /**< Indicates that no more extra data sections follow */ 45420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ExtraDataQuantization, /**< The data payload contains quantization data */ 45520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ExtraDataKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 45620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ExtraDataVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ 45720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ExtraDataMax = 0x7FFFFFFF 45820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang} OMX_EXTRADATATYPE; 45920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 46020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 46120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Changtypedef struct OMX_OTHER_EXTRADATATYPE { 46220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nSize; 46320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_VERSIONTYPE nVersion; 46420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nPortIndex; 46520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_EXTRADATATYPE eType; /* Extra Data type */ 46620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nDataSize; /* Size of the supporting data to follow */ 46720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U8 data[1]; /* Supporting data hint */ 46820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang} OMX_OTHER_EXTRADATATYPE; 46920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 47020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** @ingroup comp */ 47120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Changtypedef struct OMX_PORT_PARAM_TYPE { 47220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nSize; /**< size of the structure in bytes */ 47320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 47420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nPorts; /**< The number of ports for this component */ 47520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nStartPortNumber; /** first port number for this type of port */ 47620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang} OMX_PORT_PARAM_TYPE; 47720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 47820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** @ingroup comp */ 47920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Changtypedef enum OMX_EVENTTYPE 48020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang{ 48120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_EventCmdComplete, /**< component has sucessfully completed a command */ 48220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_EventError, /**< component has detected an error condition */ 48320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_EventMark, /**< component has detected a buffer mark */ 48420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_EventPortSettingsChanged, /**< component is reported a port settings change */ 48520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_EventBufferFlag, /**< component has detected an EOS */ 48620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_EventResourcesAcquired, /**< component has been granted resources and is 48720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang automatically starting the state change from 48820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_StateWaitForResources to OMX_StateIdle. */ 48920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_EventComponentResumed, /**< Component resumed due to reacquisition of resources */ 49020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_EventDynamicResourcesAvailable, /**< Component has acquired previously unavailable dynamic resources */ 49120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_EventPortFormatDetected, /**< Component has detected a supported format. */ 49220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_EventKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 49320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_EventVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ 49420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_EventMax = 0x7FFFFFFF 49520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang} OMX_EVENTTYPE; 49620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 49720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Changtypedef struct OMX_CALLBACKTYPE 49820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang{ 49920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** The EventHandler method is used to notify the application when an 50020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang event of interest occurs. Events are defined in the OMX_EVENTTYPE 50120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang enumeration. Please see that enumeration for details of what will 50220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang be returned for each type of event. Callbacks should not return 50320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang an error to the component, so if an error occurs, the application 50420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang shall handle it internally. This is a blocking call. 50520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 50620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The application should return from this call within 5 msec to avoid 50720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang blocking the component for an excessively long period of time. 50820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 50920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param hComponent 51020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle of the component to access. This is the component 51120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle returned by the call to the GetHandle function. 51220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param pAppData 51320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to an application defined value that was provided in the 51420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pAppData parameter to the OMX_GetHandle method for the component. 51520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang This application defined value is provided so that the application 51620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang can have a component specific context when receiving the callback. 51720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param eEvent 51820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Event that the component wants to notify the application about. 51920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param nData1 52020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nData will be the OMX_ERRORTYPE for an error event and will be 52120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang an OMX_COMMANDTYPE for a command complete event and OMX_INDEXTYPE for a OMX_PortSettingsChanged event. 52220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param nData2 52320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nData2 will hold further information related to the event. Can be OMX_STATETYPE for 52420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang a OMX_CommandStateSet command or port index for a OMX_PortSettingsChanged event. 52520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Default value is 0 if not used. ) 52620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param pEventData 52720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Pointer to additional event-specific data (see spec for meaning). 52820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 52920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 53020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ERRORTYPE (*EventHandler)( 53120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_HANDLETYPE hComponent, 53220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_PTR pAppData, 53320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_EVENTTYPE eEvent, 53420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_U32 nData1, 53520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_U32 nData2, 53620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_PTR pEventData); 53720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 53820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** The EmptyBufferDone method is used to return emptied buffers from an 53920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang input port back to the application for reuse. This is a blocking call 54020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang so the application should not attempt to refill the buffers during this 54120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang call, but should queue them and refill them in another thread. There 54220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang is no error return, so the application shall handle any errors generated 54320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang internally. 54420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 54520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The application should return from this call within 5 msec. 54620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 54720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param hComponent 54820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle of the component to access. This is the component 54920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle returned by the call to the GetHandle function. 55020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param pAppData 55120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to an application defined value that was provided in the 55220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pAppData parameter to the OMX_GetHandle method for the component. 55320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang This application defined value is provided so that the application 55420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang can have a component specific context when receiving the callback. 55520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param pBuffer 55620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer 55720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang or AllocateBuffer indicating the buffer that was emptied. 55820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup buf 55920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 56020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ERRORTYPE (*EmptyBufferDone)( 56120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_HANDLETYPE hComponent, 56220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_PTR pAppData, 56320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_BUFFERHEADERTYPE* pBuffer); 56420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 56520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang /** The FillBufferDone method is used to return filled buffers from an 56620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang output port back to the application for emptying and then reuse. 56720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang This is a blocking call so the application should not attempt to 56820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang empty the buffers during this call, but should queue the buffers 56920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang and empty them in another thread. There is no error return, so 57020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the application shall handle any errors generated internally. The 57120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang application shall also update the buffer header to indicate the 57220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang number of bytes placed into the buffer. 57320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 57420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The application should return from this call within 5 msec. 57520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 57620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param hComponent 57720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle of the component to access. This is the component 57820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle returned by the call to the GetHandle function. 57920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param pAppData 58020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to an application defined value that was provided in the 58120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pAppData parameter to the OMX_GetHandle method for the component. 58220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang This application defined value is provided so that the application 58320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang can have a component specific context when receiving the callback. 58420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param pBuffer 58520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer 58620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang or AllocateBuffer indicating the buffer that was filled. 58720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup buf 58820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 58920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ERRORTYPE (*FillBufferDone)( 59020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_OUT OMX_HANDLETYPE hComponent, 59120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_OUT OMX_PTR pAppData, 59220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer); 59320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 59420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang} OMX_CALLBACKTYPE; 59520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 59620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_BUFFERSUPPLIERTYPE enumeration is used to dictate port supplier 59720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang preference when tunneling between two ports. 59820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup tun buf 59920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang*/ 60020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Changtypedef enum OMX_BUFFERSUPPLIERTYPE 60120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang{ 60220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_BufferSupplyUnspecified = 0x0, /**< port supplying the buffers is unspecified, 60320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang or don't care */ 60420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_BufferSupplyInput, /**< input port supplies the buffers */ 60520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_BufferSupplyOutput, /**< output port supplies the buffers */ 60620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_BufferSupplyKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 60720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_BufferSupplyVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ 60820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_BufferSupplyMax = 0x7FFFFFFF 60920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang} OMX_BUFFERSUPPLIERTYPE; 61020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 61120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 61220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** buffer supplier parameter 61320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * @ingroup tun 61420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 61520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Changtypedef struct OMX_PARAM_BUFFERSUPPLIERTYPE { 61620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nSize; /**< size of the structure in bytes */ 61720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 61820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nPortIndex; /**< port that this structure applies to */ 61920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_BUFFERSUPPLIERTYPE eBufferSupplier; /**< buffer supplier */ 62020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang} OMX_PARAM_BUFFERSUPPLIERTYPE; 62120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 62220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 62320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/**< indicates that buffers received by an input port of a tunnel 62420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang may not modify the data in the buffers 62520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup tun 62620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 62720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_PORTTUNNELFLAG_READONLY 0x00000001 62820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 62920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 63020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_TUNNELSETUPTYPE structure is used to pass data from an output 63120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang port to an input port as part the two ComponentTunnelRequest calls 63220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang resulting from a OMX_SetupTunnel call from the IL Client. 63320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup tun 63420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 63520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Changtypedef struct OMX_TUNNELSETUPTYPE 63620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang{ 63720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_U32 nTunnelFlags; /**< bit flags for tunneling */ 63820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_BUFFERSUPPLIERTYPE eSupplier; /**< supplier preference */ 63920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang} OMX_TUNNELSETUPTYPE; 64020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 64120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/* OMX Component headers is included to enable the core to use 64220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang macros for functions into the component for OMX release 1.0. 64320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Developers should not access any structures or data from within 64420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the component header directly */ 64520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/* TO BE REMOVED - #include <OMX_Component.h> */ 64620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 64720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** GetComponentVersion will return information about the component. 64820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang This is a blocking call. This macro will go directly from the 64920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang application to the component (via a core macro). The 65020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang component will return from this call within 5 msec. 65120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] hComponent 65220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle of component to execute the command 65320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [out] pComponentName 65420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to an empty string of length 128 bytes. The component 65520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang will write its name into this string. The name will be 65620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang terminated by a single zero byte. The name of a component will 65720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang be 127 bytes or less to leave room for the trailing zero byte. 65820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang An example of a valid component name is "OMX.ABC.ChannelMixer\0". 65920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [out] pComponentVersion 66020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to an OMX Version structure that the component will fill 66120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang in. The component will fill in a value that indicates the 66220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang component version. NOTE: the component version is NOT the same 66320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang as the OMX Specification version (found in all structures). The 66420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang component version is defined by the vendor of the component and 66520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang its value is entirely up to the component vendor. 66620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [out] pSpecVersion 66720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to an OMX Version structure that the component will fill 66820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang in. The SpecVersion is the version of the specification that the 66920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang component was built against. Please note that this value may or 67020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang may not match the structure's version. For example, if the 67120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang component was built against the 2.0 specification, but the 67220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang application (which creates the structure is built against the 67320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 1.0 specification the versions would be different. 67420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [out] pComponentUUID 67520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to the UUID of the component which will be filled in by 67620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the component. The UUID is a unique identifier that is set at 67720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang RUN time for the component and is unique to each instantion of 67820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the component. 67920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 68020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 68120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 68220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup comp 68320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 68420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_GetComponentVersion( \ 68520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 68620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pComponentName, \ 68720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pComponentVersion, \ 68820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pSpecVersion, \ 68920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pComponentUUID) \ 69020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ((OMX_COMPONENTTYPE*)hComponent)->GetComponentVersion( \ 69120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 69220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pComponentName, \ 69320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pComponentVersion, \ 69420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pSpecVersion, \ 69520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pComponentUUID) /* Macro End */ 69620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 69720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 69820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** Send a command to the component. This call is a non-blocking call. 69920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The component should check the parameters and then queue the command 70020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang to the component thread to be executed. The component thread shall 70120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang send the EventHandler() callback at the conclusion of the command. 70220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang This macro will go directly from the application to the component (via 70320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang a core macro). The component will return from this call within 5 msec. 70420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 70520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang When the command is "OMX_CommandStateSet" the component will queue a 70620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang state transition to the new state idenfied in nParam. 70720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 70820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang When the command is "OMX_CommandFlush", to flush a port's buffer queues, 70920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the command will force the component to return all buffers NOT CURRENTLY 71020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang BEING PROCESSED to the application, in the order in which the buffers 71120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang were received. 71220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 71320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang When the command is "OMX_CommandPortDisable" or 71420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang "OMX_CommandPortEnable", the component's port (given by the value of 71520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nParam) will be stopped or restarted. 71620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 71720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang When the command "OMX_CommandMarkBuffer" is used to mark a buffer, the 71820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pCmdData will point to a OMX_MARKTYPE structure containing the component 71920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle of the component to examine the buffer chain for the mark. nParam1 72020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang contains the index of the port on which the buffer mark is applied. 72120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 72220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Specification text for more details. 72320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 72420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] hComponent 72520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle of component to execute the command 72620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] Cmd 72720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Command for the component to execute 72820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] nParam 72920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Parameter for the command to be executed. When Cmd has the value 73020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_CommandStateSet, value is a member of OMX_STATETYPE. When Cmd has 73120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the value OMX_CommandFlush, value of nParam indicates which port(s) 73220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang to flush. -1 is used to flush all ports a single port index will 73320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang only flush that port. When Cmd has the value "OMX_CommandPortDisable" 73420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang or "OMX_CommandPortEnable", the component's port is given by 73520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the value of nParam. When Cmd has the value "OMX_CommandMarkBuffer" 73620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the components pot is given by the value of nParam. 73720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] pCmdData 73820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Parameter pointing to the OMX_MARKTYPE structure when Cmd has the value 73920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang "OMX_CommandMarkBuffer". 74020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 74120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 74220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 74320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup comp 74420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 74520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_SendCommand( \ 74620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 74720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Cmd, \ 74820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nParam, \ 74920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pCmdData) \ 75020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ((OMX_COMPONENTTYPE*)hComponent)->SendCommand( \ 75120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 75220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Cmd, \ 75320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nParam, \ 75420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pCmdData) /* Macro End */ 75520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 75620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 75720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_GetParameter macro will get one of the current parameter 75820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang settings from the component. This macro cannot only be invoked when 75920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the component is in the OMX_StateInvalid state. The nParamIndex 76020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang parameter is used to indicate which structure is being requested from 76120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the component. The application shall allocate the correct structure 76220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang and shall fill in the structure size and version information before 76320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang invoking this macro. When the parameter applies to a port, the 76420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang caller shall fill in the appropriate nPortIndex value indicating the 76520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang port on which the parameter applies. If the component has not had 76620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang any settings changed, then the component should return a set of 76720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang valid DEFAULT parameters for the component. This is a blocking 76820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang call. 76920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 77020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The component should return from this call within 20 msec. 77120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 77220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] hComponent 77320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Handle of the component to be accessed. This is the component 77420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle returned by the call to the OMX_GetHandle function. 77520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] nParamIndex 77620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Index of the structure to be filled. This value is from the 77720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_INDEXTYPE enumeration. 77820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in,out] pComponentParameterStructure 77920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Pointer to application allocated structure to be filled by the 78020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang component. 78120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 78220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 78320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 78420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup comp 78520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 78620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_GetParameter( \ 78720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 78820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nParamIndex, \ 78920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pComponentParameterStructure) \ 79020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ((OMX_COMPONENTTYPE*)hComponent)->GetParameter( \ 79120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 79220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nParamIndex, \ 79320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pComponentParameterStructure) /* Macro End */ 79420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 79520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 79620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_SetParameter macro will send an initialization parameter 79720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang structure to a component. Each structure shall be sent one at a time, 79820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang in a separate invocation of the macro. This macro can only be 79920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang invoked when the component is in the OMX_StateLoaded state, or the 80020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang port is disabled (when the parameter applies to a port). The 80120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nParamIndex parameter is used to indicate which structure is being 80220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang passed to the component. The application shall allocate the 80320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang correct structure and shall fill in the structure size and version 80420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang information (as well as the actual data) before invoking this macro. 80520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The application is free to dispose of this structure after the call 80620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang as the component is required to copy any data it shall retain. This 80720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang is a blocking call. 80820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 80920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The component should return from this call within 20 msec. 81020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 81120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] hComponent 81220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Handle of the component to be accessed. This is the component 81320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle returned by the call to the OMX_GetHandle function. 81420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] nIndex 81520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Index of the structure to be sent. This value is from the 81620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_INDEXTYPE enumeration. 81720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] pComponentParameterStructure 81820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to application allocated structure to be used for 81920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang initialization by the component. 82020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 82120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 82220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 82320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup comp 82420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 82520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_SetParameter( \ 82620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 82720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nParamIndex, \ 82820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pComponentParameterStructure) \ 82920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ((OMX_COMPONENTTYPE*)hComponent)->SetParameter( \ 83020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 83120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nParamIndex, \ 83220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pComponentParameterStructure) /* Macro End */ 83320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 83420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 83520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_GetConfig macro will get one of the configuration structures 83620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang from a component. This macro can be invoked anytime after the 83720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang component has been loaded. The nParamIndex call parameter is used to 83820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang indicate which structure is being requested from the component. The 83920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang application shall allocate the correct structure and shall fill in the 84020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang structure size and version information before invoking this macro. 84120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the component has not had this configuration parameter sent before, 84220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang then the component should return a set of valid DEFAULT values for the 84320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang component. This is a blocking call. 84420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 84520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The component should return from this call within 5 msec. 84620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 84720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] hComponent 84820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Handle of the component to be accessed. This is the component 84920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle returned by the call to the OMX_GetHandle function. 85020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] nIndex 85120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Index of the structure to be filled. This value is from the 85220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_INDEXTYPE enumeration. 85320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in,out] pComponentConfigStructure 85420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to application allocated structure to be filled by the 85520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang component. 85620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 85720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 85820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 85920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup comp 86020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang*/ 86120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_GetConfig( \ 86220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 86320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nConfigIndex, \ 86420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pComponentConfigStructure) \ 86520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ((OMX_COMPONENTTYPE*)hComponent)->GetConfig( \ 86620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 86720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nConfigIndex, \ 86820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pComponentConfigStructure) /* Macro End */ 86920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 87020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 87120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_SetConfig macro will send one of the configuration 87220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang structures to a component. Each structure shall be sent one at a time, 87320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang each in a separate invocation of the macro. This macro can be invoked 87420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang anytime after the component has been loaded. The application shall 87520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang allocate the correct structure and shall fill in the structure size 87620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang and version information (as well as the actual data) before invoking 87720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang this macro. The application is free to dispose of this structure after 87820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the call as the component is required to copy any data it shall retain. 87920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang This is a blocking call. 88020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 88120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The component should return from this call within 5 msec. 88220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 88320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] hComponent 88420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Handle of the component to be accessed. This is the component 88520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle returned by the call to the OMX_GetHandle function. 88620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] nConfigIndex 88720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Index of the structure to be sent. This value is from the 88820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_INDEXTYPE enumeration above. 88920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] pComponentConfigStructure 89020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to application allocated structure to be used for 89120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang initialization by the component. 89220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 89320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 89420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 89520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup comp 89620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 89720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_SetConfig( \ 89820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 89920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nConfigIndex, \ 90020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pComponentConfigStructure) \ 90120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ((OMX_COMPONENTTYPE*)hComponent)->SetConfig( \ 90220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 90320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nConfigIndex, \ 90420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pComponentConfigStructure) /* Macro End */ 90520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 90620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 90720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_GetExtensionIndex macro will invoke a component to translate 90820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang a vendor specific configuration or parameter string into an OMX 90920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang structure index. There is no requirement for the vendor to support 91020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang this command for the indexes already found in the OMX_INDEXTYPE 91120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang enumeration (this is done to save space in small components). The 91220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang component shall support all vendor supplied extension indexes not found 91320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang in the master OMX_INDEXTYPE enumeration. This is a blocking call. 91420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 91520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The component should return from this call within 5 msec. 91620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 91720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] hComponent 91820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Handle of the component to be accessed. This is the component 91920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle returned by the call to the GetHandle function. 92020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] cParameterName 92120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_STRING that shall be less than 128 characters long including 92220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the trailing null byte. This is the string that will get 92320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang translated by the component into a configuration index. 92420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [out] pIndexType 92520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang a pointer to a OMX_INDEXTYPE to receive the index value. 92620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 92720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 92820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 92920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup comp 93020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 93120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_GetExtensionIndex( \ 93220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 93320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang cParameterName, \ 93420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pIndexType) \ 93520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ((OMX_COMPONENTTYPE*)hComponent)->GetExtensionIndex( \ 93620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 93720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang cParameterName, \ 93820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pIndexType) /* Macro End */ 93920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 94020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 94120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_GetState macro will invoke the component to get the current 94220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang state of the component and place the state value into the location 94320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointed to by pState. 94420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 94520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The component should return from this call within 5 msec. 94620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 94720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] hComponent 94820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Handle of the component to be accessed. This is the component 94920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle returned by the call to the OMX_GetHandle function. 95020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [out] pState 95120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to the location to receive the state. The value returned 95220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang is one of the OMX_STATETYPE members 95320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 95420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 95520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 95620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup comp 95720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 95820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_GetState( \ 95920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 96020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pState) \ 96120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ((OMX_COMPONENTTYPE*)hComponent)->GetState( \ 96220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 96320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pState) /* Macro End */ 96420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 96520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 96620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_UseBuffer macro will request that the component use 96720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang a buffer (and allocate its own buffer header) already allocated 96820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang by another component, or by the IL Client. This is a blocking 96920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang call. 97020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 97120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The component should return from this call within 20 msec. 97220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 97320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] hComponent 97420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Handle of the component to be accessed. This is the component 97520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle returned by the call to the OMX_GetHandle function. 97620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [out] ppBuffer 97720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to an OMX_BUFFERHEADERTYPE structure used to receive the 97820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to the buffer header 97920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 98020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 98120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 98220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup comp buf 98320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 98420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 98520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_UseBuffer( \ 98620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 98720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ppBufferHdr, \ 98820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nPortIndex, \ 98920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pAppPrivate, \ 99020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nSizeBytes, \ 99120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pBuffer) \ 99220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ((OMX_COMPONENTTYPE*)hComponent)->UseBuffer( \ 99320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 99420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ppBufferHdr, \ 99520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nPortIndex, \ 99620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pAppPrivate, \ 99720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nSizeBytes, \ 99820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pBuffer) 99920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 100020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 100120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_AllocateBuffer macro will request that the component allocate 100220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang a new buffer and buffer header. The component will allocate the 100320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang buffer and the buffer header and return a pointer to the buffer 100420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang header. This is a blocking call. 100520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 100620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The component should return from this call within 5 msec. 100720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 100820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] hComponent 100920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Handle of the component to be accessed. This is the component 101020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle returned by the call to the OMX_GetHandle function. 101120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [out] ppBuffer 101220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to an OMX_BUFFERHEADERTYPE structure used to receive 101320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the pointer to the buffer header 101420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] nPortIndex 101520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nPortIndex is used to select the port on the component the buffer will 101620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang be used with. The port can be found by using the nPortIndex 101720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang value as an index into the Port Definition array of the component. 101820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] pAppPrivate 101920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pAppPrivate is used to initialize the pAppPrivate member of the 102020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang buffer header structure. 102120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] nSizeBytes 102220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang size of the buffer to allocate. Used when bAllocateNew is true. 102320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 102420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 102520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 102620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup comp buf 102720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 102820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_AllocateBuffer( \ 102920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 103020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ppBuffer, \ 103120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nPortIndex, \ 103220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pAppPrivate, \ 103320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nSizeBytes) \ 103420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ((OMX_COMPONENTTYPE*)hComponent)->AllocateBuffer( \ 103520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 103620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ppBuffer, \ 103720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nPortIndex, \ 103820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pAppPrivate, \ 103920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nSizeBytes) /* Macro End */ 104020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 104120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 104220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_FreeBuffer macro will release a buffer header from the component 104320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang which was allocated using either OMX_AllocateBuffer or OMX_UseBuffer. If 104420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the component allocated the buffer (see the OMX_UseBuffer macro) then 104520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the component shall free the buffer and buffer header. This is a 104620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang blocking call. 104720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 104820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The component should return from this call within 20 msec. 104920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 105020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] hComponent 105120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Handle of the component to be accessed. This is the component 105220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle returned by the call to the OMX_GetHandle function. 105320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] nPortIndex 105420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nPortIndex is used to select the port on the component the buffer will 105520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang be used with. 105620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] pBuffer 105720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer 105820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang or AllocateBuffer. 105920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 106020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 106120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 106220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup comp buf 106320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 106420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_FreeBuffer( \ 106520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 106620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nPortIndex, \ 106720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pBuffer) \ 106820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ((OMX_COMPONENTTYPE*)hComponent)->FreeBuffer( \ 106920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 107020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nPortIndex, \ 107120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pBuffer) /* Macro End */ 107220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 107320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 107420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_EmptyThisBuffer macro will send a buffer full of data to an 107520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang input port of a component. The buffer will be emptied by the component 107620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang and returned to the application via the EmptyBufferDone call back. 107720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang This is a non-blocking call in that the component will record the buffer 107820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang and return immediately and then empty the buffer, later, at the proper 107920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang time. As expected, this macro may be invoked only while the component 108020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang is in the OMX_StateExecuting. If nPortIndex does not specify an input 108120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang port, the component shall return an error. 108220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 108320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The component should return from this call within 5 msec. 108420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 108520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] hComponent 108620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Handle of the component to be accessed. This is the component 108720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle returned by the call to the OMX_GetHandle function. 108820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] pBuffer 108920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer 109020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang or AllocateBuffer. 109120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 109220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 109320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 109420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup comp buf 109520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 109620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_EmptyThisBuffer( \ 109720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 109820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pBuffer) \ 109920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ((OMX_COMPONENTTYPE*)hComponent)->EmptyThisBuffer( \ 110020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 110120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pBuffer) /* Macro End */ 110220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 110320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 110420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_FillThisBuffer macro will send an empty buffer to an 110520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang output port of a component. The buffer will be filled by the component 110620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang and returned to the application via the FillBufferDone call back. 110720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang This is a non-blocking call in that the component will record the buffer 110820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang and return immediately and then fill the buffer, later, at the proper 110920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang time. As expected, this macro may be invoked only while the component 111020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang is in the OMX_ExecutingState. If nPortIndex does not specify an output 111120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang port, the component shall return an error. 111220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 111320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The component should return from this call within 5 msec. 111420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 111520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] hComponent 111620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Handle of the component to be accessed. This is the component 111720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle returned by the call to the OMX_GetHandle function. 111820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] pBuffer 111920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer 112020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang or AllocateBuffer. 112120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 112220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 112320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 112420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup comp buf 112520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 112620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_FillThisBuffer( \ 112720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 112820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pBuffer) \ 112920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ((OMX_COMPONENTTYPE*)hComponent)->FillThisBuffer( \ 113020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 113120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pBuffer) /* Macro End */ 113220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 113320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 113420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 113520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_UseEGLImage macro will request that the component use 113620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang a EGLImage provided by EGL (and allocate its own buffer header) 113720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang This is a blocking call. 113820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 113920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The component should return from this call within 20 msec. 114020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 114120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] hComponent 114220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Handle of the component to be accessed. This is the component 114320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle returned by the call to the OMX_GetHandle function. 114420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [out] ppBuffer 114520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to an OMX_BUFFERHEADERTYPE structure used to receive the 114620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to the buffer header. Note that the memory location used 114720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang for this buffer is NOT visible to the IL Client. 114820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] nPortIndex 114920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nPortIndex is used to select the port on the component the buffer will 115020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang be used with. The port can be found by using the nPortIndex 115120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang value as an index into the Port Definition array of the component. 115220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] pAppPrivate 115320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pAppPrivate is used to initialize the pAppPrivate member of the 115420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang buffer header structure. 115520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] eglImage 115620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang eglImage contains the handle of the EGLImage to use as a buffer on the 115720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang specified port. The component is expected to validate properties of 115820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the EGLImage against the configuration of the port to ensure the component 115920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang can use the EGLImage as a buffer. 116020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 116120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 116220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 116320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup comp buf 116420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 116520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#define OMX_UseEGLImage( \ 116620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 116720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ppBufferHdr, \ 116820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nPortIndex, \ 116920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pAppPrivate, \ 117020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang eglImage) \ 117120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ((OMX_COMPONENTTYPE*)hComponent)->UseEGLImage( \ 117220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang hComponent, \ 117320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang ppBufferHdr, \ 117420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nPortIndex, \ 117520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pAppPrivate, \ 117620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang eglImage) 117720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 117820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_Init method is used to initialize the OMX core. It shall be the 117920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang first call made into OMX and it should only be executed one time without 118020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang an interviening OMX_Deinit call. 118120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 118220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The core should return from this call within 20 msec. 118320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 118420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 118520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 118620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 118720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup core 118820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 118920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho ChangOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Init(void); 119020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 119120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 119220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_Deinit method is used to deinitialize the OMX core. It shall be 119320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the last call made into OMX. In the event that the core determines that 119420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang thare are components loaded when this call is made, the core may return 119520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang with an error rather than try to unload the components. 119620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 119720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The core should return from this call within 20 msec. 119820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 119920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 120020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 120120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 120220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup core 120320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 120420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho ChangOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Deinit(void); 120520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 120620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 120720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_ComponentNameEnum method will enumerate through all the names of 120820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang recognised valid components in the system. This function is provided 120920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang as a means to detect all the components in the system run-time. There is 121020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang no strict ordering to the enumeration order of component names, although 121120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang each name will only be enumerated once. If the OMX core supports run-time 121220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang installation of new components, it is only requried to detect newly 121320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang installed components when the first call to enumerate component names 121420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang is made (i.e. when nIndex is 0x0). 121520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 121620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The core should return from this call in 20 msec. 121720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 121820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [out] cComponentName 121920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to a null terminated string with the component name. The 122020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang names of the components are strings less than 127 bytes in length 122120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang plus the trailing null for a maximum size of 128 bytes. An example 122220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang of a valid component name is "OMX.TI.AUDIO.DSP.MIXER\0". Names are 122320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang assigned by the vendor, but shall start with "OMX." and then have 122420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the Vendor designation next. 122520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] nNameLength 122620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang number of characters in the cComponentName string. With all 122720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang component name strings restricted to less than 128 characters 122820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang (including the trailing null) it is recomended that the caller 122920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang provide a input string for the cComponentName of 128 characters. 123020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] nIndex 123120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang number containing the enumeration index for the component. 123220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Multiple calls to OMX_ComponentNameEnum with increasing values 123320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang of nIndex will enumerate through the component names in the 123420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang system until OMX_ErrorNoMore is returned. The value of nIndex 123520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang is 0 to (N-1), where N is the number of valid installed components 123620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang in the system. 123720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 123820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 123920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. When the value of nIndex exceeds the number of 124020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang components in the system minus 1, OMX_ErrorNoMore will be 124120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang returned. Otherwise the appropriate OMX error will be returned. 124220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup core 124320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 124420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho ChangOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_ComponentNameEnum( 124520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_OUT OMX_STRING cComponentName, 124620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_U32 nNameLength, 124720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_U32 nIndex); 124820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 124920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 125020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_GetHandle method will locate the component specified by the 125120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang component name given, load that component into memory and then invoke 125220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the component's methods to create an instance of the component. 125320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 125420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The core should return from this call within 20 msec. 125520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 125620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [out] pHandle 125720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to an OMX_HANDLETYPE pointer to be filled in by this method. 125820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] cComponentName 125920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to a null terminated string with the component name. The 126020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang names of the components are strings less than 127 bytes in length 126120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang plus the trailing null for a maximum size of 128 bytes. An example 126220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang of a valid component name is "OMX.TI.AUDIO.DSP.MIXER\0". Names are 126320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang assigned by the vendor, but shall start with "OMX." and then have 126420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the Vendor designation next. 126520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] pAppData 126620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to an application defined value that will be returned 126720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang during callbacks so that the application can identify the source 126820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang of the callback. 126920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] pCallBacks 127020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang pointer to a OMX_CALLBACKTYPE structure that will be passed to the 127120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang component to initialize it with. 127220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 127320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 127420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 127520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup core 127620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 127720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho ChangOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_GetHandle( 127820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_OUT OMX_HANDLETYPE* pHandle, 127920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_STRING cComponentName, 128020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_PTR pAppData, 128120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_CALLBACKTYPE* pCallBacks); 128220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 128320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 128420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_FreeHandle method will free a handle allocated by the OMX_GetHandle 128520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang method. If the component reference count goes to zero, the component will 128620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang be unloaded from memory. 128720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 128820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The core should return from this call within 20 msec when the component is 128920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang in the OMX_StateLoaded state. 129020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 129120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] hComponent 129220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Handle of the component to be accessed. This is the component 129320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang handle returned by the call to the GetHandle function. 129420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 129520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 129620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 129720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup core 129820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 129920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho ChangOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_FreeHandle( 130020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_HANDLETYPE hComponent); 130120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 130220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 130320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 130420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_SetupTunnel method will handle the necessary calls to the components 130520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang to setup the specified tunnel the two components. NOTE: This is 130620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang an actual method (not a #define macro). This method will make calls into 130720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the component ComponentTunnelRequest method to do the actual tunnel 130820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang connection. 130920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 131020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The ComponentTunnelRequest method on both components will be called. 131120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang This method shall not be called unless the component is in the 131220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_StateLoaded state except when the ports used for the tunnel are 131320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang disabled. In this case, the component may be in the OMX_StateExecuting, 131420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_StatePause, or OMX_StateIdle states. 131520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 131620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The core should return from this call within 20 msec. 131720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 131820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] hOutput 131920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Handle of the component to be accessed. Also this is the handle 132020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang of the component whose port, specified in the nPortOutput parameter 132120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang will be used the source for the tunnel. This is the component handle 132220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang returned by the call to the OMX_GetHandle function. There is a 132320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang requirement that hOutput be the source for the data when 132420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang tunelling (i.e. nPortOutput is an output port). If 0x0, the component 132520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang specified in hInput will have it's port specified in nPortInput 132620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang setup for communication with the application / IL client. 132720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] nPortOutput 132820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nPortOutput is used to select the source port on component to be 132920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang used in the tunnel. 133020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] hInput 133120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang This is the component to setup the tunnel with. This is the handle 133220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang of the component whose port, specified in the nPortInput parameter 133320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang will be used the destination for the tunnel. This is the component handle 133420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang returned by the call to the OMX_GetHandle function. There is a 133520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang requirement that hInput be the destination for the data when 133620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang tunelling (i.e. nPortInut is an input port). If 0x0, the component 133720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang specified in hOutput will have it's port specified in nPortPOutput 133820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang setup for communication with the application / IL client. 133920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] nPortInput 134020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang nPortInput is used to select the destination port on component to be 134120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang used in the tunnel. 134220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @return OMX_ERRORTYPE 134320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If the command successfully executes, the return code will be 134420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 134520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang When OMX_ErrorNotImplemented is returned, one or both components is 134620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang a non-interop component and does not support tunneling. 134720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 134820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang On failure, the ports of both components are setup for communication 134920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang with the application / IL Client. 135020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup core tun 135120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 135220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho ChangOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_SetupTunnel( 135320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_HANDLETYPE hOutput, 135420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_U32 nPortOutput, 135520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_HANDLETYPE hInput, 135620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_U32 nPortInput); 135720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 135820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** @ingroup cp */ 135920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho ChangOMX_API OMX_ERRORTYPE OMX_GetContentPipe( 136020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_OUT OMX_HANDLETYPE *hPipe, 136120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_STRING szURI); 136220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 136320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_GetComponentsOfRole method will return the number of components that support the given 136420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang role and (if the compNames field is non-NULL) the names of those components. The call will fail if 136520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang an insufficiently sized array of names is supplied. To ensure the array is sufficiently sized the 136620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang client should: 136720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * first call this function with the compNames field NULL to determine the number of component names 136820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * second call this function with the compNames field pointing to an array of names allocated 136920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang according to the number returned by the first call. 137020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 137120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The core should return from this call within 5 msec. 137220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 137320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] role 137420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang This is generic standard component name consisting only of component class 137520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang name and the type within that class (e.g. 'audio_decoder.aac'). 137620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [inout] pNumComps 137720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang This is used both as input and output. 137820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 137920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If compNames is NULL, the input is ignored and the output specifies how many components support 138020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang the given role. 138120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 138220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If compNames is not NULL, on input it bounds the size of the input structure and 138320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang on output, it specifies the number of components string names listed within the compNames parameter. 138420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [inout] compNames 138520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If NULL this field is ignored. If non-NULL this points to an array of 128-byte strings which accepts 138620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang a list of the names of all physical components that implement the specified standard component name. 138720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang Each name is NULL terminated. numComps indicates the number of names. 138820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup core 138920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 139020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho ChangOMX_API OMX_ERRORTYPE OMX_GetComponentsOfRole ( 139120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_STRING role, 139220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_INOUT OMX_U32 *pNumComps, 139320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_INOUT OMX_U8 **compNames); 139420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 139520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/** The OMX_GetRolesOfComponent method will return the number of roles supported by the given 139620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang component and (if the roles field is non-NULL) the names of those roles. The call will fail if 139720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang an insufficiently sized array of names is supplied. To ensure the array is sufficiently sized the 139820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang client should: 139920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * first call this function with the roles field NULL to determine the number of role names 140020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang * second call this function with the roles field pointing to an array of names allocated 140120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang according to the number returned by the first call. 140220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 140320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang The core should return from this call within 5 msec. 140420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 140520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [in] compName 140620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang This is the name of the component being queried about. 140720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [inout] pNumRoles 140820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang This is used both as input and output. 140920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 141020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If roles is NULL, the input is ignored and the output specifies how many roles the component supports. 141120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 141220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If compNames is not NULL, on input it bounds the size of the input structure and 141320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang on output, it specifies the number of roles string names listed within the roles parameter. 141420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @param [out] roles 141520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang If NULL this field is ignored. If non-NULL this points to an array of 128-byte strings 141620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang which accepts a list of the names of all standard components roles implemented on the 141720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang specified component name. numComps indicates the number of names. 141820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang @ingroup core 141920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang */ 142020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho ChangOMX_API OMX_ERRORTYPE OMX_GetRolesOfComponent ( 142120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_IN OMX_STRING compName, 142220d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_INOUT OMX_U32 *pNumRoles, 142320d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang OMX_OUT OMX_U8 **roles); 142420d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 142520d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#ifdef __cplusplus 142620d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang} 142720d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#endif /* __cplusplus */ 142820d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 142920d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang#endif 143020d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang/* File EOF */ 143120d3e6e3118a6e19627296e9247e948d54ec0fb8Jiho Chang 1432