1334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* ------------------------------------------------------------------ 2334de520b0369215b7931fefa424fb92d295f0ebJames Dong * Copyright (C) 1998-2009 PacketVideo 3334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 4334de520b0369215b7931fefa424fb92d295f0ebJames Dong * Licensed under the Apache License, Version 2.0 (the "License"); 5334de520b0369215b7931fefa424fb92d295f0ebJames Dong * you may not use this file except in compliance with the License. 6334de520b0369215b7931fefa424fb92d295f0ebJames Dong * You may obtain a copy of the License at 7334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 8334de520b0369215b7931fefa424fb92d295f0ebJames Dong * http://www.apache.org/licenses/LICENSE-2.0 9334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 10334de520b0369215b7931fefa424fb92d295f0ebJames Dong * Unless required by applicable law or agreed to in writing, software 11334de520b0369215b7931fefa424fb92d295f0ebJames Dong * distributed under the License is distributed on an "AS IS" BASIS, 12334de520b0369215b7931fefa424fb92d295f0ebJames Dong * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13334de520b0369215b7931fefa424fb92d295f0ebJames Dong * express or implied. 14334de520b0369215b7931fefa424fb92d295f0ebJames Dong * See the License for the specific language governing permissions 15334de520b0369215b7931fefa424fb92d295f0ebJames Dong * and limitations under the License. 16334de520b0369215b7931fefa424fb92d295f0ebJames Dong * ------------------------------------------------------------------- 17334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 18334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* 19334de520b0369215b7931fefa424fb92d295f0ebJames Dong * Copyright (c) 2008 The Khronos Group Inc. 20334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 21334de520b0369215b7931fefa424fb92d295f0ebJames Dong * Permission is hereby granted, free of charge, to any person obtaining 22334de520b0369215b7931fefa424fb92d295f0ebJames Dong * a copy of this software and associated documentation files (the 23334de520b0369215b7931fefa424fb92d295f0ebJames Dong * "Software"), to deal in the Software without restriction, including 24334de520b0369215b7931fefa424fb92d295f0ebJames Dong * without limitation the rights to use, copy, modify, merge, publish, 25334de520b0369215b7931fefa424fb92d295f0ebJames Dong * distribute, sublicense, and/or sell copies of the Software, and to 26334de520b0369215b7931fefa424fb92d295f0ebJames Dong * permit persons to whom the Software is furnished to do so, subject 27334de520b0369215b7931fefa424fb92d295f0ebJames Dong * to the following conditions: 28334de520b0369215b7931fefa424fb92d295f0ebJames Dong * The above copyright notice and this permission notice shall be included 29334de520b0369215b7931fefa424fb92d295f0ebJames Dong * in all copies or substantial portions of the Software. 30334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 31334de520b0369215b7931fefa424fb92d295f0ebJames Dong * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 32334de520b0369215b7931fefa424fb92d295f0ebJames Dong * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 33334de520b0369215b7931fefa424fb92d295f0ebJames Dong * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 34334de520b0369215b7931fefa424fb92d295f0ebJames Dong * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 35334de520b0369215b7931fefa424fb92d295f0ebJames Dong * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 36334de520b0369215b7931fefa424fb92d295f0ebJames Dong * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 37334de520b0369215b7931fefa424fb92d295f0ebJames Dong * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 38334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 39334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 40334de520b0369215b7931fefa424fb92d295f0ebJames Dong 41334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** OMX_Core.h - OpenMax IL version 1.1.2 42334de520b0369215b7931fefa424fb92d295f0ebJames Dong * The OMX_Core header file contains the definitions used by both the 43334de520b0369215b7931fefa424fb92d295f0ebJames Dong * application and the component to access common items. 44334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 45334de520b0369215b7931fefa424fb92d295f0ebJames Dong 46334de520b0369215b7931fefa424fb92d295f0ebJames Dong#ifndef OMX_Core_h 47334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_Core_h 48334de520b0369215b7931fefa424fb92d295f0ebJames Dong 49334de520b0369215b7931fefa424fb92d295f0ebJames Dong#ifdef __cplusplus 50334de520b0369215b7931fefa424fb92d295f0ebJames Dongextern "C" { 51334de520b0369215b7931fefa424fb92d295f0ebJames Dong#endif /* __cplusplus */ 52334de520b0369215b7931fefa424fb92d295f0ebJames Dong 53334de520b0369215b7931fefa424fb92d295f0ebJames Dong 54334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* Each OMX header shall include all required header files to allow the 55334de520b0369215b7931fefa424fb92d295f0ebJames Dong * header to compile without errors. The includes below are required 56334de520b0369215b7931fefa424fb92d295f0ebJames Dong * for this header file to compile successfully 57334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 58334de520b0369215b7931fefa424fb92d295f0ebJames Dong 59334de520b0369215b7931fefa424fb92d295f0ebJames Dong#include <OMX_Index.h> 60334de520b0369215b7931fefa424fb92d295f0ebJames Dong 61334de520b0369215b7931fefa424fb92d295f0ebJames Dong 62334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_COMMANDTYPE enumeration is used to specify the action in the 63334de520b0369215b7931fefa424fb92d295f0ebJames Dong * OMX_SendCommand macro. 64334de520b0369215b7931fefa424fb92d295f0ebJames Dong * @ingroup core 65334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 66334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef enum OMX_COMMANDTYPE 67334de520b0369215b7931fefa424fb92d295f0ebJames Dong{ 68334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_CommandStateSet, /**< Change the component state */ 69334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_CommandFlush, /**< Flush the data queue(s) of a component */ 70334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_CommandPortDisable, /**< Disable a port on a component. */ 71334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_CommandPortEnable, /**< Enable a port on a component. */ 72334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_CommandMarkBuffer, /**< Mark a component/buffer for observation */ 73334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_CommandKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 74334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_CommandVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ 75334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_CommandMax = 0X7FFFFFFF 76334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_COMMANDTYPE; 77334de520b0369215b7931fefa424fb92d295f0ebJames Dong 78334de520b0369215b7931fefa424fb92d295f0ebJames Dong 79334de520b0369215b7931fefa424fb92d295f0ebJames Dong 80334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_STATETYPE enumeration is used to indicate or change the component 81334de520b0369215b7931fefa424fb92d295f0ebJames Dong * state. This enumeration reflects the current state of the component when 82334de520b0369215b7931fefa424fb92d295f0ebJames Dong * used with the OMX_GetState macro or becomes the parameter in a state change 83334de520b0369215b7931fefa424fb92d295f0ebJames Dong * command when used with the OMX_SendCommand macro. 84334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 85334de520b0369215b7931fefa424fb92d295f0ebJames Dong * The component will be in the Loaded state after the component is initially 86334de520b0369215b7931fefa424fb92d295f0ebJames Dong * loaded into memory. In the Loaded state, the component is not allowed to 87334de520b0369215b7931fefa424fb92d295f0ebJames Dong * allocate or hold resources other than to build it's internal parameter 88334de520b0369215b7931fefa424fb92d295f0ebJames Dong * and configuration tables. The application will send one or more 89334de520b0369215b7931fefa424fb92d295f0ebJames Dong * SetParameters/GetParameters and SetConfig/GetConfig commands to the 90334de520b0369215b7931fefa424fb92d295f0ebJames Dong * component and the component will record each of these parameter and 91334de520b0369215b7931fefa424fb92d295f0ebJames Dong * configuration changes for use later. When the application sends the 92334de520b0369215b7931fefa424fb92d295f0ebJames Dong * Idle command, the component will acquire the resources needed for the 93334de520b0369215b7931fefa424fb92d295f0ebJames Dong * specified configuration and will transition to the idle state if the 94334de520b0369215b7931fefa424fb92d295f0ebJames Dong * allocation is successful. If the component cannot successfully 95334de520b0369215b7931fefa424fb92d295f0ebJames Dong * transition to the idle state for any reason, the state of the component 96334de520b0369215b7931fefa424fb92d295f0ebJames Dong * shall be fully rolled back to the Loaded state (e.g. all allocated 97334de520b0369215b7931fefa424fb92d295f0ebJames Dong * resources shall be released). When the component receives the command 98334de520b0369215b7931fefa424fb92d295f0ebJames Dong * to go to the Executing state, it shall begin processing buffers by 99334de520b0369215b7931fefa424fb92d295f0ebJames Dong * sending all input buffers it holds to the application. While 100334de520b0369215b7931fefa424fb92d295f0ebJames Dong * the component is in the Idle state, the application may also send the 101334de520b0369215b7931fefa424fb92d295f0ebJames Dong * Pause command. If the component receives the pause command while in the 102334de520b0369215b7931fefa424fb92d295f0ebJames Dong * Idle state, the component shall send all input buffers it holds to the 103334de520b0369215b7931fefa424fb92d295f0ebJames Dong * application, but shall not begin processing buffers. This will allow the 104334de520b0369215b7931fefa424fb92d295f0ebJames Dong * application to prefill buffers. 105334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 106334de520b0369215b7931fefa424fb92d295f0ebJames Dong * @ingroup comp 107334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 108334de520b0369215b7931fefa424fb92d295f0ebJames Dong 109334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef enum OMX_STATETYPE 110334de520b0369215b7931fefa424fb92d295f0ebJames Dong{ 111334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_StateInvalid, /**< component has detected that it's internal data 112334de520b0369215b7931fefa424fb92d295f0ebJames Dong structures are corrupted to the point that 113334de520b0369215b7931fefa424fb92d295f0ebJames Dong it cannot determine it's state properly */ 114334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_StateLoaded, /**< component has been loaded but has not completed 115334de520b0369215b7931fefa424fb92d295f0ebJames Dong initialization. The OMX_SetParameter macro 116334de520b0369215b7931fefa424fb92d295f0ebJames Dong and the OMX_GetParameter macro are the only 117334de520b0369215b7931fefa424fb92d295f0ebJames Dong valid macros allowed to be sent to the 118334de520b0369215b7931fefa424fb92d295f0ebJames Dong component in this state. */ 119334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_StateIdle, /**< component initialization has been completed 120334de520b0369215b7931fefa424fb92d295f0ebJames Dong successfully and the component is ready to 121334de520b0369215b7931fefa424fb92d295f0ebJames Dong to start. */ 122334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_StateExecuting, /**< component has accepted the start command and 123334de520b0369215b7931fefa424fb92d295f0ebJames Dong is processing data (if data is available) */ 124334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_StatePause, /**< component has received pause command */ 125334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_StateWaitForResources, /**< component is waiting for resources, either after 126334de520b0369215b7931fefa424fb92d295f0ebJames Dong preemption or before it gets the resources requested. 127334de520b0369215b7931fefa424fb92d295f0ebJames Dong See specification for complete details. */ 128334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_StateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 129334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_StateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ 130334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_StateMax = 0X7FFFFFFF 131334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_STATETYPE; 132334de520b0369215b7931fefa424fb92d295f0ebJames Dong 133334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_ERRORTYPE enumeration defines the standard OMX Errors. These 134334de520b0369215b7931fefa424fb92d295f0ebJames Dong * errors should cover most of the common failure cases. However, 135334de520b0369215b7931fefa424fb92d295f0ebJames Dong * vendors are free to add additional error messages of their own as 136334de520b0369215b7931fefa424fb92d295f0ebJames Dong * long as they follow these rules: 137334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 1. Vendor error messages shall be in the range of 0x90000000 to 138334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 0x9000FFFF. 139334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 2. Vendor error messages shall be defined in a header file provided 140334de520b0369215b7931fefa424fb92d295f0ebJames Dong * with the component. No error messages are allowed that are 141334de520b0369215b7931fefa424fb92d295f0ebJames Dong * not defined. 142334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 143334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef enum OMX_ERRORTYPE 144334de520b0369215b7931fefa424fb92d295f0ebJames Dong{ 145334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone = 0, 146334de520b0369215b7931fefa424fb92d295f0ebJames Dong 147334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** There were insufficient resources to perform the requested operation */ 148334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorInsufficientResources = (OMX_S32) 0x80001000, 149334de520b0369215b7931fefa424fb92d295f0ebJames Dong 150334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** There was an error, but the cause of the error could not be determined */ 151334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorUndefined = (OMX_S32) 0x80001001, 152334de520b0369215b7931fefa424fb92d295f0ebJames Dong 153334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** The component name string was not valid */ 154334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorInvalidComponentName = (OMX_S32) 0x80001002, 155334de520b0369215b7931fefa424fb92d295f0ebJames Dong 156334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** No component with the specified name string was found */ 157334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorComponentNotFound = (OMX_S32) 0x80001003, 158334de520b0369215b7931fefa424fb92d295f0ebJames Dong 159334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** The component specified did not have a "OMX_ComponentInit" or 160334de520b0369215b7931fefa424fb92d295f0ebJames Dong "OMX_ComponentDeInit entry point */ 161334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorInvalidComponent = (OMX_S32) 0x80001004, 162334de520b0369215b7931fefa424fb92d295f0ebJames Dong 163334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** One or more parameters were not valid */ 164334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorBadParameter = (OMX_S32) 0x80001005, 165334de520b0369215b7931fefa424fb92d295f0ebJames Dong 166334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** The requested function is not implemented */ 167334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNotImplemented = (OMX_S32) 0x80001006, 168334de520b0369215b7931fefa424fb92d295f0ebJames Dong 169334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** The buffer was emptied before the next buffer was ready */ 170334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorUnderflow = (OMX_S32) 0x80001007, 171334de520b0369215b7931fefa424fb92d295f0ebJames Dong 172334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** The buffer was not available when it was needed */ 173334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorOverflow = (OMX_S32) 0x80001008, 174334de520b0369215b7931fefa424fb92d295f0ebJames Dong 175334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** The hardware failed to respond as expected */ 176334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorHardware = (OMX_S32) 0x80001009, 177334de520b0369215b7931fefa424fb92d295f0ebJames Dong 178334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** The component is in the state OMX_StateInvalid */ 179334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorInvalidState = (OMX_S32) 0x8000100A, 180334de520b0369215b7931fefa424fb92d295f0ebJames Dong 181334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** Stream is found to be corrupt */ 182334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorStreamCorrupt = (OMX_S32) 0x8000100B, 183334de520b0369215b7931fefa424fb92d295f0ebJames Dong 184334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** Ports being connected are not compatible */ 185334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorPortsNotCompatible = (OMX_S32) 0x8000100C, 186334de520b0369215b7931fefa424fb92d295f0ebJames Dong 187334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** Resources allocated to an idle component have been 188334de520b0369215b7931fefa424fb92d295f0ebJames Dong lost resulting in the component returning to the loaded state */ 189334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorResourcesLost = (OMX_S32) 0x8000100D, 190334de520b0369215b7931fefa424fb92d295f0ebJames Dong 191334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** No more indicies can be enumerated */ 192334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNoMore = (OMX_S32) 0x8000100E, 193334de520b0369215b7931fefa424fb92d295f0ebJames Dong 194334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** The component detected a version mismatch */ 195334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorVersionMismatch = (OMX_S32) 0x8000100F, 196334de520b0369215b7931fefa424fb92d295f0ebJames Dong 197334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** The component is not ready to return data at this time */ 198334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNotReady = (OMX_S32) 0x80001010, 199334de520b0369215b7931fefa424fb92d295f0ebJames Dong 200334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** There was a timeout that occurred */ 201334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorTimeout = (OMX_S32) 0x80001011, 202334de520b0369215b7931fefa424fb92d295f0ebJames Dong 203334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** This error occurs when trying to transition into the state you are already in */ 204334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorSameState = (OMX_S32) 0x80001012, 205334de520b0369215b7931fefa424fb92d295f0ebJames Dong 206334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** Resources allocated to an executing or paused component have been 207334de520b0369215b7931fefa424fb92d295f0ebJames Dong preempted, causing the component to return to the idle state */ 208334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorResourcesPreempted = (OMX_S32) 0x80001013, 209334de520b0369215b7931fefa424fb92d295f0ebJames Dong 210334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** A non-supplier port sends this error to the IL client (via the EventHandler callback) 211334de520b0369215b7931fefa424fb92d295f0ebJames Dong during the allocation of buffers (on a transition from the LOADED to the IDLE state or 212334de520b0369215b7931fefa424fb92d295f0ebJames Dong on a port restart) when it deems that it has waited an unusually long time for the supplier 213334de520b0369215b7931fefa424fb92d295f0ebJames Dong to send it an allocated buffer via a UseBuffer call. */ 214334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorPortUnresponsiveDuringAllocation = (OMX_S32) 0x80001014, 215334de520b0369215b7931fefa424fb92d295f0ebJames Dong 216334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** A non-supplier port sends this error to the IL client (via the EventHandler callback) 217334de520b0369215b7931fefa424fb92d295f0ebJames Dong during the deallocation of buffers (on a transition from the IDLE to LOADED state or 218334de520b0369215b7931fefa424fb92d295f0ebJames Dong on a port stop) when it deems that it has waited an unusually long time for the supplier 219334de520b0369215b7931fefa424fb92d295f0ebJames Dong to request the deallocation of a buffer header via a FreeBuffer call. */ 220334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorPortUnresponsiveDuringDeallocation = (OMX_S32) 0x80001015, 221334de520b0369215b7931fefa424fb92d295f0ebJames Dong 222334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** A supplier port sends this error to the IL client (via the EventHandler callback) 223334de520b0369215b7931fefa424fb92d295f0ebJames Dong during the stopping of a port (either on a transition from the IDLE to LOADED 224334de520b0369215b7931fefa424fb92d295f0ebJames Dong state or a port stop) when it deems that it has waited an unusually long time for 225334de520b0369215b7931fefa424fb92d295f0ebJames Dong the non-supplier to return a buffer via an EmptyThisBuffer or FillThisBuffer call. */ 226334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorPortUnresponsiveDuringStop = (OMX_S32) 0x80001016, 227334de520b0369215b7931fefa424fb92d295f0ebJames Dong 228334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** Attempting a state transtion that is not allowed */ 229334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorIncorrectStateTransition = (OMX_S32) 0x80001017, 230334de520b0369215b7931fefa424fb92d295f0ebJames Dong 231334de520b0369215b7931fefa424fb92d295f0ebJames Dong /* Attempting a command that is not allowed during the present state. */ 232334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorIncorrectStateOperation = (OMX_S32) 0x80001018, 233334de520b0369215b7931fefa424fb92d295f0ebJames Dong 234334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** The values encapsulated in the parameter or config structure are not supported. */ 235334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorUnsupportedSetting = (OMX_S32) 0x80001019, 236334de520b0369215b7931fefa424fb92d295f0ebJames Dong 237334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** The parameter or config indicated by the given index is not supported. */ 238334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorUnsupportedIndex = (OMX_S32) 0x8000101A, 239334de520b0369215b7931fefa424fb92d295f0ebJames Dong 240334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** The port index supplied is incorrect. */ 241334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorBadPortIndex = (OMX_S32) 0x8000101B, 242334de520b0369215b7931fefa424fb92d295f0ebJames Dong 243334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** The port has lost one or more of its buffers and it thus unpopulated. */ 244334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorPortUnpopulated = (OMX_S32) 0x8000101C, 245334de520b0369215b7931fefa424fb92d295f0ebJames Dong 246334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** Component suspended due to temporary loss of resources */ 247334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorComponentSuspended = (OMX_S32) 0x8000101D, 248334de520b0369215b7931fefa424fb92d295f0ebJames Dong 249334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** Component suspended due to an inability to acquire dynamic resources */ 250334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorDynamicResourcesUnavailable = (OMX_S32) 0x8000101E, 251334de520b0369215b7931fefa424fb92d295f0ebJames Dong 252334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** When the macroblock error reporting is enabled the component returns new error 253334de520b0369215b7931fefa424fb92d295f0ebJames Dong for every frame that has errors */ 254334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorMbErrorsInFrame = (OMX_S32) 0x8000101F, 255334de520b0369215b7931fefa424fb92d295f0ebJames Dong 256334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** A component reports this error when it cannot parse or determine the format of an input stream. */ 257334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorFormatNotDetected = (OMX_S32) 0x80001020, 258334de520b0369215b7931fefa424fb92d295f0ebJames Dong 259334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** The content open operation failed. */ 260334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorContentPipeOpenFailed = (OMX_S32) 0x80001021, 261334de520b0369215b7931fefa424fb92d295f0ebJames Dong 262334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** The content creation operation failed. */ 263334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorContentPipeCreationFailed = (OMX_S32) 0x80001022, 264334de520b0369215b7931fefa424fb92d295f0ebJames Dong 265334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** Separate table information is being used */ 266334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorSeperateTablesUsed = (OMX_S32) 0x80001023, 267334de520b0369215b7931fefa424fb92d295f0ebJames Dong 268334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** Tunneling is unsupported by the component*/ 269334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorTunnelingUnsupported = (OMX_S32) 0x80001024, 270334de520b0369215b7931fefa424fb92d295f0ebJames Dong 271334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorKhronosExtensions = (OMX_S32)0x8F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 272334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorVendorStartUnused = (OMX_S32)0x90000000, /**< Reserved region for introducing Vendor Extensions */ 273334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorMax = 0x7FFFFFFF 274334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_ERRORTYPE; 275334de520b0369215b7931fefa424fb92d295f0ebJames Dong 276334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** @ingroup core */ 277334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef OMX_ERRORTYPE (* OMX_COMPONENTINITTYPE)(OMX_IN OMX_HANDLETYPE hComponent); 278334de520b0369215b7931fefa424fb92d295f0ebJames Dong 279334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** @ingroup core */ 280334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef struct OMX_COMPONENTREGISTERTYPE 281334de520b0369215b7931fefa424fb92d295f0ebJames Dong{ 282334de520b0369215b7931fefa424fb92d295f0ebJames Dong const char * pName; /* Component name, 128 byte limit (including '\0') applies */ 283334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_COMPONENTINITTYPE pInitialize; /* Component instance initialization function */ 284334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_COMPONENTREGISTERTYPE; 285334de520b0369215b7931fefa424fb92d295f0ebJames Dong 286334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** @ingroup core */ 287334de520b0369215b7931fefa424fb92d295f0ebJames Dongextern OMX_COMPONENTREGISTERTYPE OMX_ComponentRegistered[]; 288334de520b0369215b7931fefa424fb92d295f0ebJames Dong 289334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** @ingroup rpm */ 290334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef struct OMX_PRIORITYMGMTTYPE { 291334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nSize; /**< size of the structure in bytes */ 292334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 293334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nGroupPriority; /**< Priority of the component group */ 294334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nGroupID; /**< ID of the component group */ 295334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_PRIORITYMGMTTYPE; 296334de520b0369215b7931fefa424fb92d295f0ebJames Dong 297334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* Component name and Role names are limited to 128 characters including the terminating '\0'. */ 298334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_MAX_STRINGNAME_SIZE 128 299334de520b0369215b7931fefa424fb92d295f0ebJames Dong 300334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** @ingroup comp */ 301334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef struct OMX_PARAM_COMPONENTROLETYPE { 302334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nSize; /**< size of the structure in bytes */ 303334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 304334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U8 cRole[OMX_MAX_STRINGNAME_SIZE]; /**< name of standard component which defines component role */ 305334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_PARAM_COMPONENTROLETYPE; 306334de520b0369215b7931fefa424fb92d295f0ebJames Dong 307334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** End of Stream Buffer Flag: 308334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 309334de520b0369215b7931fefa424fb92d295f0ebJames Dong * A component sets EOS when it has no more data to emit on a particular 310334de520b0369215b7931fefa424fb92d295f0ebJames Dong * output port. Thus an output port shall set EOS on the last buffer it 311334de520b0369215b7931fefa424fb92d295f0ebJames Dong * emits. A component's determination of when an output port should 312334de520b0369215b7931fefa424fb92d295f0ebJames Dong * cease sending data is implemenation specific. 313334de520b0369215b7931fefa424fb92d295f0ebJames Dong * @ingroup buf 314334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 315334de520b0369215b7931fefa424fb92d295f0ebJames Dong 316334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_BUFFERFLAG_EOS 0x00000001 317334de520b0369215b7931fefa424fb92d295f0ebJames Dong 318334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** Start Time Buffer Flag: 319334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 320334de520b0369215b7931fefa424fb92d295f0ebJames Dong * The source of a stream (e.g. a demux component) sets the STARTTIME 321334de520b0369215b7931fefa424fb92d295f0ebJames Dong * flag on the buffer that contains the starting timestamp for the 322334de520b0369215b7931fefa424fb92d295f0ebJames Dong * stream. The starting timestamp corresponds to the first data that 323334de520b0369215b7931fefa424fb92d295f0ebJames Dong * should be displayed at startup or after a seek. 324334de520b0369215b7931fefa424fb92d295f0ebJames Dong * The first timestamp of the stream is not necessarily the start time. 325334de520b0369215b7931fefa424fb92d295f0ebJames Dong * For instance, in the case of a seek to a particular video frame, 326334de520b0369215b7931fefa424fb92d295f0ebJames Dong * the target frame may be an interframe. Thus the first buffer of 327334de520b0369215b7931fefa424fb92d295f0ebJames Dong * the stream will be the intra-frame preceding the target frame and 328334de520b0369215b7931fefa424fb92d295f0ebJames Dong * the starttime will occur with the target frame (with any other 329334de520b0369215b7931fefa424fb92d295f0ebJames Dong * required frames required to reconstruct the target intervening). 330334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 331334de520b0369215b7931fefa424fb92d295f0ebJames Dong * The STARTTIME flag is directly associated with the buffer's 332334de520b0369215b7931fefa424fb92d295f0ebJames Dong * timestamp ' thus its association to buffer data and its 333334de520b0369215b7931fefa424fb92d295f0ebJames Dong * propagation is identical to the timestamp's. 334334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 335334de520b0369215b7931fefa424fb92d295f0ebJames Dong * When a Sync Component client receives a buffer with the 336334de520b0369215b7931fefa424fb92d295f0ebJames Dong * STARTTIME flag it shall perform a SetConfig on its sync port 337334de520b0369215b7931fefa424fb92d295f0ebJames Dong * using OMX_ConfigTimeClientStartTime and passing the buffer's 338334de520b0369215b7931fefa424fb92d295f0ebJames Dong * timestamp. 339334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 340334de520b0369215b7931fefa424fb92d295f0ebJames Dong * @ingroup buf 341334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 342334de520b0369215b7931fefa424fb92d295f0ebJames Dong 343334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_BUFFERFLAG_STARTTIME 0x00000002 344334de520b0369215b7931fefa424fb92d295f0ebJames Dong 345334de520b0369215b7931fefa424fb92d295f0ebJames Dong 346334de520b0369215b7931fefa424fb92d295f0ebJames Dong 347334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** Decode Only Buffer Flag: 348334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 349334de520b0369215b7931fefa424fb92d295f0ebJames Dong * The source of a stream (e.g. a demux component) sets the DECODEONLY 350334de520b0369215b7931fefa424fb92d295f0ebJames Dong * flag on any buffer that should shall be decoded but should not be 351334de520b0369215b7931fefa424fb92d295f0ebJames Dong * displayed. This flag is used, for instance, when a source seeks to 352334de520b0369215b7931fefa424fb92d295f0ebJames Dong * a target interframe that requires the decode of frames preceding the 353334de520b0369215b7931fefa424fb92d295f0ebJames Dong * target to facilitate the target's reconstruction. In this case the 354334de520b0369215b7931fefa424fb92d295f0ebJames Dong * source would emit the frames preceding the target downstream 355334de520b0369215b7931fefa424fb92d295f0ebJames Dong * but mark them as decode only. 356334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 357334de520b0369215b7931fefa424fb92d295f0ebJames Dong * The DECODEONLY is associated with buffer data and propagated in a 358334de520b0369215b7931fefa424fb92d295f0ebJames Dong * manner identical to the buffer timestamp. 359334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 360334de520b0369215b7931fefa424fb92d295f0ebJames Dong * A component that renders data should ignore all buffers with 361334de520b0369215b7931fefa424fb92d295f0ebJames Dong * the DECODEONLY flag set. 362334de520b0369215b7931fefa424fb92d295f0ebJames Dong * 363334de520b0369215b7931fefa424fb92d295f0ebJames Dong * @ingroup buf 364334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 365334de520b0369215b7931fefa424fb92d295f0ebJames Dong 366334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_BUFFERFLAG_DECODEONLY 0x00000004 367334de520b0369215b7931fefa424fb92d295f0ebJames Dong 368334de520b0369215b7931fefa424fb92d295f0ebJames Dong 369334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* Data Corrupt Flag: This flag is set when the IL client believes the data in the associated buffer is corrupt 370334de520b0369215b7931fefa424fb92d295f0ebJames Dong * @ingroup buf 371334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 372334de520b0369215b7931fefa424fb92d295f0ebJames Dong 373334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_BUFFERFLAG_DATACORRUPT 0x00000008 374334de520b0369215b7931fefa424fb92d295f0ebJames Dong 375334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* End of Frame: The buffer contains exactly one end of frame and no data 376334de520b0369215b7931fefa424fb92d295f0ebJames Dong * occurs after the end of frame. This flag is an optional hint. The absence 377334de520b0369215b7931fefa424fb92d295f0ebJames Dong * of this flag does not imply the absence of an end of frame within the buffer. 378334de520b0369215b7931fefa424fb92d295f0ebJames Dong * @ingroup buf 379334de520b0369215b7931fefa424fb92d295f0ebJames Dong*/ 380334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_BUFFERFLAG_ENDOFFRAME 0x00000010 381334de520b0369215b7931fefa424fb92d295f0ebJames Dong 382334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* Sync Frame Flag: This flag is set when the buffer content contains a coded sync frame ' 383334de520b0369215b7931fefa424fb92d295f0ebJames Dong * a frame that has no dependency on any other frame information 384334de520b0369215b7931fefa424fb92d295f0ebJames Dong * @ingroup buf 385334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 386334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_BUFFERFLAG_SYNCFRAME 0x00000020 387334de520b0369215b7931fefa424fb92d295f0ebJames Dong 388334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* Extra data present flag: there is extra data appended to the data stream 389334de520b0369215b7931fefa424fb92d295f0ebJames Dong * residing in the buffer 390334de520b0369215b7931fefa424fb92d295f0ebJames Dong * @ingroup buf 391334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 392334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_BUFFERFLAG_EXTRADATA 0x00000040 393334de520b0369215b7931fefa424fb92d295f0ebJames Dong 394334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** Codec Config Buffer Flag: 395334de520b0369215b7931fefa424fb92d295f0ebJames Dong* OMX_BUFFERFLAG_CODECCONFIG is an optional flag that is set by an 396334de520b0369215b7931fefa424fb92d295f0ebJames Dong* output port when all bytes in the buffer form part or all of a set of 397334de520b0369215b7931fefa424fb92d295f0ebJames Dong* codec specific configuration data. Examples include SPS/PPS nal units 398334de520b0369215b7931fefa424fb92d295f0ebJames Dong* for OMX_VIDEO_CodingAVC or AudioSpecificConfig data for 399334de520b0369215b7931fefa424fb92d295f0ebJames Dong* OMX_AUDIO_CodingAAC. Any component that for a given stream sets 400334de520b0369215b7931fefa424fb92d295f0ebJames Dong* OMX_BUFFERFLAG_CODECCONFIG shall not mix codec configuration bytes 401334de520b0369215b7931fefa424fb92d295f0ebJames Dong* with frame data in the same buffer, and shall send all buffers 402334de520b0369215b7931fefa424fb92d295f0ebJames Dong* containing codec configuration bytes before any buffers containing 403334de520b0369215b7931fefa424fb92d295f0ebJames Dong* frame data that those configurations bytes describe. 404334de520b0369215b7931fefa424fb92d295f0ebJames Dong* If the stream format for a particular codec has a frame specific 405334de520b0369215b7931fefa424fb92d295f0ebJames Dong* header at the start of each frame, for example OMX_AUDIO_CodingMP3 or 406334de520b0369215b7931fefa424fb92d295f0ebJames Dong* OMX_AUDIO_CodingAAC in ADTS mode, then these shall be presented as 407334de520b0369215b7931fefa424fb92d295f0ebJames Dong* normal without setting OMX_BUFFERFLAG_CODECCONFIG. 408334de520b0369215b7931fefa424fb92d295f0ebJames Dong * @ingroup buf 409334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 410334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_BUFFERFLAG_CODECCONFIG 0x00000080 411334de520b0369215b7931fefa424fb92d295f0ebJames Dong 412334de520b0369215b7931fefa424fb92d295f0ebJames Dong 413334de520b0369215b7931fefa424fb92d295f0ebJames Dong 414334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** @ingroup buf */ 415334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef struct OMX_BUFFERHEADERTYPE 416334de520b0369215b7931fefa424fb92d295f0ebJames Dong{ 417334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nSize; /**< size of the structure in bytes */ 418334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 419334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U8* pBuffer; /**< Pointer to actual block of memory 420334de520b0369215b7931fefa424fb92d295f0ebJames Dong that is acting as the buffer */ 421334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nAllocLen; /**< size of the buffer allocated, in bytes */ 422334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nFilledLen; /**< number of bytes currently in the 423334de520b0369215b7931fefa424fb92d295f0ebJames Dong buffer */ 424334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nOffset; /**< start offset of valid data in bytes from 425334de520b0369215b7931fefa424fb92d295f0ebJames Dong the start of the buffer */ 426334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_PTR pAppPrivate; /**< pointer to any data the application 427334de520b0369215b7931fefa424fb92d295f0ebJames Dong wants to associate with this buffer */ 428334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_PTR pPlatformPrivate; /**< pointer to any data the platform 429334de520b0369215b7931fefa424fb92d295f0ebJames Dong wants to associate with this buffer */ 430334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_PTR pInputPortPrivate; /**< pointer to any data the input port 431334de520b0369215b7931fefa424fb92d295f0ebJames Dong wants to associate with this buffer */ 432334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_PTR pOutputPortPrivate; /**< pointer to any data the output port 433334de520b0369215b7931fefa424fb92d295f0ebJames Dong wants to associate with this buffer */ 434334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_HANDLETYPE hMarkTargetComponent; /**< The component that will generate a 435334de520b0369215b7931fefa424fb92d295f0ebJames Dong mark event upon processing this buffer. */ 436334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_PTR pMarkData; /**< Application specific data associated with 437334de520b0369215b7931fefa424fb92d295f0ebJames Dong the mark sent on a mark event to disambiguate 438334de520b0369215b7931fefa424fb92d295f0ebJames Dong this mark from others. */ 439334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nTickCount; /**< Optional entry that the component and 440334de520b0369215b7931fefa424fb92d295f0ebJames Dong application can update with a tick count 441334de520b0369215b7931fefa424fb92d295f0ebJames Dong when they access the component. This 442334de520b0369215b7931fefa424fb92d295f0ebJames Dong value should be in microseconds. Since 443334de520b0369215b7931fefa424fb92d295f0ebJames Dong this is a value relative to an arbitrary 444334de520b0369215b7931fefa424fb92d295f0ebJames Dong starting point, this value cannot be used 445334de520b0369215b7931fefa424fb92d295f0ebJames Dong to determine absolute time. This is an 446334de520b0369215b7931fefa424fb92d295f0ebJames Dong optional entry and not all components 447334de520b0369215b7931fefa424fb92d295f0ebJames Dong will update it.*/ 448334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_TICKS nTimeStamp; /**< Timestamp corresponding to the sample 449334de520b0369215b7931fefa424fb92d295f0ebJames Dong starting at the first logical sample 450334de520b0369215b7931fefa424fb92d295f0ebJames Dong boundary in the buffer. Timestamps of 451334de520b0369215b7931fefa424fb92d295f0ebJames Dong successive samples within the buffer may 452334de520b0369215b7931fefa424fb92d295f0ebJames Dong be inferred by adding the duration of the 453334de520b0369215b7931fefa424fb92d295f0ebJames Dong of the preceding buffer to the timestamp 454334de520b0369215b7931fefa424fb92d295f0ebJames Dong of the preceding buffer.*/ 455334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nFlags; /**< buffer specific flags */ 456334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nOutputPortIndex; /**< The index of the output port (if any) using 457334de520b0369215b7931fefa424fb92d295f0ebJames Dong this buffer */ 458334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nInputPortIndex; /**< The index of the input port (if any) using 459334de520b0369215b7931fefa424fb92d295f0ebJames Dong this buffer */ 460334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_BUFFERHEADERTYPE; 461334de520b0369215b7931fefa424fb92d295f0ebJames Dong 462334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_EXTRADATATYPE enumeration is used to define the 463334de520b0369215b7931fefa424fb92d295f0ebJames Dong * possible extra data payload types. 464334de520b0369215b7931fefa424fb92d295f0ebJames Dong * NB: this enum is binary backwards compatible with the previous 465334de520b0369215b7931fefa424fb92d295f0ebJames Dong * OMX_EXTRADATA_QUANT define. This should be replaced with 466334de520b0369215b7931fefa424fb92d295f0ebJames Dong * OMX_ExtraDataQuantization. 467334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 468334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef enum OMX_EXTRADATATYPE 469334de520b0369215b7931fefa424fb92d295f0ebJames Dong{ 470334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ExtraDataNone = 0, /**< Indicates that no more extra data sections follow */ 471334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ExtraDataQuantization, /**< The data payload contains quantization data */ 472334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ExtraDataKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 473334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ExtraDataVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ 474334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ExtraDataMax = 0x7FFFFFFF 475334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_EXTRADATATYPE; 476334de520b0369215b7931fefa424fb92d295f0ebJames Dong 477334de520b0369215b7931fefa424fb92d295f0ebJames Dong 478334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef struct OMX_OTHER_EXTRADATATYPE { 479334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nSize; 480334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_VERSIONTYPE nVersion; 481334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nPortIndex; 482334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_EXTRADATATYPE eType; /* Extra Data type */ 483334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nDataSize; /* Size of the supporting data to follow */ 484334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U8 data[1]; /* Supporting data hint */ 485334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_OTHER_EXTRADATATYPE; 486334de520b0369215b7931fefa424fb92d295f0ebJames Dong 487334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** @ingroup comp */ 488334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef struct OMX_PORT_PARAM_TYPE { 489334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nSize; /**< size of the structure in bytes */ 490334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 491334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nPorts; /**< The number of ports for this component */ 492334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nStartPortNumber; /** first port number for this type of port */ 493334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_PORT_PARAM_TYPE; 494334de520b0369215b7931fefa424fb92d295f0ebJames Dong 495334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** @ingroup comp */ 496334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef enum OMX_EVENTTYPE 497334de520b0369215b7931fefa424fb92d295f0ebJames Dong{ 498334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_EventCmdComplete, /**< component has sucessfully completed a command */ 499334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_EventError, /**< component has detected an error condition */ 500334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_EventMark, /**< component has detected a buffer mark */ 501334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_EventPortSettingsChanged, /**< component is reported a port settings change */ 502334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_EventBufferFlag, /**< component has detected an EOS */ 503334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_EventResourcesAcquired, /**< component has been granted resources and is 504334de520b0369215b7931fefa424fb92d295f0ebJames Dong automatically starting the state change from 505334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_StateWaitForResources to OMX_StateIdle. */ 506334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_EventComponentResumed, /**< Component resumed due to reacquisition of resources */ 507334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_EventDynamicResourcesAvailable, /**< Component has acquired previously unavailable dynamic resources */ 508334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_EventPortFormatDetected, /**< Component has detected a supported format. */ 509334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_EventKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 510334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_EventVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ 511334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_EventMax = 0x7FFFFFFF 512334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_EVENTTYPE; 513334de520b0369215b7931fefa424fb92d295f0ebJames Dong 514334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef struct OMX_CALLBACKTYPE 515334de520b0369215b7931fefa424fb92d295f0ebJames Dong{ 516334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** The EventHandler method is used to notify the application when an 517334de520b0369215b7931fefa424fb92d295f0ebJames Dong event of interest occurs. Events are defined in the OMX_EVENTTYPE 518334de520b0369215b7931fefa424fb92d295f0ebJames Dong enumeration. Please see that enumeration for details of what will 519334de520b0369215b7931fefa424fb92d295f0ebJames Dong be returned for each type of event. Callbacks should not return 520334de520b0369215b7931fefa424fb92d295f0ebJames Dong an error to the component, so if an error occurs, the application 521334de520b0369215b7931fefa424fb92d295f0ebJames Dong shall handle it internally. This is a blocking call. 522334de520b0369215b7931fefa424fb92d295f0ebJames Dong 523334de520b0369215b7931fefa424fb92d295f0ebJames Dong The application should return from this call within 5 msec to avoid 524334de520b0369215b7931fefa424fb92d295f0ebJames Dong blocking the component for an excessively long period of time. 525334de520b0369215b7931fefa424fb92d295f0ebJames Dong 526334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param hComponent 527334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle of the component to access. This is the component 528334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle returned by the call to the GetHandle function. 529334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param pAppData 530334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to an application defined value that was provided in the 531334de520b0369215b7931fefa424fb92d295f0ebJames Dong pAppData parameter to the OMX_GetHandle method for the component. 532334de520b0369215b7931fefa424fb92d295f0ebJames Dong This application defined value is provided so that the application 533334de520b0369215b7931fefa424fb92d295f0ebJames Dong can have a component specific context when receiving the callback. 534334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param eEvent 535334de520b0369215b7931fefa424fb92d295f0ebJames Dong Event that the component wants to notify the application about. 536334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param nData1 537334de520b0369215b7931fefa424fb92d295f0ebJames Dong nData will be the OMX_ERRORTYPE for an error event and will be 538334de520b0369215b7931fefa424fb92d295f0ebJames Dong an OMX_COMMANDTYPE for a command complete event and OMX_INDEXTYPE for a OMX_PortSettingsChanged event. 539334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param nData2 540334de520b0369215b7931fefa424fb92d295f0ebJames Dong nData2 will hold further information related to the event. Can be OMX_STATETYPE for 541334de520b0369215b7931fefa424fb92d295f0ebJames Dong a OMX_CommandStateSet command or port index for a OMX_PortSettingsChanged event. 542334de520b0369215b7931fefa424fb92d295f0ebJames Dong Default value is 0 if not used. ) 543334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param pEventData 544334de520b0369215b7931fefa424fb92d295f0ebJames Dong Pointer to additional event-specific data (see spec for meaning). 545334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 546334de520b0369215b7931fefa424fb92d295f0ebJames Dong 547334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ERRORTYPE (*EventHandler)( 548334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_HANDLETYPE hComponent, 549334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_PTR pAppData, 550334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_EVENTTYPE eEvent, 551334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_U32 nData1, 552334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_U32 nData2, 553334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_PTR pEventData); 554334de520b0369215b7931fefa424fb92d295f0ebJames Dong 555334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** The EmptyBufferDone method is used to return emptied buffers from an 556334de520b0369215b7931fefa424fb92d295f0ebJames Dong input port back to the application for reuse. This is a blocking call 557334de520b0369215b7931fefa424fb92d295f0ebJames Dong so the application should not attempt to refill the buffers during this 558334de520b0369215b7931fefa424fb92d295f0ebJames Dong call, but should queue them and refill them in another thread. There 559334de520b0369215b7931fefa424fb92d295f0ebJames Dong is no error return, so the application shall handle any errors generated 560334de520b0369215b7931fefa424fb92d295f0ebJames Dong internally. 561334de520b0369215b7931fefa424fb92d295f0ebJames Dong 562334de520b0369215b7931fefa424fb92d295f0ebJames Dong The application should return from this call within 5 msec. 563334de520b0369215b7931fefa424fb92d295f0ebJames Dong 564334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param hComponent 565334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle of the component to access. This is the component 566334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle returned by the call to the GetHandle function. 567334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param pAppData 568334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to an application defined value that was provided in the 569334de520b0369215b7931fefa424fb92d295f0ebJames Dong pAppData parameter to the OMX_GetHandle method for the component. 570334de520b0369215b7931fefa424fb92d295f0ebJames Dong This application defined value is provided so that the application 571334de520b0369215b7931fefa424fb92d295f0ebJames Dong can have a component specific context when receiving the callback. 572334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param pBuffer 573334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer 574334de520b0369215b7931fefa424fb92d295f0ebJames Dong or AllocateBuffer indicating the buffer that was emptied. 575334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup buf 576334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 577334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ERRORTYPE (*EmptyBufferDone)( 578334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_HANDLETYPE hComponent, 579334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_PTR pAppData, 580334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_BUFFERHEADERTYPE* pBuffer); 581334de520b0369215b7931fefa424fb92d295f0ebJames Dong 582334de520b0369215b7931fefa424fb92d295f0ebJames Dong /** The FillBufferDone method is used to return filled buffers from an 583334de520b0369215b7931fefa424fb92d295f0ebJames Dong output port back to the application for emptying and then reuse. 584334de520b0369215b7931fefa424fb92d295f0ebJames Dong This is a blocking call so the application should not attempt to 585334de520b0369215b7931fefa424fb92d295f0ebJames Dong empty the buffers during this call, but should queue the buffers 586334de520b0369215b7931fefa424fb92d295f0ebJames Dong and empty them in another thread. There is no error return, so 587334de520b0369215b7931fefa424fb92d295f0ebJames Dong the application shall handle any errors generated internally. The 588334de520b0369215b7931fefa424fb92d295f0ebJames Dong application shall also update the buffer header to indicate the 589334de520b0369215b7931fefa424fb92d295f0ebJames Dong number of bytes placed into the buffer. 590334de520b0369215b7931fefa424fb92d295f0ebJames Dong 591334de520b0369215b7931fefa424fb92d295f0ebJames Dong The application should return from this call within 5 msec. 592334de520b0369215b7931fefa424fb92d295f0ebJames Dong 593334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param hComponent 594334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle of the component to access. This is the component 595334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle returned by the call to the GetHandle function. 596334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param pAppData 597334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to an application defined value that was provided in the 598334de520b0369215b7931fefa424fb92d295f0ebJames Dong pAppData parameter to the OMX_GetHandle method for the component. 599334de520b0369215b7931fefa424fb92d295f0ebJames Dong This application defined value is provided so that the application 600334de520b0369215b7931fefa424fb92d295f0ebJames Dong can have a component specific context when receiving the callback. 601334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param pBuffer 602334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer 603334de520b0369215b7931fefa424fb92d295f0ebJames Dong or AllocateBuffer indicating the buffer that was filled. 604334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup buf 605334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 606334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ERRORTYPE (*FillBufferDone)( 607334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_OUT OMX_HANDLETYPE hComponent, 608334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_OUT OMX_PTR pAppData, 609334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer); 610334de520b0369215b7931fefa424fb92d295f0ebJames Dong 611334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_CALLBACKTYPE; 612334de520b0369215b7931fefa424fb92d295f0ebJames Dong 613334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_BUFFERSUPPLIERTYPE enumeration is used to dictate port supplier 614334de520b0369215b7931fefa424fb92d295f0ebJames Dong preference when tunneling between two ports. 615334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup tun buf 616334de520b0369215b7931fefa424fb92d295f0ebJames Dong*/ 617334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef enum OMX_BUFFERSUPPLIERTYPE 618334de520b0369215b7931fefa424fb92d295f0ebJames Dong{ 619334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_BufferSupplyUnspecified = 0x0, /**< port supplying the buffers is unspecified, 620334de520b0369215b7931fefa424fb92d295f0ebJames Dong or don't care */ 621334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_BufferSupplyInput, /**< input port supplies the buffers */ 622334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_BufferSupplyOutput, /**< output port supplies the buffers */ 623334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_BufferSupplyKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 624334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_BufferSupplyVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ 625334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_BufferSupplyMax = 0x7FFFFFFF 626334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_BUFFERSUPPLIERTYPE; 627334de520b0369215b7931fefa424fb92d295f0ebJames Dong 628334de520b0369215b7931fefa424fb92d295f0ebJames Dong 629334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** buffer supplier parameter 630334de520b0369215b7931fefa424fb92d295f0ebJames Dong * @ingroup tun 631334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 632334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef struct OMX_PARAM_BUFFERSUPPLIERTYPE { 633334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nSize; /**< size of the structure in bytes */ 634334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 635334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nPortIndex; /**< port that this structure applies to */ 636334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_BUFFERSUPPLIERTYPE eBufferSupplier; /**< buffer supplier */ 637334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_PARAM_BUFFERSUPPLIERTYPE; 638334de520b0369215b7931fefa424fb92d295f0ebJames Dong 639334de520b0369215b7931fefa424fb92d295f0ebJames Dong 640334de520b0369215b7931fefa424fb92d295f0ebJames Dong/**< indicates that buffers received by an input port of a tunnel 641334de520b0369215b7931fefa424fb92d295f0ebJames Dong may not modify the data in the buffers 642334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup tun 643334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 644334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_PORTTUNNELFLAG_READONLY 0x00000001 645334de520b0369215b7931fefa424fb92d295f0ebJames Dong 646334de520b0369215b7931fefa424fb92d295f0ebJames Dong 647334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_TUNNELSETUPTYPE structure is used to pass data from an output 648334de520b0369215b7931fefa424fb92d295f0ebJames Dong port to an input port as part the two ComponentTunnelRequest calls 649334de520b0369215b7931fefa424fb92d295f0ebJames Dong resulting from a OMX_SetupTunnel call from the IL Client. 650334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup tun 651334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 652334de520b0369215b7931fefa424fb92d295f0ebJames Dongtypedef struct OMX_TUNNELSETUPTYPE 653334de520b0369215b7931fefa424fb92d295f0ebJames Dong{ 654334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_U32 nTunnelFlags; /**< bit flags for tunneling */ 655334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_BUFFERSUPPLIERTYPE eSupplier; /**< supplier preference */ 656334de520b0369215b7931fefa424fb92d295f0ebJames Dong} OMX_TUNNELSETUPTYPE; 657334de520b0369215b7931fefa424fb92d295f0ebJames Dong 658334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* OMX Component headers is included to enable the core to use 659334de520b0369215b7931fefa424fb92d295f0ebJames Dong macros for functions into the component for OMX release 1.0. 660334de520b0369215b7931fefa424fb92d295f0ebJames Dong Developers should not access any structures or data from within 661334de520b0369215b7931fefa424fb92d295f0ebJames Dong the component header directly */ 662334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* TO BE REMOVED - #include <OMX_Component.h> */ 663334de520b0369215b7931fefa424fb92d295f0ebJames Dong 664334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** GetComponentVersion will return information about the component. 665334de520b0369215b7931fefa424fb92d295f0ebJames Dong This is a blocking call. This macro will go directly from the 666334de520b0369215b7931fefa424fb92d295f0ebJames Dong application to the component (via a core macro). The 667334de520b0369215b7931fefa424fb92d295f0ebJames Dong component will return from this call within 5 msec. 668334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] hComponent 669334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle of component to execute the command 670334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [out] pComponentName 671334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to an empty string of length 128 bytes. The component 672334de520b0369215b7931fefa424fb92d295f0ebJames Dong will write its name into this string. The name will be 673334de520b0369215b7931fefa424fb92d295f0ebJames Dong terminated by a single zero byte. The name of a component will 674334de520b0369215b7931fefa424fb92d295f0ebJames Dong be 127 bytes or less to leave room for the trailing zero byte. 675334de520b0369215b7931fefa424fb92d295f0ebJames Dong An example of a valid component name is "OMX.ABC.ChannelMixer\0". 676334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [out] pComponentVersion 677334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to an OMX Version structure that the component will fill 678334de520b0369215b7931fefa424fb92d295f0ebJames Dong in. The component will fill in a value that indicates the 679334de520b0369215b7931fefa424fb92d295f0ebJames Dong component version. NOTE: the component version is NOT the same 680334de520b0369215b7931fefa424fb92d295f0ebJames Dong as the OMX Specification version (found in all structures). The 681334de520b0369215b7931fefa424fb92d295f0ebJames Dong component version is defined by the vendor of the component and 682334de520b0369215b7931fefa424fb92d295f0ebJames Dong its value is entirely up to the component vendor. 683334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [out] pSpecVersion 684334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to an OMX Version structure that the component will fill 685334de520b0369215b7931fefa424fb92d295f0ebJames Dong in. The SpecVersion is the version of the specification that the 686334de520b0369215b7931fefa424fb92d295f0ebJames Dong component was built against. Please note that this value may or 687334de520b0369215b7931fefa424fb92d295f0ebJames Dong may not match the structure's version. For example, if the 688334de520b0369215b7931fefa424fb92d295f0ebJames Dong component was built against the 2.0 specification, but the 689334de520b0369215b7931fefa424fb92d295f0ebJames Dong application (which creates the structure is built against the 690334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1.0 specification the versions would be different. 691334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [out] pComponentUUID 692334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to the UUID of the component which will be filled in by 693334de520b0369215b7931fefa424fb92d295f0ebJames Dong the component. The UUID is a unique identifier that is set at 694334de520b0369215b7931fefa424fb92d295f0ebJames Dong RUN time for the component and is unique to each instantion of 695334de520b0369215b7931fefa424fb92d295f0ebJames Dong the component. 696334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 697334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 698334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 699334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup comp 700334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 701334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_GetComponentVersion( \ 702334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 703334de520b0369215b7931fefa424fb92d295f0ebJames Dong pComponentName, \ 704334de520b0369215b7931fefa424fb92d295f0ebJames Dong pComponentVersion, \ 705334de520b0369215b7931fefa424fb92d295f0ebJames Dong pSpecVersion, \ 706334de520b0369215b7931fefa424fb92d295f0ebJames Dong pComponentUUID) \ 707334de520b0369215b7931fefa424fb92d295f0ebJames Dong ((OMX_COMPONENTTYPE*)hComponent)->GetComponentVersion( \ 708334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 709334de520b0369215b7931fefa424fb92d295f0ebJames Dong pComponentName, \ 710334de520b0369215b7931fefa424fb92d295f0ebJames Dong pComponentVersion, \ 711334de520b0369215b7931fefa424fb92d295f0ebJames Dong pSpecVersion, \ 712334de520b0369215b7931fefa424fb92d295f0ebJames Dong pComponentUUID) /* Macro End */ 713334de520b0369215b7931fefa424fb92d295f0ebJames Dong 714334de520b0369215b7931fefa424fb92d295f0ebJames Dong 715334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** Send a command to the component. This call is a non-blocking call. 716334de520b0369215b7931fefa424fb92d295f0ebJames Dong The component should check the parameters and then queue the command 717334de520b0369215b7931fefa424fb92d295f0ebJames Dong to the component thread to be executed. The component thread shall 718334de520b0369215b7931fefa424fb92d295f0ebJames Dong send the EventHandler() callback at the conclusion of the command. 719334de520b0369215b7931fefa424fb92d295f0ebJames Dong This macro will go directly from the application to the component (via 720334de520b0369215b7931fefa424fb92d295f0ebJames Dong a core macro). The component will return from this call within 5 msec. 721334de520b0369215b7931fefa424fb92d295f0ebJames Dong 722334de520b0369215b7931fefa424fb92d295f0ebJames Dong When the command is "OMX_CommandStateSet" the component will queue a 723334de520b0369215b7931fefa424fb92d295f0ebJames Dong state transition to the new state idenfied in nParam. 724334de520b0369215b7931fefa424fb92d295f0ebJames Dong 725334de520b0369215b7931fefa424fb92d295f0ebJames Dong When the command is "OMX_CommandFlush", to flush a port's buffer queues, 726334de520b0369215b7931fefa424fb92d295f0ebJames Dong the command will force the component to return all buffers NOT CURRENTLY 727334de520b0369215b7931fefa424fb92d295f0ebJames Dong BEING PROCESSED to the application, in the order in which the buffers 728334de520b0369215b7931fefa424fb92d295f0ebJames Dong were received. 729334de520b0369215b7931fefa424fb92d295f0ebJames Dong 730334de520b0369215b7931fefa424fb92d295f0ebJames Dong When the command is "OMX_CommandPortDisable" or 731334de520b0369215b7931fefa424fb92d295f0ebJames Dong "OMX_CommandPortEnable", the component's port (given by the value of 732334de520b0369215b7931fefa424fb92d295f0ebJames Dong nParam) will be stopped or restarted. 733334de520b0369215b7931fefa424fb92d295f0ebJames Dong 734334de520b0369215b7931fefa424fb92d295f0ebJames Dong When the command "OMX_CommandMarkBuffer" is used to mark a buffer, the 735334de520b0369215b7931fefa424fb92d295f0ebJames Dong pCmdData will point to a OMX_MARKTYPE structure containing the component 736334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle of the component to examine the buffer chain for the mark. nParam1 737334de520b0369215b7931fefa424fb92d295f0ebJames Dong contains the index of the port on which the buffer mark is applied. 738334de520b0369215b7931fefa424fb92d295f0ebJames Dong 739334de520b0369215b7931fefa424fb92d295f0ebJames Dong Specification text for more details. 740334de520b0369215b7931fefa424fb92d295f0ebJames Dong 741334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] hComponent 742334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle of component to execute the command 743334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] Cmd 744334de520b0369215b7931fefa424fb92d295f0ebJames Dong Command for the component to execute 745334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] nParam 746334de520b0369215b7931fefa424fb92d295f0ebJames Dong Parameter for the command to be executed. When Cmd has the value 747334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_CommandStateSet, value is a member of OMX_STATETYPE. When Cmd has 748334de520b0369215b7931fefa424fb92d295f0ebJames Dong the value OMX_CommandFlush, value of nParam indicates which port(s) 749334de520b0369215b7931fefa424fb92d295f0ebJames Dong to flush. -1 is used to flush all ports a single port index will 750334de520b0369215b7931fefa424fb92d295f0ebJames Dong only flush that port. When Cmd has the value "OMX_CommandPortDisable" 751334de520b0369215b7931fefa424fb92d295f0ebJames Dong or "OMX_CommandPortEnable", the component's port is given by 752334de520b0369215b7931fefa424fb92d295f0ebJames Dong the value of nParam. When Cmd has the value "OMX_CommandMarkBuffer" 753334de520b0369215b7931fefa424fb92d295f0ebJames Dong the components pot is given by the value of nParam. 754334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] pCmdData 755334de520b0369215b7931fefa424fb92d295f0ebJames Dong Parameter pointing to the OMX_MARKTYPE structure when Cmd has the value 756334de520b0369215b7931fefa424fb92d295f0ebJames Dong "OMX_CommandMarkBuffer". 757334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 758334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 759334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 760334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup comp 761334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 762334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_SendCommand( \ 763334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 764334de520b0369215b7931fefa424fb92d295f0ebJames Dong Cmd, \ 765334de520b0369215b7931fefa424fb92d295f0ebJames Dong nParam, \ 766334de520b0369215b7931fefa424fb92d295f0ebJames Dong pCmdData) \ 767334de520b0369215b7931fefa424fb92d295f0ebJames Dong ((OMX_COMPONENTTYPE*)hComponent)->SendCommand( \ 768334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 769334de520b0369215b7931fefa424fb92d295f0ebJames Dong Cmd, \ 770334de520b0369215b7931fefa424fb92d295f0ebJames Dong nParam, \ 771334de520b0369215b7931fefa424fb92d295f0ebJames Dong pCmdData) /* Macro End */ 772334de520b0369215b7931fefa424fb92d295f0ebJames Dong 773334de520b0369215b7931fefa424fb92d295f0ebJames Dong 774334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_GetParameter macro will get one of the current parameter 775334de520b0369215b7931fefa424fb92d295f0ebJames Dong settings from the component. This macro cannot only be invoked when 776334de520b0369215b7931fefa424fb92d295f0ebJames Dong the component is in the OMX_StateInvalid state. The nParamIndex 777334de520b0369215b7931fefa424fb92d295f0ebJames Dong parameter is used to indicate which structure is being requested from 778334de520b0369215b7931fefa424fb92d295f0ebJames Dong the component. The application shall allocate the correct structure 779334de520b0369215b7931fefa424fb92d295f0ebJames Dong and shall fill in the structure size and version information before 780334de520b0369215b7931fefa424fb92d295f0ebJames Dong invoking this macro. When the parameter applies to a port, the 781334de520b0369215b7931fefa424fb92d295f0ebJames Dong caller shall fill in the appropriate nPortIndex value indicating the 782334de520b0369215b7931fefa424fb92d295f0ebJames Dong port on which the parameter applies. If the component has not had 783334de520b0369215b7931fefa424fb92d295f0ebJames Dong any settings changed, then the component should return a set of 784334de520b0369215b7931fefa424fb92d295f0ebJames Dong valid DEFAULT parameters for the component. This is a blocking 785334de520b0369215b7931fefa424fb92d295f0ebJames Dong call. 786334de520b0369215b7931fefa424fb92d295f0ebJames Dong 787334de520b0369215b7931fefa424fb92d295f0ebJames Dong The component should return from this call within 20 msec. 788334de520b0369215b7931fefa424fb92d295f0ebJames Dong 789334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] hComponent 790334de520b0369215b7931fefa424fb92d295f0ebJames Dong Handle of the component to be accessed. This is the component 791334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle returned by the call to the OMX_GetHandle function. 792334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] nParamIndex 793334de520b0369215b7931fefa424fb92d295f0ebJames Dong Index of the structure to be filled. This value is from the 794334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_INDEXTYPE enumeration. 795334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in,out] pComponentParameterStructure 796334de520b0369215b7931fefa424fb92d295f0ebJames Dong Pointer to application allocated structure to be filled by the 797334de520b0369215b7931fefa424fb92d295f0ebJames Dong component. 798334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 799334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 800334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 801334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup comp 802334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 803334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_GetParameter( \ 804334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 805334de520b0369215b7931fefa424fb92d295f0ebJames Dong nParamIndex, \ 806334de520b0369215b7931fefa424fb92d295f0ebJames Dong pComponentParameterStructure) \ 807334de520b0369215b7931fefa424fb92d295f0ebJames Dong ((OMX_COMPONENTTYPE*)hComponent)->GetParameter( \ 808334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 809334de520b0369215b7931fefa424fb92d295f0ebJames Dong nParamIndex, \ 810334de520b0369215b7931fefa424fb92d295f0ebJames Dong pComponentParameterStructure) /* Macro End */ 811334de520b0369215b7931fefa424fb92d295f0ebJames Dong 812334de520b0369215b7931fefa424fb92d295f0ebJames Dong 813334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_SetParameter macro will send an initialization parameter 814334de520b0369215b7931fefa424fb92d295f0ebJames Dong structure to a component. Each structure shall be sent one at a time, 815334de520b0369215b7931fefa424fb92d295f0ebJames Dong in a separate invocation of the macro. This macro can only be 816334de520b0369215b7931fefa424fb92d295f0ebJames Dong invoked when the component is in the OMX_StateLoaded state, or the 817334de520b0369215b7931fefa424fb92d295f0ebJames Dong port is disabled (when the parameter applies to a port). The 818334de520b0369215b7931fefa424fb92d295f0ebJames Dong nParamIndex parameter is used to indicate which structure is being 819334de520b0369215b7931fefa424fb92d295f0ebJames Dong passed to the component. The application shall allocate the 820334de520b0369215b7931fefa424fb92d295f0ebJames Dong correct structure and shall fill in the structure size and version 821334de520b0369215b7931fefa424fb92d295f0ebJames Dong information (as well as the actual data) before invoking this macro. 822334de520b0369215b7931fefa424fb92d295f0ebJames Dong The application is free to dispose of this structure after the call 823334de520b0369215b7931fefa424fb92d295f0ebJames Dong as the component is required to copy any data it shall retain. This 824334de520b0369215b7931fefa424fb92d295f0ebJames Dong is a blocking call. 825334de520b0369215b7931fefa424fb92d295f0ebJames Dong 826334de520b0369215b7931fefa424fb92d295f0ebJames Dong The component should return from this call within 20 msec. 827334de520b0369215b7931fefa424fb92d295f0ebJames Dong 828334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] hComponent 829334de520b0369215b7931fefa424fb92d295f0ebJames Dong Handle of the component to be accessed. This is the component 830334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle returned by the call to the OMX_GetHandle function. 831334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] nIndex 832334de520b0369215b7931fefa424fb92d295f0ebJames Dong Index of the structure to be sent. This value is from the 833334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_INDEXTYPE enumeration. 834334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] pComponentParameterStructure 835334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to application allocated structure to be used for 836334de520b0369215b7931fefa424fb92d295f0ebJames Dong initialization by the component. 837334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 838334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 839334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 840334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup comp 841334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 842334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_SetParameter( \ 843334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 844334de520b0369215b7931fefa424fb92d295f0ebJames Dong nParamIndex, \ 845334de520b0369215b7931fefa424fb92d295f0ebJames Dong pComponentParameterStructure) \ 846334de520b0369215b7931fefa424fb92d295f0ebJames Dong ((OMX_COMPONENTTYPE*)hComponent)->SetParameter( \ 847334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 848334de520b0369215b7931fefa424fb92d295f0ebJames Dong nParamIndex, \ 849334de520b0369215b7931fefa424fb92d295f0ebJames Dong pComponentParameterStructure) /* Macro End */ 850334de520b0369215b7931fefa424fb92d295f0ebJames Dong 851334de520b0369215b7931fefa424fb92d295f0ebJames Dong 852334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_GetConfig macro will get one of the configuration structures 853334de520b0369215b7931fefa424fb92d295f0ebJames Dong from a component. This macro can be invoked anytime after the 854334de520b0369215b7931fefa424fb92d295f0ebJames Dong component has been loaded. The nParamIndex call parameter is used to 855334de520b0369215b7931fefa424fb92d295f0ebJames Dong indicate which structure is being requested from the component. The 856334de520b0369215b7931fefa424fb92d295f0ebJames Dong application shall allocate the correct structure and shall fill in the 857334de520b0369215b7931fefa424fb92d295f0ebJames Dong structure size and version information before invoking this macro. 858334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the component has not had this configuration parameter sent before, 859334de520b0369215b7931fefa424fb92d295f0ebJames Dong then the component should return a set of valid DEFAULT values for the 860334de520b0369215b7931fefa424fb92d295f0ebJames Dong component. This is a blocking call. 861334de520b0369215b7931fefa424fb92d295f0ebJames Dong 862334de520b0369215b7931fefa424fb92d295f0ebJames Dong The component should return from this call within 5 msec. 863334de520b0369215b7931fefa424fb92d295f0ebJames Dong 864334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] hComponent 865334de520b0369215b7931fefa424fb92d295f0ebJames Dong Handle of the component to be accessed. This is the component 866334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle returned by the call to the OMX_GetHandle function. 867334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] nIndex 868334de520b0369215b7931fefa424fb92d295f0ebJames Dong Index of the structure to be filled. This value is from the 869334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_INDEXTYPE enumeration. 870334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in,out] pComponentConfigStructure 871334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to application allocated structure to be filled by the 872334de520b0369215b7931fefa424fb92d295f0ebJames Dong component. 873334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 874334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 875334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 876334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup comp 877334de520b0369215b7931fefa424fb92d295f0ebJames Dong*/ 878334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_GetConfig( \ 879334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 880334de520b0369215b7931fefa424fb92d295f0ebJames Dong nConfigIndex, \ 881334de520b0369215b7931fefa424fb92d295f0ebJames Dong pComponentConfigStructure) \ 882334de520b0369215b7931fefa424fb92d295f0ebJames Dong ((OMX_COMPONENTTYPE*)hComponent)->GetConfig( \ 883334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 884334de520b0369215b7931fefa424fb92d295f0ebJames Dong nConfigIndex, \ 885334de520b0369215b7931fefa424fb92d295f0ebJames Dong pComponentConfigStructure) /* Macro End */ 886334de520b0369215b7931fefa424fb92d295f0ebJames Dong 887334de520b0369215b7931fefa424fb92d295f0ebJames Dong 888334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_SetConfig macro will send one of the configuration 889334de520b0369215b7931fefa424fb92d295f0ebJames Dong structures to a component. Each structure shall be sent one at a time, 890334de520b0369215b7931fefa424fb92d295f0ebJames Dong each in a separate invocation of the macro. This macro can be invoked 891334de520b0369215b7931fefa424fb92d295f0ebJames Dong anytime after the component has been loaded. The application shall 892334de520b0369215b7931fefa424fb92d295f0ebJames Dong allocate the correct structure and shall fill in the structure size 893334de520b0369215b7931fefa424fb92d295f0ebJames Dong and version information (as well as the actual data) before invoking 894334de520b0369215b7931fefa424fb92d295f0ebJames Dong this macro. The application is free to dispose of this structure after 895334de520b0369215b7931fefa424fb92d295f0ebJames Dong the call as the component is required to copy any data it shall retain. 896334de520b0369215b7931fefa424fb92d295f0ebJames Dong This is a blocking call. 897334de520b0369215b7931fefa424fb92d295f0ebJames Dong 898334de520b0369215b7931fefa424fb92d295f0ebJames Dong The component should return from this call within 5 msec. 899334de520b0369215b7931fefa424fb92d295f0ebJames Dong 900334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] hComponent 901334de520b0369215b7931fefa424fb92d295f0ebJames Dong Handle of the component to be accessed. This is the component 902334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle returned by the call to the OMX_GetHandle function. 903334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] nConfigIndex 904334de520b0369215b7931fefa424fb92d295f0ebJames Dong Index of the structure to be sent. This value is from the 905334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_INDEXTYPE enumeration above. 906334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] pComponentConfigStructure 907334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to application allocated structure to be used for 908334de520b0369215b7931fefa424fb92d295f0ebJames Dong initialization by the component. 909334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 910334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 911334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 912334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup comp 913334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 914334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_SetConfig( \ 915334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 916334de520b0369215b7931fefa424fb92d295f0ebJames Dong nConfigIndex, \ 917334de520b0369215b7931fefa424fb92d295f0ebJames Dong pComponentConfigStructure) \ 918334de520b0369215b7931fefa424fb92d295f0ebJames Dong ((OMX_COMPONENTTYPE*)hComponent)->SetConfig( \ 919334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 920334de520b0369215b7931fefa424fb92d295f0ebJames Dong nConfigIndex, \ 921334de520b0369215b7931fefa424fb92d295f0ebJames Dong pComponentConfigStructure) /* Macro End */ 922334de520b0369215b7931fefa424fb92d295f0ebJames Dong 923334de520b0369215b7931fefa424fb92d295f0ebJames Dong 924334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_GetExtensionIndex macro will invoke a component to translate 925334de520b0369215b7931fefa424fb92d295f0ebJames Dong a vendor specific configuration or parameter string into an OMX 926334de520b0369215b7931fefa424fb92d295f0ebJames Dong structure index. There is no requirement for the vendor to support 927334de520b0369215b7931fefa424fb92d295f0ebJames Dong this command for the indexes already found in the OMX_INDEXTYPE 928334de520b0369215b7931fefa424fb92d295f0ebJames Dong enumeration (this is done to save space in small components). The 929334de520b0369215b7931fefa424fb92d295f0ebJames Dong component shall support all vendor supplied extension indexes not found 930334de520b0369215b7931fefa424fb92d295f0ebJames Dong in the master OMX_INDEXTYPE enumeration. This is a blocking call. 931334de520b0369215b7931fefa424fb92d295f0ebJames Dong 932334de520b0369215b7931fefa424fb92d295f0ebJames Dong The component should return from this call within 5 msec. 933334de520b0369215b7931fefa424fb92d295f0ebJames Dong 934334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] hComponent 935334de520b0369215b7931fefa424fb92d295f0ebJames Dong Handle of the component to be accessed. This is the component 936334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle returned by the call to the GetHandle function. 937334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] cParameterName 938334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_STRING that shall be less than 128 characters long including 939334de520b0369215b7931fefa424fb92d295f0ebJames Dong the trailing null byte. This is the string that will get 940334de520b0369215b7931fefa424fb92d295f0ebJames Dong translated by the component into a configuration index. 941334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [out] pIndexType 942334de520b0369215b7931fefa424fb92d295f0ebJames Dong a pointer to a OMX_INDEXTYPE to receive the index value. 943334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 944334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 945334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 946334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup comp 947334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 948334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_GetExtensionIndex( \ 949334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 950334de520b0369215b7931fefa424fb92d295f0ebJames Dong cParameterName, \ 951334de520b0369215b7931fefa424fb92d295f0ebJames Dong pIndexType) \ 952334de520b0369215b7931fefa424fb92d295f0ebJames Dong ((OMX_COMPONENTTYPE*)hComponent)->GetExtensionIndex( \ 953334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 954334de520b0369215b7931fefa424fb92d295f0ebJames Dong cParameterName, \ 955334de520b0369215b7931fefa424fb92d295f0ebJames Dong pIndexType) /* Macro End */ 956334de520b0369215b7931fefa424fb92d295f0ebJames Dong 957334de520b0369215b7931fefa424fb92d295f0ebJames Dong 958334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_GetState macro will invoke the component to get the current 959334de520b0369215b7931fefa424fb92d295f0ebJames Dong state of the component and place the state value into the location 960334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointed to by pState. 961334de520b0369215b7931fefa424fb92d295f0ebJames Dong 962334de520b0369215b7931fefa424fb92d295f0ebJames Dong The component should return from this call within 5 msec. 963334de520b0369215b7931fefa424fb92d295f0ebJames Dong 964334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] hComponent 965334de520b0369215b7931fefa424fb92d295f0ebJames Dong Handle of the component to be accessed. This is the component 966334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle returned by the call to the OMX_GetHandle function. 967334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [out] pState 968334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to the location to receive the state. The value returned 969334de520b0369215b7931fefa424fb92d295f0ebJames Dong is one of the OMX_STATETYPE members 970334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 971334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 972334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 973334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup comp 974334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 975334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_GetState( \ 976334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 977334de520b0369215b7931fefa424fb92d295f0ebJames Dong pState) \ 978334de520b0369215b7931fefa424fb92d295f0ebJames Dong ((OMX_COMPONENTTYPE*)hComponent)->GetState( \ 979334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 980334de520b0369215b7931fefa424fb92d295f0ebJames Dong pState) /* Macro End */ 981334de520b0369215b7931fefa424fb92d295f0ebJames Dong 982334de520b0369215b7931fefa424fb92d295f0ebJames Dong 983334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_UseBuffer macro will request that the component use 984334de520b0369215b7931fefa424fb92d295f0ebJames Dong a buffer (and allocate its own buffer header) already allocated 985334de520b0369215b7931fefa424fb92d295f0ebJames Dong by another component, or by the IL Client. This is a blocking 986334de520b0369215b7931fefa424fb92d295f0ebJames Dong call. 987334de520b0369215b7931fefa424fb92d295f0ebJames Dong 988334de520b0369215b7931fefa424fb92d295f0ebJames Dong The component should return from this call within 20 msec. 989334de520b0369215b7931fefa424fb92d295f0ebJames Dong 990334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] hComponent 991334de520b0369215b7931fefa424fb92d295f0ebJames Dong Handle of the component to be accessed. This is the component 992334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle returned by the call to the OMX_GetHandle function. 993334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [out] ppBuffer 994334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to an OMX_BUFFERHEADERTYPE structure used to receive the 995334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to the buffer header 996334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 997334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 998334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 999334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup comp buf 1000334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 1001334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1002334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_UseBuffer( \ 1003334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 1004334de520b0369215b7931fefa424fb92d295f0ebJames Dong ppBufferHdr, \ 1005334de520b0369215b7931fefa424fb92d295f0ebJames Dong nPortIndex, \ 1006334de520b0369215b7931fefa424fb92d295f0ebJames Dong pAppPrivate, \ 1007334de520b0369215b7931fefa424fb92d295f0ebJames Dong nSizeBytes, \ 1008334de520b0369215b7931fefa424fb92d295f0ebJames Dong pBuffer) \ 1009334de520b0369215b7931fefa424fb92d295f0ebJames Dong ((OMX_COMPONENTTYPE*)hComponent)->UseBuffer( \ 1010334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 1011334de520b0369215b7931fefa424fb92d295f0ebJames Dong ppBufferHdr, \ 1012334de520b0369215b7931fefa424fb92d295f0ebJames Dong nPortIndex, \ 1013334de520b0369215b7931fefa424fb92d295f0ebJames Dong pAppPrivate, \ 1014334de520b0369215b7931fefa424fb92d295f0ebJames Dong nSizeBytes, \ 1015334de520b0369215b7931fefa424fb92d295f0ebJames Dong pBuffer) 1016334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1017334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1018334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_AllocateBuffer macro will request that the component allocate 1019334de520b0369215b7931fefa424fb92d295f0ebJames Dong a new buffer and buffer header. The component will allocate the 1020334de520b0369215b7931fefa424fb92d295f0ebJames Dong buffer and the buffer header and return a pointer to the buffer 1021334de520b0369215b7931fefa424fb92d295f0ebJames Dong header. This is a blocking call. 1022334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1023334de520b0369215b7931fefa424fb92d295f0ebJames Dong The component should return from this call within 5 msec. 1024334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1025334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] hComponent 1026334de520b0369215b7931fefa424fb92d295f0ebJames Dong Handle of the component to be accessed. This is the component 1027334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle returned by the call to the OMX_GetHandle function. 1028334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [out] ppBuffer 1029334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to an OMX_BUFFERHEADERTYPE structure used to receive 1030334de520b0369215b7931fefa424fb92d295f0ebJames Dong the pointer to the buffer header 1031334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] nPortIndex 1032334de520b0369215b7931fefa424fb92d295f0ebJames Dong nPortIndex is used to select the port on the component the buffer will 1033334de520b0369215b7931fefa424fb92d295f0ebJames Dong be used with. The port can be found by using the nPortIndex 1034334de520b0369215b7931fefa424fb92d295f0ebJames Dong value as an index into the Port Definition array of the component. 1035334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] pAppPrivate 1036334de520b0369215b7931fefa424fb92d295f0ebJames Dong pAppPrivate is used to initialize the pAppPrivate member of the 1037334de520b0369215b7931fefa424fb92d295f0ebJames Dong buffer header structure. 1038334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] nSizeBytes 1039334de520b0369215b7931fefa424fb92d295f0ebJames Dong size of the buffer to allocate. Used when bAllocateNew is true. 1040334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 1041334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 1042334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1043334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup comp buf 1044334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 1045334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_AllocateBuffer( \ 1046334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 1047334de520b0369215b7931fefa424fb92d295f0ebJames Dong ppBuffer, \ 1048334de520b0369215b7931fefa424fb92d295f0ebJames Dong nPortIndex, \ 1049334de520b0369215b7931fefa424fb92d295f0ebJames Dong pAppPrivate, \ 1050334de520b0369215b7931fefa424fb92d295f0ebJames Dong nSizeBytes) \ 1051334de520b0369215b7931fefa424fb92d295f0ebJames Dong ((OMX_COMPONENTTYPE*)hComponent)->AllocateBuffer( \ 1052334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 1053334de520b0369215b7931fefa424fb92d295f0ebJames Dong ppBuffer, \ 1054334de520b0369215b7931fefa424fb92d295f0ebJames Dong nPortIndex, \ 1055334de520b0369215b7931fefa424fb92d295f0ebJames Dong pAppPrivate, \ 1056334de520b0369215b7931fefa424fb92d295f0ebJames Dong nSizeBytes) /* Macro End */ 1057334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1058334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1059334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_FreeBuffer macro will release a buffer header from the component 1060334de520b0369215b7931fefa424fb92d295f0ebJames Dong which was allocated using either OMX_AllocateBuffer or OMX_UseBuffer. If 1061334de520b0369215b7931fefa424fb92d295f0ebJames Dong the component allocated the buffer (see the OMX_UseBuffer macro) then 1062334de520b0369215b7931fefa424fb92d295f0ebJames Dong the component shall free the buffer and buffer header. This is a 1063334de520b0369215b7931fefa424fb92d295f0ebJames Dong blocking call. 1064334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1065334de520b0369215b7931fefa424fb92d295f0ebJames Dong The component should return from this call within 20 msec. 1066334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1067334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] hComponent 1068334de520b0369215b7931fefa424fb92d295f0ebJames Dong Handle of the component to be accessed. This is the component 1069334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle returned by the call to the OMX_GetHandle function. 1070334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] nPortIndex 1071334de520b0369215b7931fefa424fb92d295f0ebJames Dong nPortIndex is used to select the port on the component the buffer will 1072334de520b0369215b7931fefa424fb92d295f0ebJames Dong be used with. 1073334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] pBuffer 1074334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer 1075334de520b0369215b7931fefa424fb92d295f0ebJames Dong or AllocateBuffer. 1076334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 1077334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 1078334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1079334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup comp buf 1080334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 1081334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_FreeBuffer( \ 1082334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 1083334de520b0369215b7931fefa424fb92d295f0ebJames Dong nPortIndex, \ 1084334de520b0369215b7931fefa424fb92d295f0ebJames Dong pBuffer) \ 1085334de520b0369215b7931fefa424fb92d295f0ebJames Dong ((OMX_COMPONENTTYPE*)hComponent)->FreeBuffer( \ 1086334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 1087334de520b0369215b7931fefa424fb92d295f0ebJames Dong nPortIndex, \ 1088334de520b0369215b7931fefa424fb92d295f0ebJames Dong pBuffer) /* Macro End */ 1089334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1090334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1091334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_EmptyThisBuffer macro will send a buffer full of data to an 1092334de520b0369215b7931fefa424fb92d295f0ebJames Dong input port of a component. The buffer will be emptied by the component 1093334de520b0369215b7931fefa424fb92d295f0ebJames Dong and returned to the application via the EmptyBufferDone call back. 1094334de520b0369215b7931fefa424fb92d295f0ebJames Dong This is a non-blocking call in that the component will record the buffer 1095334de520b0369215b7931fefa424fb92d295f0ebJames Dong and return immediately and then empty the buffer, later, at the proper 1096334de520b0369215b7931fefa424fb92d295f0ebJames Dong time. As expected, this macro may be invoked only while the component 1097334de520b0369215b7931fefa424fb92d295f0ebJames Dong is in the OMX_StateExecuting. If nPortIndex does not specify an input 1098334de520b0369215b7931fefa424fb92d295f0ebJames Dong port, the component shall return an error. 1099334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1100334de520b0369215b7931fefa424fb92d295f0ebJames Dong The component should return from this call within 5 msec. 1101334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1102334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] hComponent 1103334de520b0369215b7931fefa424fb92d295f0ebJames Dong Handle of the component to be accessed. This is the component 1104334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle returned by the call to the OMX_GetHandle function. 1105334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] pBuffer 1106334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer 1107334de520b0369215b7931fefa424fb92d295f0ebJames Dong or AllocateBuffer. 1108334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 1109334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 1110334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1111334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup comp buf 1112334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 1113334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_EmptyThisBuffer( \ 1114334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 1115334de520b0369215b7931fefa424fb92d295f0ebJames Dong pBuffer) \ 1116334de520b0369215b7931fefa424fb92d295f0ebJames Dong ((OMX_COMPONENTTYPE*)hComponent)->EmptyThisBuffer( \ 1117334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 1118334de520b0369215b7931fefa424fb92d295f0ebJames Dong pBuffer) /* Macro End */ 1119334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1120334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1121334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_FillThisBuffer macro will send an empty buffer to an 1122334de520b0369215b7931fefa424fb92d295f0ebJames Dong output port of a component. The buffer will be filled by the component 1123334de520b0369215b7931fefa424fb92d295f0ebJames Dong and returned to the application via the FillBufferDone call back. 1124334de520b0369215b7931fefa424fb92d295f0ebJames Dong This is a non-blocking call in that the component will record the buffer 1125334de520b0369215b7931fefa424fb92d295f0ebJames Dong and return immediately and then fill the buffer, later, at the proper 1126334de520b0369215b7931fefa424fb92d295f0ebJames Dong time. As expected, this macro may be invoked only while the component 1127334de520b0369215b7931fefa424fb92d295f0ebJames Dong is in the OMX_ExecutingState. If nPortIndex does not specify an output 1128334de520b0369215b7931fefa424fb92d295f0ebJames Dong port, the component shall return an error. 1129334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1130334de520b0369215b7931fefa424fb92d295f0ebJames Dong The component should return from this call within 5 msec. 1131334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1132334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] hComponent 1133334de520b0369215b7931fefa424fb92d295f0ebJames Dong Handle of the component to be accessed. This is the component 1134334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle returned by the call to the OMX_GetHandle function. 1135334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] pBuffer 1136334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer 1137334de520b0369215b7931fefa424fb92d295f0ebJames Dong or AllocateBuffer. 1138334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 1139334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 1140334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1141334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup comp buf 1142334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 1143334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_FillThisBuffer( \ 1144334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 1145334de520b0369215b7931fefa424fb92d295f0ebJames Dong pBuffer) \ 1146334de520b0369215b7931fefa424fb92d295f0ebJames Dong ((OMX_COMPONENTTYPE*)hComponent)->FillThisBuffer( \ 1147334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 1148334de520b0369215b7931fefa424fb92d295f0ebJames Dong pBuffer) /* Macro End */ 1149334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1150334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1151334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1152334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_UseEGLImage macro will request that the component use 1153334de520b0369215b7931fefa424fb92d295f0ebJames Dong a EGLImage provided by EGL (and allocate its own buffer header) 1154334de520b0369215b7931fefa424fb92d295f0ebJames Dong This is a blocking call. 1155334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1156334de520b0369215b7931fefa424fb92d295f0ebJames Dong The component should return from this call within 20 msec. 1157334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1158334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] hComponent 1159334de520b0369215b7931fefa424fb92d295f0ebJames Dong Handle of the component to be accessed. This is the component 1160334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle returned by the call to the OMX_GetHandle function. 1161334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [out] ppBuffer 1162334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to an OMX_BUFFERHEADERTYPE structure used to receive the 1163334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to the buffer header. Note that the memory location used 1164334de520b0369215b7931fefa424fb92d295f0ebJames Dong for this buffer is NOT visible to the IL Client. 1165334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] nPortIndex 1166334de520b0369215b7931fefa424fb92d295f0ebJames Dong nPortIndex is used to select the port on the component the buffer will 1167334de520b0369215b7931fefa424fb92d295f0ebJames Dong be used with. The port can be found by using the nPortIndex 1168334de520b0369215b7931fefa424fb92d295f0ebJames Dong value as an index into the Port Definition array of the component. 1169334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] pAppPrivate 1170334de520b0369215b7931fefa424fb92d295f0ebJames Dong pAppPrivate is used to initialize the pAppPrivate member of the 1171334de520b0369215b7931fefa424fb92d295f0ebJames Dong buffer header structure. 1172334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] eglImage 1173334de520b0369215b7931fefa424fb92d295f0ebJames Dong eglImage contains the handle of the EGLImage to use as a buffer on the 1174334de520b0369215b7931fefa424fb92d295f0ebJames Dong specified port. The component is expected to validate properties of 1175334de520b0369215b7931fefa424fb92d295f0ebJames Dong the EGLImage against the configuration of the port to ensure the component 1176334de520b0369215b7931fefa424fb92d295f0ebJames Dong can use the EGLImage as a buffer. 1177334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 1178334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 1179334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1180334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup comp buf 1181334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 1182334de520b0369215b7931fefa424fb92d295f0ebJames Dong#define OMX_UseEGLImage( \ 1183334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 1184334de520b0369215b7931fefa424fb92d295f0ebJames Dong ppBufferHdr, \ 1185334de520b0369215b7931fefa424fb92d295f0ebJames Dong nPortIndex, \ 1186334de520b0369215b7931fefa424fb92d295f0ebJames Dong pAppPrivate, \ 1187334de520b0369215b7931fefa424fb92d295f0ebJames Dong eglImage) \ 1188334de520b0369215b7931fefa424fb92d295f0ebJames Dong ((OMX_COMPONENTTYPE*)hComponent)->UseEGLImage( \ 1189334de520b0369215b7931fefa424fb92d295f0ebJames Dong hComponent, \ 1190334de520b0369215b7931fefa424fb92d295f0ebJames Dong ppBufferHdr, \ 1191334de520b0369215b7931fefa424fb92d295f0ebJames Dong nPortIndex, \ 1192334de520b0369215b7931fefa424fb92d295f0ebJames Dong pAppPrivate, \ 1193334de520b0369215b7931fefa424fb92d295f0ebJames Dong eglImage) 1194334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1195334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_Init method is used to initialize the OMX core. It shall be the 1196334de520b0369215b7931fefa424fb92d295f0ebJames Dong first call made into OMX and it should only be executed one time without 1197334de520b0369215b7931fefa424fb92d295f0ebJames Dong an interviening OMX_Deinit call. 1198334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1199334de520b0369215b7931fefa424fb92d295f0ebJames Dong The core should return from this call within 20 msec. 1200334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1201334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 1202334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 1203334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1204334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup core 1205334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 1206334de520b0369215b7931fefa424fb92d295f0ebJames DongOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Init(void); 1207334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1208334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1209334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_Deinit method is used to deinitialize the OMX core. It shall be 1210334de520b0369215b7931fefa424fb92d295f0ebJames Dong the last call made into OMX. In the event that the core determines that 1211334de520b0369215b7931fefa424fb92d295f0ebJames Dong thare are components loaded when this call is made, the core may return 1212334de520b0369215b7931fefa424fb92d295f0ebJames Dong with an error rather than try to unload the components. 1213334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1214334de520b0369215b7931fefa424fb92d295f0ebJames Dong The core should return from this call within 20 msec. 1215334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1216334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 1217334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 1218334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1219334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup core 1220334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 1221334de520b0369215b7931fefa424fb92d295f0ebJames DongOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Deinit(void); 1222334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1223334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1224334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_ComponentNameEnum method will enumerate through all the names of 1225334de520b0369215b7931fefa424fb92d295f0ebJames Dong recognised valid components in the system. This function is provided 1226334de520b0369215b7931fefa424fb92d295f0ebJames Dong as a means to detect all the components in the system run-time. There is 1227334de520b0369215b7931fefa424fb92d295f0ebJames Dong no strict ordering to the enumeration order of component names, although 1228334de520b0369215b7931fefa424fb92d295f0ebJames Dong each name will only be enumerated once. If the OMX core supports run-time 1229334de520b0369215b7931fefa424fb92d295f0ebJames Dong installation of new components, it is only requried to detect newly 1230334de520b0369215b7931fefa424fb92d295f0ebJames Dong installed components when the first call to enumerate component names 1231334de520b0369215b7931fefa424fb92d295f0ebJames Dong is made (i.e. when nIndex is 0x0). 1232334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1233334de520b0369215b7931fefa424fb92d295f0ebJames Dong The core should return from this call in 20 msec. 1234334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1235334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [out] cComponentName 1236334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to a null terminated string with the component name. The 1237334de520b0369215b7931fefa424fb92d295f0ebJames Dong names of the components are strings less than 127 bytes in length 1238334de520b0369215b7931fefa424fb92d295f0ebJames Dong plus the trailing null for a maximum size of 128 bytes. An example 1239334de520b0369215b7931fefa424fb92d295f0ebJames Dong of a valid component name is "OMX.TI.AUDIO.DSP.MIXER\0". Names are 1240334de520b0369215b7931fefa424fb92d295f0ebJames Dong assigned by the vendor, but shall start with "OMX." and then have 1241334de520b0369215b7931fefa424fb92d295f0ebJames Dong the Vendor designation next. 1242334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] nNameLength 1243334de520b0369215b7931fefa424fb92d295f0ebJames Dong number of characters in the cComponentName string. With all 1244334de520b0369215b7931fefa424fb92d295f0ebJames Dong component name strings restricted to less than 128 characters 1245334de520b0369215b7931fefa424fb92d295f0ebJames Dong (including the trailing null) it is recomended that the caller 1246334de520b0369215b7931fefa424fb92d295f0ebJames Dong provide a input string for the cComponentName of 128 characters. 1247334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] nIndex 1248334de520b0369215b7931fefa424fb92d295f0ebJames Dong number containing the enumeration index for the component. 1249334de520b0369215b7931fefa424fb92d295f0ebJames Dong Multiple calls to OMX_ComponentNameEnum with increasing values 1250334de520b0369215b7931fefa424fb92d295f0ebJames Dong of nIndex will enumerate through the component names in the 1251334de520b0369215b7931fefa424fb92d295f0ebJames Dong system until OMX_ErrorNoMore is returned. The value of nIndex 1252334de520b0369215b7931fefa424fb92d295f0ebJames Dong is 0 to (N-1), where N is the number of valid installed components 1253334de520b0369215b7931fefa424fb92d295f0ebJames Dong in the system. 1254334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 1255334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 1256334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. When the value of nIndex exceeds the number of 1257334de520b0369215b7931fefa424fb92d295f0ebJames Dong components in the system minus 1, OMX_ErrorNoMore will be 1258334de520b0369215b7931fefa424fb92d295f0ebJames Dong returned. Otherwise the appropriate OMX error will be returned. 1259334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup core 1260334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 1261334de520b0369215b7931fefa424fb92d295f0ebJames DongOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_ComponentNameEnum( 1262334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_OUT OMX_STRING cComponentName, 1263334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_U32 nNameLength, 1264334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_U32 nIndex); 1265334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1266334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1267334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_GetHandle method will locate the component specified by the 1268334de520b0369215b7931fefa424fb92d295f0ebJames Dong component name given, load that component into memory and then invoke 1269334de520b0369215b7931fefa424fb92d295f0ebJames Dong the component's methods to create an instance of the component. 1270334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1271334de520b0369215b7931fefa424fb92d295f0ebJames Dong The core should return from this call within 20 msec. 1272334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1273334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [out] pHandle 1274334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to an OMX_HANDLETYPE pointer to be filled in by this method. 1275334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] cComponentName 1276334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to a null terminated string with the component name. The 1277334de520b0369215b7931fefa424fb92d295f0ebJames Dong names of the components are strings less than 127 bytes in length 1278334de520b0369215b7931fefa424fb92d295f0ebJames Dong plus the trailing null for a maximum size of 128 bytes. An example 1279334de520b0369215b7931fefa424fb92d295f0ebJames Dong of a valid component name is "OMX.TI.AUDIO.DSP.MIXER\0". Names are 1280334de520b0369215b7931fefa424fb92d295f0ebJames Dong assigned by the vendor, but shall start with "OMX." and then have 1281334de520b0369215b7931fefa424fb92d295f0ebJames Dong the Vendor designation next. 1282334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] pAppData 1283334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to an application defined value that will be returned 1284334de520b0369215b7931fefa424fb92d295f0ebJames Dong during callbacks so that the application can identify the source 1285334de520b0369215b7931fefa424fb92d295f0ebJames Dong of the callback. 1286334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] pCallBacks 1287334de520b0369215b7931fefa424fb92d295f0ebJames Dong pointer to a OMX_CALLBACKTYPE structure that will be passed to the 1288334de520b0369215b7931fefa424fb92d295f0ebJames Dong component to initialize it with. 1289334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 1290334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 1291334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1292334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup core 1293334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 1294334de520b0369215b7931fefa424fb92d295f0ebJames DongOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_GetHandle( 1295334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_OUT OMX_HANDLETYPE* pHandle, 1296334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_STRING cComponentName, 1297334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_PTR pAppData, 1298334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_CALLBACKTYPE* pCallBacks); 1299334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1300334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1301334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_FreeHandle method will free a handle allocated by the OMX_GetHandle 1302334de520b0369215b7931fefa424fb92d295f0ebJames Dong method. If the component reference count goes to zero, the component will 1303334de520b0369215b7931fefa424fb92d295f0ebJames Dong be unloaded from memory. 1304334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1305334de520b0369215b7931fefa424fb92d295f0ebJames Dong The core should return from this call within 20 msec when the component is 1306334de520b0369215b7931fefa424fb92d295f0ebJames Dong in the OMX_StateLoaded state. 1307334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1308334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] hComponent 1309334de520b0369215b7931fefa424fb92d295f0ebJames Dong Handle of the component to be accessed. This is the component 1310334de520b0369215b7931fefa424fb92d295f0ebJames Dong handle returned by the call to the GetHandle function. 1311334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 1312334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 1313334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1314334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup core 1315334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 1316334de520b0369215b7931fefa424fb92d295f0ebJames DongOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_FreeHandle( 1317334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_HANDLETYPE hComponent); 1318334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1319334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1320334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1321334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_SetupTunnel method will handle the necessary calls to the components 1322334de520b0369215b7931fefa424fb92d295f0ebJames Dong to setup the specified tunnel the two components. NOTE: This is 1323334de520b0369215b7931fefa424fb92d295f0ebJames Dong an actual method (not a #define macro). This method will make calls into 1324334de520b0369215b7931fefa424fb92d295f0ebJames Dong the component ComponentTunnelRequest method to do the actual tunnel 1325334de520b0369215b7931fefa424fb92d295f0ebJames Dong connection. 1326334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1327334de520b0369215b7931fefa424fb92d295f0ebJames Dong The ComponentTunnelRequest method on both components will be called. 1328334de520b0369215b7931fefa424fb92d295f0ebJames Dong This method shall not be called unless the component is in the 1329334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_StateLoaded state except when the ports used for the tunnel are 1330334de520b0369215b7931fefa424fb92d295f0ebJames Dong disabled. In this case, the component may be in the OMX_StateExecuting, 1331334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_StatePause, or OMX_StateIdle states. 1332334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1333334de520b0369215b7931fefa424fb92d295f0ebJames Dong The core should return from this call within 20 msec. 1334334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1335334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] hOutput 1336334de520b0369215b7931fefa424fb92d295f0ebJames Dong Handle of the component to be accessed. Also this is the handle 1337334de520b0369215b7931fefa424fb92d295f0ebJames Dong of the component whose port, specified in the nPortOutput parameter 1338334de520b0369215b7931fefa424fb92d295f0ebJames Dong will be used the source for the tunnel. This is the component handle 1339334de520b0369215b7931fefa424fb92d295f0ebJames Dong returned by the call to the OMX_GetHandle function. There is a 1340334de520b0369215b7931fefa424fb92d295f0ebJames Dong requirement that hOutput be the source for the data when 1341334de520b0369215b7931fefa424fb92d295f0ebJames Dong tunelling (i.e. nPortOutput is an output port). If 0x0, the component 1342334de520b0369215b7931fefa424fb92d295f0ebJames Dong specified in hInput will have it's port specified in nPortInput 1343334de520b0369215b7931fefa424fb92d295f0ebJames Dong setup for communication with the application / IL client. 1344334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] nPortOutput 1345334de520b0369215b7931fefa424fb92d295f0ebJames Dong nPortOutput is used to select the source port on component to be 1346334de520b0369215b7931fefa424fb92d295f0ebJames Dong used in the tunnel. 1347334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] hInput 1348334de520b0369215b7931fefa424fb92d295f0ebJames Dong This is the component to setup the tunnel with. This is the handle 1349334de520b0369215b7931fefa424fb92d295f0ebJames Dong of the component whose port, specified in the nPortInput parameter 1350334de520b0369215b7931fefa424fb92d295f0ebJames Dong will be used the destination for the tunnel. This is the component handle 1351334de520b0369215b7931fefa424fb92d295f0ebJames Dong returned by the call to the OMX_GetHandle function. There is a 1352334de520b0369215b7931fefa424fb92d295f0ebJames Dong requirement that hInput be the destination for the data when 1353334de520b0369215b7931fefa424fb92d295f0ebJames Dong tunelling (i.e. nPortInut is an input port). If 0x0, the component 1354334de520b0369215b7931fefa424fb92d295f0ebJames Dong specified in hOutput will have it's port specified in nPortPOutput 1355334de520b0369215b7931fefa424fb92d295f0ebJames Dong setup for communication with the application / IL client. 1356334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] nPortInput 1357334de520b0369215b7931fefa424fb92d295f0ebJames Dong nPortInput is used to select the destination port on component to be 1358334de520b0369215b7931fefa424fb92d295f0ebJames Dong used in the tunnel. 1359334de520b0369215b7931fefa424fb92d295f0ebJames Dong @return OMX_ERRORTYPE 1360334de520b0369215b7931fefa424fb92d295f0ebJames Dong If the command successfully executes, the return code will be 1361334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. 1362334de520b0369215b7931fefa424fb92d295f0ebJames Dong When OMX_ErrorNotImplemented is returned, one or both components is 1363334de520b0369215b7931fefa424fb92d295f0ebJames Dong a non-interop component and does not support tunneling. 1364334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1365334de520b0369215b7931fefa424fb92d295f0ebJames Dong On failure, the ports of both components are setup for communication 1366334de520b0369215b7931fefa424fb92d295f0ebJames Dong with the application / IL Client. 1367334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup core tun 1368334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 1369334de520b0369215b7931fefa424fb92d295f0ebJames DongOMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_SetupTunnel( 1370334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_HANDLETYPE hOutput, 1371334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_U32 nPortOutput, 1372334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_HANDLETYPE hInput, 1373334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_U32 nPortInput); 1374334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1375334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** @ingroup cp */ 1376334de520b0369215b7931fefa424fb92d295f0ebJames DongOMX_API OMX_ERRORTYPE OMX_GetContentPipe( 1377334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_OUT OMX_HANDLETYPE *hPipe, 1378334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_STRING szURI); 1379334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1380334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_GetComponentsOfRole method will return the number of components that support the given 1381334de520b0369215b7931fefa424fb92d295f0ebJames Dong role and (if the compNames field is non-NULL) the names of those components. The call will fail if 1382334de520b0369215b7931fefa424fb92d295f0ebJames Dong an insufficiently sized array of names is supplied. To ensure the array is sufficiently sized the 1383334de520b0369215b7931fefa424fb92d295f0ebJames Dong client should: 1384334de520b0369215b7931fefa424fb92d295f0ebJames Dong * first call this function with the compNames field NULL to determine the number of component names 1385334de520b0369215b7931fefa424fb92d295f0ebJames Dong * second call this function with the compNames field pointing to an array of names allocated 1386334de520b0369215b7931fefa424fb92d295f0ebJames Dong according to the number returned by the first call. 1387334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1388334de520b0369215b7931fefa424fb92d295f0ebJames Dong The core should return from this call within 5 msec. 1389334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1390334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] role 1391334de520b0369215b7931fefa424fb92d295f0ebJames Dong This is generic standard component name consisting only of component class 1392334de520b0369215b7931fefa424fb92d295f0ebJames Dong name and the type within that class (e.g. 'audio_decoder.aac'). 1393334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [inout] pNumComps 1394334de520b0369215b7931fefa424fb92d295f0ebJames Dong This is used both as input and output. 1395334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1396334de520b0369215b7931fefa424fb92d295f0ebJames Dong If compNames is NULL, the input is ignored and the output specifies how many components support 1397334de520b0369215b7931fefa424fb92d295f0ebJames Dong the given role. 1398334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1399334de520b0369215b7931fefa424fb92d295f0ebJames Dong If compNames is not NULL, on input it bounds the size of the input structure and 1400334de520b0369215b7931fefa424fb92d295f0ebJames Dong on output, it specifies the number of components string names listed within the compNames parameter. 1401334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [inout] compNames 1402334de520b0369215b7931fefa424fb92d295f0ebJames Dong If NULL this field is ignored. If non-NULL this points to an array of 128-byte strings which accepts 1403334de520b0369215b7931fefa424fb92d295f0ebJames Dong a list of the names of all physical components that implement the specified standard component name. 1404334de520b0369215b7931fefa424fb92d295f0ebJames Dong Each name is NULL terminated. numComps indicates the number of names. 1405334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup core 1406334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 1407334de520b0369215b7931fefa424fb92d295f0ebJames DongOMX_API OMX_ERRORTYPE OMX_GetComponentsOfRole ( 1408334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_STRING role, 1409334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_INOUT OMX_U32 *pNumComps, 1410334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_INOUT OMX_U8 **compNames); 1411334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1412334de520b0369215b7931fefa424fb92d295f0ebJames Dong/** The OMX_GetRolesOfComponent method will return the number of roles supported by the given 1413334de520b0369215b7931fefa424fb92d295f0ebJames Dong component and (if the roles field is non-NULL) the names of those roles. The call will fail if 1414334de520b0369215b7931fefa424fb92d295f0ebJames Dong an insufficiently sized array of names is supplied. To ensure the array is sufficiently sized the 1415334de520b0369215b7931fefa424fb92d295f0ebJames Dong client should: 1416334de520b0369215b7931fefa424fb92d295f0ebJames Dong * first call this function with the roles field NULL to determine the number of role names 1417334de520b0369215b7931fefa424fb92d295f0ebJames Dong * second call this function with the roles field pointing to an array of names allocated 1418334de520b0369215b7931fefa424fb92d295f0ebJames Dong according to the number returned by the first call. 1419334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1420334de520b0369215b7931fefa424fb92d295f0ebJames Dong The core should return from this call within 5 msec. 1421334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1422334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [in] compName 1423334de520b0369215b7931fefa424fb92d295f0ebJames Dong This is the name of the component being queried about. 1424334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [inout] pNumRoles 1425334de520b0369215b7931fefa424fb92d295f0ebJames Dong This is used both as input and output. 1426334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1427334de520b0369215b7931fefa424fb92d295f0ebJames Dong If roles is NULL, the input is ignored and the output specifies how many roles the component supports. 1428334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1429334de520b0369215b7931fefa424fb92d295f0ebJames Dong If compNames is not NULL, on input it bounds the size of the input structure and 1430334de520b0369215b7931fefa424fb92d295f0ebJames Dong on output, it specifies the number of roles string names listed within the roles parameter. 1431334de520b0369215b7931fefa424fb92d295f0ebJames Dong @param [out] roles 1432334de520b0369215b7931fefa424fb92d295f0ebJames Dong If NULL this field is ignored. If non-NULL this points to an array of 128-byte strings 1433334de520b0369215b7931fefa424fb92d295f0ebJames Dong which accepts a list of the names of all standard components roles implemented on the 1434334de520b0369215b7931fefa424fb92d295f0ebJames Dong specified component name. numComps indicates the number of names. 1435334de520b0369215b7931fefa424fb92d295f0ebJames Dong @ingroup core 1436334de520b0369215b7931fefa424fb92d295f0ebJames Dong */ 1437334de520b0369215b7931fefa424fb92d295f0ebJames DongOMX_API OMX_ERRORTYPE OMX_GetRolesOfComponent ( 1438334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_IN OMX_STRING compName, 1439334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_INOUT OMX_U32 *pNumRoles, 1440334de520b0369215b7931fefa424fb92d295f0ebJames Dong OMX_OUT OMX_U8 **roles); 1441334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1442334de520b0369215b7931fefa424fb92d295f0ebJames Dong#ifdef __cplusplus 1443334de520b0369215b7931fefa424fb92d295f0ebJames Dong} 1444334de520b0369215b7931fefa424fb92d295f0ebJames Dong#endif /* __cplusplus */ 1445334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1446334de520b0369215b7931fefa424fb92d295f0ebJames Dong#endif 1447334de520b0369215b7931fefa424fb92d295f0ebJames Dong/* File EOF */ 1448334de520b0369215b7931fefa424fb92d295f0ebJames Dong 1449