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