1826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/* 26eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * Copyright (c) 2008 The Khronos Group Inc. 36eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * 4826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * Permission is hereby granted, free of charge, to any person obtaining 5826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * a copy of this software and associated documentation files (the 6826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * "Software"), to deal in the Software without restriction, including 7826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * without limitation the rights to use, copy, modify, merge, publish, 8826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * distribute, sublicense, and/or sell copies of the Software, and to 9826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * permit persons to whom the Software is furnished to do so, subject 106eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * to the following conditions: 11826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * The above copyright notice and this permission notice shall be included 126eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * in all copies or substantial portions of the Software. 136eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * 14826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 18826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 19826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 206eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * 22826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 23826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 24826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_Core.h - OpenMax IL version 1.1.2 25826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * The OMX_Core header file contains the definitions used by both the 26826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * application and the component to access common items. 27826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 28826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 29826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#ifndef OMX_Core_h 30826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_Core_h 31826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 32826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#ifdef __cplusplus 33826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevextern "C" { 34826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#endif /* __cplusplus */ 35826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 36826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 37826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/* Each OMX header shall include all required header files to allow the 38826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * header to compile without errors. The includes below are required 396eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * for this header file to compile successfully 40826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 41826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 42826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#include <OMX_Index.h> 43826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 44826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 45826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_COMMANDTYPE enumeration is used to specify the action in the 466eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * OMX_SendCommand macro. 47826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * @ingroup core 48826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 49826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef enum OMX_COMMANDTYPE 50826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev{ 51826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_CommandStateSet, /**< Change the component state */ 52826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_CommandFlush, /**< Flush the data queue(s) of a component */ 53826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_CommandPortDisable, /**< Disable a port on a component. */ 54826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_CommandPortEnable, /**< Enable a port on a component. */ 55826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_CommandMarkBuffer, /**< Mark a component/buffer for observation */ 566eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_CommandKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 57826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_CommandVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ 58826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_CommandMax = 0X7FFFFFFF 59826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_COMMANDTYPE; 60826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 61826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 62826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 63826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_STATETYPE enumeration is used to indicate or change the component 64826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * state. This enumeration reflects the current state of the component when 65826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * used with the OMX_GetState macro or becomes the parameter in a state change 66826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * command when used with the OMX_SendCommand macro. 67826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * 68826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * The component will be in the Loaded state after the component is initially 69826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * loaded into memory. In the Loaded state, the component is not allowed to 70826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * allocate or hold resources other than to build it's internal parameter 71826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * and configuration tables. The application will send one or more 72826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * SetParameters/GetParameters and SetConfig/GetConfig commands to the 73826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * component and the component will record each of these parameter and 74826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * configuration changes for use later. When the application sends the 75826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * Idle command, the component will acquire the resources needed for the 76826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * specified configuration and will transition to the idle state if the 77826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * allocation is successful. If the component cannot successfully 78826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * 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 80826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * resources shall be released). When the component receives the command 81826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * to go to the Executing state, it shall begin processing buffers by 82826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * sending all input buffers it holds to the application. While 83826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * the component is in the Idle state, the application may also send the 84826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * 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 86826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * application, but shall not begin processing buffers. This will allow the 87826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * application to prefill buffers. 886eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * 89826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * @ingroup comp 90826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 91826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 92826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef enum OMX_STATETYPE 93826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev{ 946eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_StateInvalid, /**< component has detected that it's internal data 95826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev structures are corrupted to the point that 96826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev it cannot determine it's state properly */ 97826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_StateLoaded, /**< component has been loaded but has not completed 98826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 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 101826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev component in this state. */ 102826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_StateIdle, /**< component initialization has been completed 103826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev successfully and the component is ready to 104826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev to start. */ 105826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_StateExecuting, /**< component has accepted the start command and 106826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev is processing data (if data is available) */ 107826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_StatePause, /**< component has received pause command */ 1086eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_StateWaitForResources, /**< component is waiting for resources, either after 109826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev preemption or before it gets the resources requested. 110826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev See specification for complete details. */ 1116eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_StateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 112826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_StateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ 113826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_StateMax = 0X7FFFFFFF 114826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_STATETYPE; 115826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 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 119826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * long as they follow these rules: 120826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * 1. Vendor error messages shall be in the range of 0x90000000 to 121826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * 0x9000FFFF. 122826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * 2. Vendor error messages shall be defined in a header file provided 123826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * with the component. No error messages are allowed that are 124826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * not defined. 125826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 126826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef enum OMX_ERRORTYPE 127826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev{ 128826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone = 0, 129826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 130826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** There were insufficient resources to perform the requested operation */ 131826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorInsufficientResources = (OMX_S32) 0x80001000, 132826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 133826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** There was an error, but the cause of the error could not be determined */ 134826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorUndefined = (OMX_S32) 0x80001001, 135826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 136826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** The component name string was not valid */ 137826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorInvalidComponentName = (OMX_S32) 0x80001002, 138826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 139826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** No component with the specified name string was found */ 140826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorComponentNotFound = (OMX_S32) 0x80001003, 141826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 142826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** The component specified did not have a "OMX_ComponentInit" or 143826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev "OMX_ComponentDeInit entry point */ 144826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorInvalidComponent = (OMX_S32) 0x80001004, 145826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 146826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** One or more parameters were not valid */ 147826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorBadParameter = (OMX_S32) 0x80001005, 148826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 149826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** The requested function is not implemented */ 150826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNotImplemented = (OMX_S32) 0x80001006, 151826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 152826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** The buffer was emptied before the next buffer was ready */ 153826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorUnderflow = (OMX_S32) 0x80001007, 154826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 155826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** The buffer was not available when it was needed */ 156826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorOverflow = (OMX_S32) 0x80001008, 157826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 158826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** The hardware failed to respond as expected */ 159826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorHardware = (OMX_S32) 0x80001009, 160826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 161826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** The component is in the state OMX_StateInvalid */ 162826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorInvalidState = (OMX_S32) 0x8000100A, 163826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 164826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** Stream is found to be corrupt */ 165826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorStreamCorrupt = (OMX_S32) 0x8000100B, 166826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 167826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** Ports being connected are not compatible */ 168826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorPortsNotCompatible = (OMX_S32) 0x8000100C, 169826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 170826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** Resources allocated to an idle component have been 171826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev lost resulting in the component returning to the loaded state */ 172826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorResourcesLost = (OMX_S32) 0x8000100D, 173826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 174826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** No more indicies can be enumerated */ 175826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNoMore = (OMX_S32) 0x8000100E, 176826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 177826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** The component detected a version mismatch */ 178826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorVersionMismatch = (OMX_S32) 0x8000100F, 179826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 180826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** The component is not ready to return data at this time */ 181826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNotReady = (OMX_S32) 0x80001010, 182826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 183826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** There was a timeout that occurred */ 184826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorTimeout = (OMX_S32) 0x80001011, 185826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 186826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** This error occurs when trying to transition into the state you are already in */ 187826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorSameState = (OMX_S32) 0x80001012, 188826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1896eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal /** Resources allocated to an executing or paused component have been 190826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev preempted, causing the component to return to the idle state */ 1916eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_ErrorResourcesPreempted = (OMX_S32) 0x80001013, 192826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1936eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal /** A non-supplier port sends this error to the IL client (via the EventHandler callback) 194826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 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 196826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev to send it an allocated buffer via a UseBuffer call. */ 197826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorPortUnresponsiveDuringAllocation = (OMX_S32) 0x80001014, 198826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 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 202826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev to request the deallocation of a buffer header via a FreeBuffer call. */ 203826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorPortUnresponsiveDuringDeallocation = (OMX_S32) 0x80001015, 204826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 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 208826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev the non-supplier to return a buffer via an EmptyThisBuffer or FillThisBuffer call. */ 209826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorPortUnresponsiveDuringStop = (OMX_S32) 0x80001016, 210826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 211826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** Attempting a state transtion that is not allowed */ 212826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorIncorrectStateTransition = (OMX_S32) 0x80001017, 213826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 214826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /* Attempting a command that is not allowed during the present state. */ 2156eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_ErrorIncorrectStateOperation = (OMX_S32) 0x80001018, 216826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 217826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** The values encapsulated in the parameter or config structure are not supported. */ 218826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorUnsupportedSetting = (OMX_S32) 0x80001019, 219826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 220826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** The parameter or config indicated by the given index is not supported. */ 221826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorUnsupportedIndex = (OMX_S32) 0x8000101A, 222826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 223826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** The port index supplied is incorrect. */ 224826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorBadPortIndex = (OMX_S32) 0x8000101B, 225826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 226826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** The port has lost one or more of its buffers and it thus unpopulated. */ 227826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorPortUnpopulated = (OMX_S32) 0x8000101C, 228826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 229826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** Component suspended due to temporary loss of resources */ 230826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorComponentSuspended = (OMX_S32) 0x8000101D, 231826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 232826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** Component suspended due to an inability to acquire dynamic resources */ 233826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorDynamicResourcesUnavailable = (OMX_S32) 0x8000101E, 234826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 2356eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal /** When the macroblock error reporting is enabled the component returns new error 236826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev for every frame that has errors */ 237826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorMbErrorsInFrame = (OMX_S32) 0x8000101F, 238826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 239826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** A component reports this error when it cannot parse or determine the format of an input stream. */ 2406eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_ErrorFormatNotDetected = (OMX_S32) 0x80001020, 241826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 242826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** The content open operation failed. */ 243826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorContentPipeOpenFailed = (OMX_S32) 0x80001021, 244826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 245826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** The content creation operation failed. */ 246826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorContentPipeCreationFailed = (OMX_S32) 0x80001022, 247826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 248826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** Separate table information is being used */ 249826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorSeperateTablesUsed = (OMX_S32) 0x80001023, 250826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 251826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** Tunneling is unsupported by the component*/ 252826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorTunnelingUnsupported = (OMX_S32) 0x80001024, 253826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 2546eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_ErrorKhronosExtensions = (OMX_S32)0x8F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 255826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorVendorStartUnused = (OMX_S32)0x90000000, /**< Reserved region for introducing Vendor Extensions */ 256826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorMax = 0x7FFFFFFF 257826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_ERRORTYPE; 258826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 259826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** @ingroup core */ 260826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef OMX_ERRORTYPE (* OMX_COMPONENTINITTYPE)(OMX_IN OMX_HANDLETYPE hComponent); 261826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 262826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** @ingroup core */ 263826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef struct OMX_COMPONENTREGISTERTYPE 264826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev{ 265826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev const char * pName; /* Component name, 128 byte limit (including '\0') applies */ 266826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_COMPONENTINITTYPE pInitialize; /* Component instance initialization function */ 267826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_COMPONENTREGISTERTYPE; 268826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 269826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** @ingroup core */ 270826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevextern OMX_COMPONENTREGISTERTYPE OMX_ComponentRegistered[]; 271826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 272826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** @ingroup rpm */ 273826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef struct OMX_PRIORITYMGMTTYPE { 274826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nSize; /**< size of the structure in bytes */ 275826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 276826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nGroupPriority; /**< Priority of the component group */ 277826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nGroupID; /**< ID of the component group */ 278826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_PRIORITYMGMTTYPE; 279826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 280826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/* Component name and Role names are limited to 128 characters including the terminating '\0'. */ 281826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_MAX_STRINGNAME_SIZE 128 282826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 283826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** @ingroup comp */ 284826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef struct OMX_PARAM_COMPONENTROLETYPE { 285826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nSize; /**< size of the structure in bytes */ 286826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 287826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U8 cRole[OMX_MAX_STRINGNAME_SIZE]; /**< name of standard component which defines component role */ 288826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_PARAM_COMPONENTROLETYPE; 289826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 2906eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/** End of Stream Buffer Flag: 291826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * 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 295826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * cease sending data is implemenation specific. 296826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * @ingroup buf 297826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 298826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 2996eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal#define OMX_BUFFERFLAG_EOS 0x00000001 300826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 3016eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/** Start Time Buffer Flag: 302826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * 303826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * The source of a stream (e.g. a demux component) sets the STARTTIME 304826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * flag on the buffer that contains the starting timestamp for the 305826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * stream. The starting timestamp corresponds to the first data that 306826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * should be displayed at startup or after a seek. 307826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * 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 310826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * the stream will be the intra-frame preceding the target frame and 311826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * the starttime will occur with the target frame (with any other 312826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * required frames required to reconstruct the target intervening). 313826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * 3146eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * The STARTTIME flag is directly associated with the buffer's 3156eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * timestamp ' thus its association to buffer data and its 316826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * propagation is identical to the timestamp's. 317826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * 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 320826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * using OMX_ConfigTimeClientStartTime and passing the buffer's 321826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * timestamp. 3226eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * 323826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * @ingroup buf 324826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 325826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 326826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_BUFFERFLAG_STARTTIME 0x00000002 327826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 328826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 3296eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 3306eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/** Decode Only Buffer Flag: 331826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * 332826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * The source of a stream (e.g. a demux component) sets the DECODEONLY 333826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * 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 338826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * but mark them as decode only. 339826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * 3406eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * The DECODEONLY is associated with buffer data and propagated in a 341826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * manner identical to the buffer timestamp. 342826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * 3436eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * A component that renders data should ignore all buffers with 344826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * the DECODEONLY flag set. 3456eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * 346826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * @ingroup buf 347826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 348826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 349826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_BUFFERFLAG_DECODEONLY 0x00000004 350826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 351826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 3526eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/* Data Corrupt Flag: This flag is set when the IL client believes the data in the associated buffer is corrupt 353826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * @ingroup buf 354826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 355826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 356826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_BUFFERFLAG_DATACORRUPT 0x00000008 357826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 358826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/* End of Frame: The buffer contains exactly one end of frame and no data 359826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * 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. 361826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * @ingroup buf 362826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev*/ 363826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_BUFFERFLAG_ENDOFFRAME 0x00000010 364826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 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 367826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * @ingroup buf 368826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 369826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_BUFFERFLAG_SYNCFRAME 0x00000020 370826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 371826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/* Extra data present flag: there is extra data appended to the data stream 3726eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * residing in the buffer 3736eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * @ingroup buf 374826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 375826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_BUFFERFLAG_EXTRADATA 0x00000040 376826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 3776eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/** Codec Config Buffer Flag: 378826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev* OMX_BUFFERFLAG_CODECCONFIG is an optional flag that is set by an 379826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev* output port when all bytes in the buffer form part or all of a set of 380826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev* codec specific configuration data. Examples include SPS/PPS nal units 381826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev* for OMX_VIDEO_CodingAVC or AudioSpecificConfig data for 3826eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal* OMX_AUDIO_CodingAAC. Any component that for a given stream sets 383826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev* OMX_BUFFERFLAG_CODECCONFIG shall not mix codec configuration bytes 384826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev* with frame data in the same buffer, and shall send all buffers 385826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev* containing codec configuration bytes before any buffers containing 386826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev* frame data that those configurations bytes describe. 387826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev* If the stream format for a particular codec has a frame specific 388826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev* header at the start of each frame, for example OMX_AUDIO_CodingMP3 or 389826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev* OMX_AUDIO_CodingAAC in ADTS mode, then these shall be presented as 390826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev* normal without setting OMX_BUFFERFLAG_CODECCONFIG. 391826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * @ingroup buf 392826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 393826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_BUFFERFLAG_CODECCONFIG 0x00000080 394826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 3958767726b6d6b2194cbb3704d7d82f0c7ef34eeb3Praveen Chavan/* 3968767726b6d6b2194cbb3704d7d82f0c7ef34eeb3Praveen Chavan* OMX_BUFFERFLAG_READONLY: This flag is set when a component emitting the 3978767726b6d6b2194cbb3704d7d82f0c7ef34eeb3Praveen Chavan* buffer on an output port or the IL client wishes to identify the buffer 3988767726b6d6b2194cbb3704d7d82f0c7ef34eeb3Praveen Chavan* payload contents to be read-only. An IL client or an input port 3998767726b6d6b2194cbb3704d7d82f0c7ef34eeb3Praveen Chavan* shall not alter the contents of the buffer. This flag shall only be 4008767726b6d6b2194cbb3704d7d82f0c7ef34eeb3Praveen Chavan* cleared by the originator of the buffer when the buffer is returned. 4018767726b6d6b2194cbb3704d7d82f0c7ef34eeb3Praveen Chavan* For tunneled ports, the usage of this flag shall be allowed only if the 4028767726b6d6b2194cbb3704d7d82f0c7ef34eeb3Praveen Chavan* components negotiated a read-only tunnel 4038767726b6d6b2194cbb3704d7d82f0c7ef34eeb3Praveen Chavan*/ 4048767726b6d6b2194cbb3704d7d82f0c7ef34eeb3Praveen Chavan#define OMX_BUFFERFLAG_READONLY 0x00000200 405826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 406826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** @ingroup buf */ 407826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef struct OMX_BUFFERHEADERTYPE 408826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev{ 409826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nSize; /**< size of the structure in bytes */ 410826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 4116eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_U8* pBuffer; /**< Pointer to actual block of memory 412826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev that is acting as the buffer */ 413826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nAllocLen; /**< size of the buffer allocated, in bytes */ 4146eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_U32 nFilledLen; /**< number of bytes currently in the 415826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev buffer */ 416826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nOffset; /**< start offset of valid data in bytes from 417826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev the start of the buffer */ 418826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_PTR pAppPrivate; /**< pointer to any data the application 419826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev wants to associate with this buffer */ 420826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_PTR pPlatformPrivate; /**< pointer to any data the platform 4216eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal wants to associate with this buffer */ 422826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_PTR pInputPortPrivate; /**< pointer to any data the input port 423826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev wants to associate with this buffer */ 424826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_PTR pOutputPortPrivate; /**< pointer to any data the output port 425826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev wants to associate with this buffer */ 4266eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_HANDLETYPE hMarkTargetComponent; /**< The component that will generate a 427826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev mark event upon processing this buffer. */ 4286eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_PTR pMarkData; /**< Application specific data associated with 4296eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal the mark sent on a mark event to disambiguate 430826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev this mark from others. */ 431826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nTickCount; /**< Optional entry that the component and 432826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev application can update with a tick count 433826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev when they access the component. This 434826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev value should be in microseconds. Since 435826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev this is a value relative to an arbitrary 4366eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal starting point, this value cannot be used 437826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev to determine absolute time. This is an 438826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev optional entry and not all components 439826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev will update it.*/ 4406eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_TICKS nTimeStamp; /**< Timestamp corresponding to the sample 4416eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal starting at the first logical sample 4426eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal boundary in the buffer. Timestamps of 443826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev successive samples within the buffer may 4446eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal be inferred by adding the duration of the 445826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev of the preceding buffer to the timestamp 446826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev of the preceding buffer.*/ 447826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nFlags; /**< buffer specific flags */ 4486eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_U32 nOutputPortIndex; /**< The index of the output port (if any) using 449826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev this buffer */ 450826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nInputPortIndex; /**< The index of the input port (if any) using 451826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev this buffer */ 452826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_BUFFERHEADERTYPE; 453826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 4546eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/** The OMX_EXTRADATATYPE enumeration is used to define the 455826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * possible extra data payload types. 456826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * NB: this enum is binary backwards compatible with the previous 457826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * OMX_EXTRADATA_QUANT define. This should be replaced with 458826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * OMX_ExtraDataQuantization. 459826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 460826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef enum OMX_EXTRADATATYPE 461826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev{ 4626eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_ExtraDataNone = 0, /**< Indicates that no more extra data sections follow */ 463826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ExtraDataQuantization, /**< The data payload contains quantization data */ 4646eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_ExtraDataKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 465826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ExtraDataVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ 466826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ExtraDataMax = 0x7FFFFFFF 467826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_EXTRADATATYPE; 468826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 469826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 470826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef struct OMX_OTHER_EXTRADATATYPE { 471826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nSize; 4726eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_VERSIONTYPE nVersion; 473826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nPortIndex; 474826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_EXTRADATATYPE eType; /* Extra Data type */ 475826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nDataSize; /* Size of the supporting data to follow */ 476826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U8 data[1]; /* Supporting data hint */ 477826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_OTHER_EXTRADATATYPE; 478826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 479826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** @ingroup comp */ 480826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef struct OMX_PORT_PARAM_TYPE { 481826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nSize; /**< size of the structure in bytes */ 482826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 483826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nPorts; /**< The number of ports for this component */ 484826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nStartPortNumber; /** first port number for this type of port */ 4856eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal} OMX_PORT_PARAM_TYPE; 486826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 487826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** @ingroup comp */ 488826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef enum OMX_EVENTTYPE 489826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev{ 490826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_EventCmdComplete, /**< component has sucessfully completed a command */ 491826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_EventError, /**< component has detected an error condition */ 492826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_EventMark, /**< component has detected a buffer mark */ 493826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_EventPortSettingsChanged, /**< component is reported a port settings change */ 4946eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_EventBufferFlag, /**< component has detected an EOS */ 495826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_EventResourcesAcquired, /**< component has been granted resources and is 496826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev automatically starting the state change from 497826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_StateWaitForResources to OMX_StateIdle. */ 498826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_EventComponentResumed, /**< Component resumed due to reacquisition of resources */ 499826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_EventDynamicResourcesAvailable, /**< Component has acquired previously unavailable dynamic resources */ 500826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_EventPortFormatDetected, /**< Component has detected a supported format. */ 5016eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_EventKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 502826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_EventVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ 503826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_EventMax = 0x7FFFFFFF 504826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_EVENTTYPE; 505826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 506826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef struct OMX_CALLBACKTYPE 507826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev{ 508826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** The EventHandler method is used to notify the application when an 509826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev event of interest occurs. Events are defined in the OMX_EVENTTYPE 510826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev enumeration. Please see that enumeration for details of what will 511826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev be returned for each type of event. Callbacks should not return 5126eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal an error to the component, so if an error occurs, the application 513826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev shall handle it internally. This is a blocking call. 514826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 515826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The application should return from this call within 5 msec to avoid 516826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev blocking the component for an excessively long period of time. 517826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 518826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param hComponent 519826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle of the component to access. This is the component 520826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle returned by the call to the GetHandle function. 521826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param pAppData 5226eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal pointer to an application defined value that was provided in the 523826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pAppData parameter to the OMX_GetHandle method for the component. 5246eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal This application defined value is provided so that the application 525826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev can have a component specific context when receiving the callback. 526826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param eEvent 527826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Event that the component wants to notify the application about. 528826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param nData1 5296eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal nData will be the OMX_ERRORTYPE for an error event and will be 530826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev an OMX_COMMANDTYPE for a command complete event and OMX_INDEXTYPE for a OMX_PortSettingsChanged event. 531826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param nData2 532826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nData2 will hold further information related to the event. Can be OMX_STATETYPE for 533826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev a OMX_CommandStateSet command or port index for a OMX_PortSettingsChanged event. 534826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Default value is 0 if not used. ) 535826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param pEventData 536826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Pointer to additional event-specific data (see spec for meaning). 537826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 538826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 539826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ERRORTYPE (*EventHandler)( 540826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_HANDLETYPE hComponent, 541826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_PTR pAppData, 542826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_EVENTTYPE eEvent, 543826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_U32 nData1, 544826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_U32 nData2, 545826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_PTR pEventData); 546826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 547826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** The EmptyBufferDone method is used to return emptied buffers from an 5486eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal input port back to the application for reuse. This is a blocking call 549826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev so the application should not attempt to refill the buffers during this 550826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev call, but should queue them and refill them in another thread. There 551826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev is no error return, so the application shall handle any errors generated 5526eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal internally. 5536eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 554826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The application should return from this call within 5 msec. 5556eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 556826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param hComponent 557826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle of the component to access. This is the component 558826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle returned by the call to the GetHandle function. 559826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param pAppData 5606eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal pointer to an application defined value that was provided in the 561826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pAppData parameter to the OMX_GetHandle method for the component. 5626eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal This application defined value is provided so that the application 563826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev can have a component specific context when receiving the callback. 564826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param pBuffer 565826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer 566826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev or AllocateBuffer indicating the buffer that was emptied. 567826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup buf 568826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 569826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ERRORTYPE (*EmptyBufferDone)( 570826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_HANDLETYPE hComponent, 571826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_PTR pAppData, 572826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_BUFFERHEADERTYPE* pBuffer); 573826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 574826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** The FillBufferDone method is used to return filled buffers from an 5756eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal output port back to the application for emptying and then reuse. 5766eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal This is a blocking call so the application should not attempt to 5776eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal empty the buffers during this call, but should queue the buffers 5786eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal and empty them in another thread. There is no error return, so 5796eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal the application shall handle any errors generated internally. The 580826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev application shall also update the buffer header to indicate the 5816eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal number of bytes placed into the buffer. 582826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 583826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The application should return from this call within 5 msec. 5846eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 585826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param hComponent 586826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle of the component to access. This is the component 587826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle returned by the call to the GetHandle function. 588826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param pAppData 5896eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal pointer to an application defined value that was provided in the 590826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pAppData parameter to the OMX_GetHandle method for the component. 5916eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal This application defined value is provided so that the application 592826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev can have a component specific context when receiving the callback. 593826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param pBuffer 594826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer 595826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev or AllocateBuffer indicating the buffer that was filled. 596826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup buf 597826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 598826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ERRORTYPE (*FillBufferDone)( 599826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_OUT OMX_HANDLETYPE hComponent, 600826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_OUT OMX_PTR pAppData, 601826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer); 602826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 603826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_CALLBACKTYPE; 604826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 605826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_BUFFERSUPPLIERTYPE enumeration is used to dictate port supplier 606826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev preference when tunneling between two ports. 607826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup tun buf 608826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev*/ 609826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef enum OMX_BUFFERSUPPLIERTYPE 610826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev{ 611826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_BufferSupplyUnspecified = 0x0, /**< port supplying the buffers is unspecified, 612826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev or don't care */ 613826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_BufferSupplyInput, /**< input port supplies the buffers */ 614826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_BufferSupplyOutput, /**< output port supplies the buffers */ 6156eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_BufferSupplyKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 616826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_BufferSupplyVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ 617826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_BufferSupplyMax = 0x7FFFFFFF 618826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_BUFFERSUPPLIERTYPE; 619826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 620826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 6216eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/** buffer supplier parameter 622826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * @ingroup tun 623826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 624826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef struct OMX_PARAM_BUFFERSUPPLIERTYPE { 625826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nSize; /**< size of the structure in bytes */ 626826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 627826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nPortIndex; /**< port that this structure applies to */ 628826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_BUFFERSUPPLIERTYPE eBufferSupplier; /**< buffer supplier */ 629826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_PARAM_BUFFERSUPPLIERTYPE; 630826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 631826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 6326eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/**< indicates that buffers received by an input port of a tunnel 6336eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal may not modify the data in the buffers 634826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup tun 635826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 6366eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal#define OMX_PORTTUNNELFLAG_READONLY 0x00000001 637826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 638826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 639826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_TUNNELSETUPTYPE structure is used to pass data from an output 640826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev port to an input port as part the two ComponentTunnelRequest calls 6416eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal resulting from a OMX_SetupTunnel call from the IL Client. 642826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup tun 6436eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal */ 644826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef struct OMX_TUNNELSETUPTYPE 645826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev{ 646826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_U32 nTunnelFlags; /**< bit flags for tunneling */ 647826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_BUFFERSUPPLIERTYPE eSupplier; /**< supplier preference */ 6486eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal} OMX_TUNNELSETUPTYPE; 649826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 650826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/* OMX Component headers is included to enable the core to use 6516eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal macros for functions into the component for OMX release 1.0. 652826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Developers should not access any structures or data from within 653826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev the component header directly */ 654826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/* TO BE REMOVED - #include <OMX_Component.h> */ 655826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 6566eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/** GetComponentVersion will return information about the component. 657826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev This is a blocking call. This macro will go directly from the 658826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev application to the component (via a core macro). The 659826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev component will return from this call within 5 msec. 660826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] hComponent 661826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle of component to execute the command 662826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [out] pComponentName 6636eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal pointer to an empty string of length 128 bytes. The component 6646eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal will write its name into this string. The name will be 6656eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal terminated by a single zero byte. The name of a component will 6666eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal be 127 bytes or less to leave room for the trailing zero byte. 667826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev An example of a valid component name is "OMX.ABC.ChannelMixer\0". 668826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [out] pComponentVersion 6696eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal pointer to an OMX Version structure that the component will fill 6706eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal in. The component will fill in a value that indicates the 6716eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal component version. NOTE: the component version is NOT the same 6726eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal as the OMX Specification version (found in all structures). The 6736eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal component version is defined by the vendor of the component and 674826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev its value is entirely up to the component vendor. 675826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [out] pSpecVersion 6766eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal pointer to an OMX Version structure that the component will fill 6776eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal in. The SpecVersion is the version of the specification that the 6786eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal component was built against. Please note that this value may or 6796eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal may not match the structure's version. For example, if the 6806eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal component was built against the 2.0 specification, but the 6816eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal application (which creates the structure is built against the 682826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1.0 specification the versions would be different. 683826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [out] pComponentUUID 6846eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal pointer to the UUID of the component which will be filled in by 6856eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal the component. The UUID is a unique identifier that is set at 6866eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal RUN time for the component and is unique to each instantion of 687826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev the component. 688826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 689826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 690826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 691826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup comp 692826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 693826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_GetComponentVersion( \ 694826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 695826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pComponentName, \ 696826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pComponentVersion, \ 697826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pSpecVersion, \ 698826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pComponentUUID) \ 699826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ((OMX_COMPONENTTYPE*)hComponent)->GetComponentVersion( \ 700826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 701826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pComponentName, \ 702826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pComponentVersion, \ 703826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pSpecVersion, \ 704826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pComponentUUID) /* Macro End */ 705826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 706826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 707826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** Send a command to the component. This call is a non-blocking call. 708826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The component should check the parameters and then queue the command 7096eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal to the component thread to be executed. The component thread shall 7106eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal send the EventHandler() callback at the conclusion of the command. 711826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev This macro will go directly from the application to the component (via 712826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev a core macro). The component will return from this call within 5 msec. 7136eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 714826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev When the command is "OMX_CommandStateSet" the component will queue a 715826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev state transition to the new state idenfied in nParam. 7166eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 717826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev When the command is "OMX_CommandFlush", to flush a port's buffer queues, 7186eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal the command will force the component to return all buffers NOT CURRENTLY 7196eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal BEING PROCESSED to the application, in the order in which the buffers 720826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev were received. 7216eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 7226eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal When the command is "OMX_CommandPortDisable" or 723826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev "OMX_CommandPortEnable", the component's port (given by the value of 7246eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal nParam) will be stopped or restarted. 7256eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 726826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev When the command "OMX_CommandMarkBuffer" is used to mark a buffer, the 727826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pCmdData will point to a OMX_MARKTYPE structure containing the component 728826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle of the component to examine the buffer chain for the mark. nParam1 729826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev contains the index of the port on which the buffer mark is applied. 730826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 7316eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal Specification text for more details. 7326eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 733826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] hComponent 734826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle of component to execute the command 735826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] Cmd 736826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Command for the component to execute 737826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] nParam 7386eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal Parameter for the command to be executed. When Cmd has the value 7396eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_CommandStateSet, value is a member of OMX_STATETYPE. When Cmd has 7406eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal the value OMX_CommandFlush, value of nParam indicates which port(s) 7416eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal to flush. -1 is used to flush all ports a single port index will 742826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev only flush that port. When Cmd has the value "OMX_CommandPortDisable" 7436eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal or "OMX_CommandPortEnable", the component's port is given by 744826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev the value of nParam. When Cmd has the value "OMX_CommandMarkBuffer" 745826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev the components pot is given by the value of nParam. 746826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] pCmdData 747826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Parameter pointing to the OMX_MARKTYPE structure when Cmd has the value 7486eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal "OMX_CommandMarkBuffer". 749826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 750826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 751826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 752826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup comp 753826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 754826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_SendCommand( \ 755826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 756826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Cmd, \ 757826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nParam, \ 758826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pCmdData) \ 759826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ((OMX_COMPONENTTYPE*)hComponent)->SendCommand( \ 760826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 761826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Cmd, \ 762826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nParam, \ 763826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pCmdData) /* Macro End */ 764826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 765826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 7666eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/** The OMX_GetParameter macro will get one of the current parameter 7676eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal settings from the component. This macro cannot only be invoked when 768826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev the component is in the OMX_StateInvalid state. The nParamIndex 769826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev parameter is used to indicate which structure is being requested from 7706eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal the component. The application shall allocate the correct structure 7716eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal and shall fill in the structure size and version information before 772826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev invoking this macro. When the parameter applies to a port, the 773826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev caller shall fill in the appropriate nPortIndex value indicating the 7746eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal port on which the parameter applies. If the component has not had 7756eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal any settings changed, then the component should return a set of 7766eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal valid DEFAULT parameters for the component. This is a blocking 7776eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal call. 7786eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 779826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The component should return from this call within 20 msec. 7806eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 781826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] hComponent 782826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Handle of the component to be accessed. This is the component 783826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle returned by the call to the OMX_GetHandle function. 784826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] nParamIndex 785826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Index of the structure to be filled. This value is from the 786826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_INDEXTYPE enumeration. 787826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in,out] pComponentParameterStructure 7886eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal Pointer to application allocated structure to be filled by the 789826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev component. 790826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 791826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 792826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 793826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup comp 794826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 795826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_GetParameter( \ 796826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 797826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nParamIndex, \ 798826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pComponentParameterStructure) \ 799826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ((OMX_COMPONENTTYPE*)hComponent)->GetParameter( \ 800826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 801826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nParamIndex, \ 802826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pComponentParameterStructure) /* Macro End */ 803826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 804826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 805826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_SetParameter macro will send an initialization parameter 806826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev structure to a component. Each structure shall be sent one at a time, 807826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev in a separate invocation of the macro. This macro can only be 808826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev invoked when the component is in the OMX_StateLoaded state, or the 8096eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal port is disabled (when the parameter applies to a port). The 810826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nParamIndex parameter is used to indicate which structure is being 8116eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal passed to the component. The application shall allocate the 8126eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal correct structure and shall fill in the structure size and version 813826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev information (as well as the actual data) before invoking this macro. 814826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The application is free to dispose of this structure after the call 8156eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal as the component is required to copy any data it shall retain. This 8166eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal is a blocking call. 8176eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 818826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The component should return from this call within 20 msec. 8196eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 820826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] hComponent 821826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Handle of the component to be accessed. This is the component 822826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle returned by the call to the OMX_GetHandle function. 823826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] nIndex 824826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Index of the structure to be sent. This value is from the 825826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_INDEXTYPE enumeration. 826826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] pComponentParameterStructure 827826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pointer to application allocated structure to be used for 828826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev initialization by the component. 829826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 830826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 831826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 832826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup comp 833826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 834826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_SetParameter( \ 835826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 836826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nParamIndex, \ 837826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pComponentParameterStructure) \ 838826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ((OMX_COMPONENTTYPE*)hComponent)->SetParameter( \ 839826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 840826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nParamIndex, \ 841826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pComponentParameterStructure) /* Macro End */ 842826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 843826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 8446eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/** The OMX_GetConfig macro will get one of the configuration structures 8456eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal from a component. This macro can be invoked anytime after the 8466eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal component has been loaded. The nParamIndex call parameter is used to 8476eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal indicate which structure is being requested from the component. The 8486eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal application shall allocate the correct structure and shall fill in the 8496eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal structure size and version information before invoking this macro. 8506eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal If the component has not had this configuration parameter sent before, 8516eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal then the component should return a set of valid DEFAULT values for the 8526eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal component. This is a blocking call. 8536eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 854826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The component should return from this call within 5 msec. 8556eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 856826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] hComponent 857826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Handle of the component to be accessed. This is the component 858826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle returned by the call to the OMX_GetHandle function. 859826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] nIndex 860826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Index of the structure to be filled. This value is from the 861826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_INDEXTYPE enumeration. 862826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in,out] pComponentConfigStructure 8636eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal pointer to application allocated structure to be filled by the 864826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev component. 865826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 866826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 867826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 868826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup comp 8696eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal*/ 870826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_GetConfig( \ 871826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 872826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nConfigIndex, \ 873826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pComponentConfigStructure) \ 874826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ((OMX_COMPONENTTYPE*)hComponent)->GetConfig( \ 875826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 876826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nConfigIndex, \ 877826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pComponentConfigStructure) /* Macro End */ 878826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 879826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 8806eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/** The OMX_SetConfig macro will send one of the configuration 881826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev structures to a component. Each structure shall be sent one at a time, 8826eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal each in a separate invocation of the macro. This macro can be invoked 8836eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal anytime after the component has been loaded. The application shall 8846eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal allocate the correct structure and shall fill in the structure size 8856eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal and version information (as well as the actual data) before invoking 8866eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal this macro. The application is free to dispose of this structure after 8876eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal the call as the component is required to copy any data it shall retain. 8886eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal This is a blocking call. 8896eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 890826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The component should return from this call within 5 msec. 8916eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 892826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] hComponent 893826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Handle of the component to be accessed. This is the component 894826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle returned by the call to the OMX_GetHandle function. 895826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] nConfigIndex 896826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Index of the structure to be sent. This value is from the 897826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_INDEXTYPE enumeration above. 898826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] pComponentConfigStructure 899826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pointer to application allocated structure to be used for 900826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev initialization by the component. 901826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 902826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 903826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 904826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup comp 905826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 906826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_SetConfig( \ 907826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 908826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nConfigIndex, \ 909826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pComponentConfigStructure) \ 910826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ((OMX_COMPONENTTYPE*)hComponent)->SetConfig( \ 911826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 912826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nConfigIndex, \ 913826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pComponentConfigStructure) /* Macro End */ 914826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 915826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 9166eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/** The OMX_GetExtensionIndex macro will invoke a component to translate 9176eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal a vendor specific configuration or parameter string into an OMX 9186eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal structure index. There is no requirement for the vendor to support 9196eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal this command for the indexes already found in the OMX_INDEXTYPE 9206eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal enumeration (this is done to save space in small components). The 921826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev component shall support all vendor supplied extension indexes not found 9226eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal in the master OMX_INDEXTYPE enumeration. This is a blocking call. 9236eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 924826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The component should return from this call within 5 msec. 9256eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 926826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] hComponent 927826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Handle of the component to be accessed. This is the component 928826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle returned by the call to the GetHandle function. 929826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] cParameterName 930826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_STRING that shall be less than 128 characters long including 9316eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal the trailing null byte. This is the string that will get 932826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev translated by the component into a configuration index. 933826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [out] pIndexType 934826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev a pointer to a OMX_INDEXTYPE to receive the index value. 935826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 936826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 937826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 938826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup comp 939826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 940826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_GetExtensionIndex( \ 941826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 942826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev cParameterName, \ 943826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pIndexType) \ 944826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ((OMX_COMPONENTTYPE*)hComponent)->GetExtensionIndex( \ 945826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 946826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev cParameterName, \ 947826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pIndexType) /* Macro End */ 948826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 949826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 9506eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/** The OMX_GetState macro will invoke the component to get the current 951826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev state of the component and place the state value into the location 9526eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal pointed to by pState. 9536eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 954826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The component should return from this call within 5 msec. 9556eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 956826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] hComponent 957826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Handle of the component to be accessed. This is the component 958826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle returned by the call to the OMX_GetHandle function. 959826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [out] pState 960826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pointer to the location to receive the state. The value returned 9616eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal is one of the OMX_STATETYPE members 962826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 963826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 964826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 965826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup comp 966826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 967826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_GetState( \ 968826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 969826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pState) \ 970826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ((OMX_COMPONENTTYPE*)hComponent)->GetState( \ 971826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 972826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pState) /* Macro End */ 973826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 974826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 975826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_UseBuffer macro will request that the component use 9766eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal a buffer (and allocate its own buffer header) already allocated 9776eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal by another component, or by the IL Client. This is a blocking 978826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev call. 9796eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 980826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The component should return from this call within 20 msec. 9816eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 982826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] hComponent 983826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Handle of the component to be accessed. This is the component 984826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle returned by the call to the OMX_GetHandle function. 985826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [out] ppBuffer 9866eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal pointer to an OMX_BUFFERHEADERTYPE structure used to receive the 987826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pointer to the buffer header 988826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 989826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 990826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 991826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup comp buf 992826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 993826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 994826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_UseBuffer( \ 995826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 996826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ppBufferHdr, \ 997826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nPortIndex, \ 998826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pAppPrivate, \ 999826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nSizeBytes, \ 1000826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pBuffer) \ 1001826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ((OMX_COMPONENTTYPE*)hComponent)->UseBuffer( \ 1002826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 1003826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ppBufferHdr, \ 1004826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nPortIndex, \ 1005826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pAppPrivate, \ 1006826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nSizeBytes, \ 1007826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pBuffer) 1008826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1009826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 10106eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/** The OMX_AllocateBuffer macro will request that the component allocate 10116eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal a new buffer and buffer header. The component will allocate the 10126eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal buffer and the buffer header and return a pointer to the buffer 1013826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev header. This is a blocking call. 10146eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1015826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The component should return from this call within 5 msec. 10166eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1017826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] hComponent 1018826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Handle of the component to be accessed. This is the component 1019826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle returned by the call to the OMX_GetHandle function. 1020826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [out] ppBuffer 10216eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal pointer to an OMX_BUFFERHEADERTYPE structure used to receive 1022826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev the pointer to the buffer header 1023826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] nPortIndex 1024826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nPortIndex is used to select the port on the component the buffer will 1025826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev be used with. The port can be found by using the nPortIndex 1026826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev value as an index into the Port Definition array of the component. 1027826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] pAppPrivate 10286eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal pAppPrivate is used to initialize the pAppPrivate member of the 1029826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev buffer header structure. 1030826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] nSizeBytes 1031826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev size of the buffer to allocate. Used when bAllocateNew is true. 1032826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 1033826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 1034826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1035826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup comp buf 10366eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal */ 1037826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_AllocateBuffer( \ 1038826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 1039826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ppBuffer, \ 1040826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nPortIndex, \ 1041826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pAppPrivate, \ 1042826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nSizeBytes) \ 1043826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ((OMX_COMPONENTTYPE*)hComponent)->AllocateBuffer( \ 1044826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 1045826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ppBuffer, \ 1046826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nPortIndex, \ 1047826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pAppPrivate, \ 1048826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nSizeBytes) /* Macro End */ 1049826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1050826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1051826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_FreeBuffer macro will release a buffer header from the component 10526eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal which was allocated using either OMX_AllocateBuffer or OMX_UseBuffer. If 10536eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal the component allocated the buffer (see the OMX_UseBuffer macro) then 10546eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal the component shall free the buffer and buffer header. This is a 10556eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal blocking call. 10566eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1057826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The component should return from this call within 20 msec. 10586eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1059826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] hComponent 1060826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Handle of the component to be accessed. This is the component 1061826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle returned by the call to the OMX_GetHandle function. 1062826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] nPortIndex 1063826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nPortIndex is used to select the port on the component the buffer will 1064826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev be used with. 1065826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] pBuffer 1066826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer 1067826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev or AllocateBuffer. 1068826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 1069826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 1070826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1071826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup comp buf 1072826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 1073826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_FreeBuffer( \ 1074826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 1075826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nPortIndex, \ 1076826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pBuffer) \ 1077826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ((OMX_COMPONENTTYPE*)hComponent)->FreeBuffer( \ 1078826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 1079826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nPortIndex, \ 1080826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pBuffer) /* Macro End */ 1081826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1082826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 10836eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/** The OMX_EmptyThisBuffer macro will send a buffer full of data to an 1084826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev input port of a component. The buffer will be emptied by the component 1085826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev and returned to the application via the EmptyBufferDone call back. 1086826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev This is a non-blocking call in that the component will record the buffer 10876eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal and return immediately and then empty the buffer, later, at the proper 10886eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal time. As expected, this macro may be invoked only while the component 1089826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev is in the OMX_StateExecuting. If nPortIndex does not specify an input 10906eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal port, the component shall return an error. 10916eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1092826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The component should return from this call within 5 msec. 10936eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1094826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] hComponent 1095826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Handle of the component to be accessed. This is the component 1096826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle returned by the call to the OMX_GetHandle function. 1097826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] pBuffer 1098826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer 1099826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev or AllocateBuffer. 1100826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 1101826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 1102826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1103826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup comp buf 1104826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 1105826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_EmptyThisBuffer( \ 1106826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 1107826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pBuffer) \ 1108826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ((OMX_COMPONENTTYPE*)hComponent)->EmptyThisBuffer( \ 1109826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 1110826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pBuffer) /* Macro End */ 1111826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1112826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 11136eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/** The OMX_FillThisBuffer macro will send an empty buffer to an 1114826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev output port of a component. The buffer will be filled by the component 1115826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev and returned to the application via the FillBufferDone call back. 1116826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev This is a non-blocking call in that the component will record the buffer 11176eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal and return immediately and then fill the buffer, later, at the proper 11186eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal time. As expected, this macro may be invoked only while the component 1119826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev is in the OMX_ExecutingState. If nPortIndex does not specify an output 11206eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal port, the component shall return an error. 11216eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1122826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The component should return from this call within 5 msec. 11236eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1124826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] hComponent 1125826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Handle of the component to be accessed. This is the component 1126826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle returned by the call to the OMX_GetHandle function. 1127826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] pBuffer 1128826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer 1129826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev or AllocateBuffer. 1130826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 1131826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 1132826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1133826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup comp buf 1134826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 1135826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_FillThisBuffer( \ 1136826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 1137826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pBuffer) \ 1138826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ((OMX_COMPONENTTYPE*)hComponent)->FillThisBuffer( \ 1139826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 1140826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pBuffer) /* Macro End */ 1141826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1142826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1143826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1144826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_UseEGLImage macro will request that the component use 1145826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev a EGLImage provided by EGL (and allocate its own buffer header) 1146826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev This is a blocking call. 11476eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1148826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The component should return from this call within 20 msec. 11496eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1150826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] hComponent 1151826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Handle of the component to be accessed. This is the component 1152826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle returned by the call to the OMX_GetHandle function. 1153826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [out] ppBuffer 11546eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal pointer to an OMX_BUFFERHEADERTYPE structure used to receive the 1155826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pointer to the buffer header. Note that the memory location used 1156826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev for this buffer is NOT visible to the IL Client. 1157826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] nPortIndex 1158826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nPortIndex is used to select the port on the component the buffer will 1159826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev be used with. The port can be found by using the nPortIndex 1160826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev value as an index into the Port Definition array of the component. 1161826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] pAppPrivate 11626eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal pAppPrivate is used to initialize the pAppPrivate member of the 1163826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev buffer header structure. 1164826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] eglImage 1165826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev eglImage contains the handle of the EGLImage to use as a buffer on the 11666eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal specified port. The component is expected to validate properties of 1167826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev the EGLImage against the configuration of the port to ensure the component 11686eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal can use the EGLImage as a buffer. 1169826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 1170826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 1171826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1172826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup comp buf 1173826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 1174826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_UseEGLImage( \ 1175826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 1176826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ppBufferHdr, \ 1177826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nPortIndex, \ 1178826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pAppPrivate, \ 1179826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev eglImage) \ 1180826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ((OMX_COMPONENTTYPE*)hComponent)->UseEGLImage( \ 1181826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev hComponent, \ 1182826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev ppBufferHdr, \ 1183826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nPortIndex, \ 1184826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pAppPrivate, \ 1185826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev eglImage) 1186826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1187826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_Init method is used to initialize the OMX core. It shall be the 1188826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev first call made into OMX and it should only be executed one time without 11896eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal an interviening OMX_Deinit call. 11906eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1191826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The core should return from this call within 20 msec. 1192826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1193826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 1194826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 1195826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1196826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup core 1197826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 1198826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan MalchevOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Init(void); 1199826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1200826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 12016eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/** The OMX_Deinit method is used to deinitialize the OMX core. It shall be 12026eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal the last call made into OMX. In the event that the core determines that 12036eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal thare are components loaded when this call is made, the core may return 1204826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev with an error rather than try to unload the components. 12056eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1206826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The core should return from this call within 20 msec. 12076eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1208826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 1209826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 1210826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1211826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup core 1212826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 1213826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan MalchevOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Deinit(void); 1214826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1215826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1216826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_ComponentNameEnum method will enumerate through all the names of 1217826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev recognised valid components in the system. This function is provided 1218826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev as a means to detect all the components in the system run-time. There is 1219826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev no strict ordering to the enumeration order of component names, although 1220826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev each name will only be enumerated once. If the OMX core supports run-time 1221826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev installation of new components, it is only requried to detect newly 1222826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev installed components when the first call to enumerate component names 1223826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev is made (i.e. when nIndex is 0x0). 12246eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1225826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The core should return from this call in 20 msec. 12266eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1227826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [out] cComponentName 1228826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pointer to a null terminated string with the component name. The 1229826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev names of the components are strings less than 127 bytes in length 12306eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal plus the trailing null for a maximum size of 128 bytes. An example 12316eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal of a valid component name is "OMX.TI.AUDIO.DSP.MIXER\0". Names are 12326eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal assigned by the vendor, but shall start with "OMX." and then have 1233826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev the Vendor designation next. 1234826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] nNameLength 12356eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal number of characters in the cComponentName string. With all 12366eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal component name strings restricted to less than 128 characters 1237826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev (including the trailing null) it is recomended that the caller 1238826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev provide a input string for the cComponentName of 128 characters. 1239826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] nIndex 12406eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal number containing the enumeration index for the component. 1241826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Multiple calls to OMX_ComponentNameEnum with increasing values 1242826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev of nIndex will enumerate through the component names in the 1243826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev system until OMX_ErrorNoMore is returned. The value of nIndex 1244826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev is 0 to (N-1), where N is the number of valid installed components 1245826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev in the system. 1246826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 1247826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 12486eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_ErrorNone. When the value of nIndex exceeds the number of 1249826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev components in the system minus 1, OMX_ErrorNoMore will be 1250826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev returned. Otherwise the appropriate OMX error will be returned. 1251826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup core 1252826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 1253826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan MalchevOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_ComponentNameEnum( 1254826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_OUT OMX_STRING cComponentName, 1255826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_U32 nNameLength, 1256826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_U32 nIndex); 1257826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1258826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1259826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_GetHandle method will locate the component specified by the 1260826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev component name given, load that component into memory and then invoke 12616eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal the component's methods to create an instance of the component. 12626eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1263826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The core should return from this call within 20 msec. 12646eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1265826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [out] pHandle 1266826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pointer to an OMX_HANDLETYPE pointer to be filled in by this method. 1267826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] cComponentName 1268826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pointer to a null terminated string with the component name. The 1269826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev names of the components are strings less than 127 bytes in length 12706eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal plus the trailing null for a maximum size of 128 bytes. An example 12716eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal of a valid component name is "OMX.TI.AUDIO.DSP.MIXER\0". Names are 12726eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal assigned by the vendor, but shall start with "OMX." and then have 1273826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev the Vendor designation next. 1274826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] pAppData 1275826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pointer to an application defined value that will be returned 1276826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev during callbacks so that the application can identify the source 1277826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev of the callback. 1278826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] pCallBacks 1279826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev pointer to a OMX_CALLBACKTYPE structure that will be passed to the 12806eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal component to initialize it with. 1281826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 1282826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 1283826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1284826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup core 1285826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 1286826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan MalchevOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_GetHandle( 12876eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_OUT OMX_HANDLETYPE* pHandle, 1288826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_STRING cComponentName, 1289826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_PTR pAppData, 1290826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_CALLBACKTYPE* pCallBacks); 1291826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1292826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 12936eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal/** The OMX_FreeHandle method will free a handle allocated by the OMX_GetHandle 1294826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev method. If the component reference count goes to zero, the component will 12956eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal be unloaded from memory. 12966eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 12976eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal The core should return from this call within 20 msec when the component is 1298826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev in the OMX_StateLoaded state. 1299826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1300826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] hComponent 1301826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Handle of the component to be accessed. This is the component 1302826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev handle returned by the call to the GetHandle function. 1303826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 1304826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 1305826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1306826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup core 1307826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 1308826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan MalchevOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_FreeHandle( 1309826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_HANDLETYPE hComponent); 1310826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1311826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1312826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1313826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_SetupTunnel method will handle the necessary calls to the components 1314826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev to setup the specified tunnel the two components. NOTE: This is 1315826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev an actual method (not a #define macro). This method will make calls into 13166eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal the component ComponentTunnelRequest method to do the actual tunnel 13176eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal connection. 1318826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 13196eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal The ComponentTunnelRequest method on both components will be called. 13206eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal This method shall not be called unless the component is in the 1321826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_StateLoaded state except when the ports used for the tunnel are 1322826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev disabled. In this case, the component may be in the OMX_StateExecuting, 13236eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_StatePause, or OMX_StateIdle states. 1324826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1325826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The core should return from this call within 20 msec. 13266eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1327826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] hOutput 1328826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Handle of the component to be accessed. Also this is the handle 1329826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev of the component whose port, specified in the nPortOutput parameter 1330826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev will be used the source for the tunnel. This is the component handle 13316eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal returned by the call to the OMX_GetHandle function. There is a 1332826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev requirement that hOutput be the source for the data when 1333826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev tunelling (i.e. nPortOutput is an output port). If 0x0, the component 1334826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev specified in hInput will have it's port specified in nPortInput 1335826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev setup for communication with the application / IL client. 1336826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] nPortOutput 1337826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nPortOutput is used to select the source port on component to be 13386eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal used in the tunnel. 1339826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] hInput 1340826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev This is the component to setup the tunnel with. This is the handle 1341826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev of the component whose port, specified in the nPortInput parameter 1342826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev will be used the destination for the tunnel. This is the component handle 13436eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal returned by the call to the OMX_GetHandle function. There is a 1344826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev requirement that hInput be the destination for the data when 1345826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev tunelling (i.e. nPortInut is an input port). If 0x0, the component 1346826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev specified in hOutput will have it's port specified in nPortPOutput 1347826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev setup for communication with the application / IL client. 1348826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] nPortInput 1349826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev nPortInput is used to select the destination port on component to be 1350826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev used in the tunnel. 1351826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @return OMX_ERRORTYPE 1352826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If the command successfully executes, the return code will be 1353826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 13546eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal When OMX_ErrorNotImplemented is returned, one or both components is 1355826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev a non-interop component and does not support tunneling. 13566eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1357826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev On failure, the ports of both components are setup for communication 1358826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev with the application / IL Client. 1359826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup core tun 1360826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 1361826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan MalchevOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_SetupTunnel( 1362826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_HANDLETYPE hOutput, 1363826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_U32 nPortOutput, 1364826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_HANDLETYPE hInput, 1365826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_U32 nPortInput); 13666eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1367826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** @ingroup cp */ 1368826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan MalchevOMX_API OMX_ERRORTYPE OMX_GetContentPipe( 1369826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_OUT OMX_HANDLETYPE *hPipe, 1370826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_STRING szURI); 1371826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1372826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_GetComponentsOfRole method will return the number of components that support the given 13736eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal role and (if the compNames field is non-NULL) the names of those components. The call will fail if 1374826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev an insufficiently sized array of names is supplied. To ensure the array is sufficiently sized the 1375826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev client should: 1376826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * first call this function with the compNames field NULL to determine the number of component names 13776eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * second call this function with the compNames field pointing to an array of names allocated 1378826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev according to the number returned by the first call. 1379826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1380826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The core should return from this call within 5 msec. 13816eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1382826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] role 13836eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal This is generic standard component name consisting only of component class 1384826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev name and the type within that class (e.g. 'audio_decoder.aac'). 1385826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [inout] pNumComps 13866eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal This is used both as input and output. 13876eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1388826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If compNames is NULL, the input is ignored and the output specifies how many components support 1389826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev the given role. 13906eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 13916eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal If compNames is not NULL, on input it bounds the size of the input structure and 1392826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev on output, it specifies the number of components string names listed within the compNames parameter. 1393826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [inout] compNames 13946eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal If NULL this field is ignored. If non-NULL this points to an array of 128-byte strings which accepts 13956eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal a list of the names of all physical components that implement the specified standard component name. 1396826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev Each name is NULL terminated. numComps indicates the number of names. 1397826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup core 1398826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 13996eec4d1ea65df853450a6e158718981cba900bf6Shashank MittalOMX_API OMX_ERRORTYPE OMX_GetComponentsOfRole ( 1400826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_IN OMX_STRING role, 1401826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_INOUT OMX_U32 *pNumComps, 1402826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_INOUT OMX_U8 **compNames); 1403826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1404826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_GetRolesOfComponent method will return the number of roles supported by the given 14056eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal component and (if the roles field is non-NULL) the names of those roles. The call will fail if 1406826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev an insufficiently sized array of names is supplied. To ensure the array is sufficiently sized the 1407826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev client should: 1408826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * first call this function with the roles field NULL to determine the number of role names 14096eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal * second call this function with the roles field pointing to an array of names allocated 1410826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev according to the number returned by the first call. 1411826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1412826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev The core should return from this call within 5 msec. 1413826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1414826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [in] compName 1415826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev This is the name of the component being queried about. 1416826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [inout] pNumRoles 14176eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal This is used both as input and output. 14186eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 1419826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev If roles is NULL, the input is ignored and the output specifies how many roles the component supports. 14206eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal 14216eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal If compNames is not NULL, on input it bounds the size of the input structure and 1422826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev on output, it specifies the number of roles string names listed within the roles parameter. 1423826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @param [out] roles 14246eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal If NULL this field is ignored. If non-NULL this points to an array of 128-byte strings 14256eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal which accepts a list of the names of all standard components roles implemented on the 1426826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev specified component name. numComps indicates the number of names. 1427826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev @ingroup core 1428826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */ 14296eec4d1ea65df853450a6e158718981cba900bf6Shashank MittalOMX_API OMX_ERRORTYPE OMX_GetRolesOfComponent ( 14306eec4d1ea65df853450a6e158718981cba900bf6Shashank Mittal OMX_IN OMX_STRING compName, 1431826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_INOUT OMX_U32 *pNumRoles, 1432826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev OMX_OUT OMX_U8 **roles); 1433826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1434826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#ifdef __cplusplus 1435826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} 1436826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#endif /* __cplusplus */ 1437826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1438826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#endif 1439826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/* File EOF */ 1440826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev 1441