OMX_Component.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  1. /* ------------------------------------------------------------------
  2. * Copyright (C) 1998-2009 PacketVideo
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  13. * express or implied.
  14. * See the License for the specific language governing permissions
  15. * and limitations under the License.
  16. * -------------------------------------------------------------------
  17. */
  18. /*
  19. * Copyright (c) 2008 The Khronos Group Inc.
  20. *
  21. * Permission is hereby granted, free of charge, to any person obtaining
  22. * a copy of this software and associated documentation files (the
  23. * "Software"), to deal in the Software without restriction, including
  24. * without limitation the rights to use, copy, modify, merge, publish,
  25. * distribute, sublicense, and/or sell copies of the Software, and to
  26. * permit persons to whom the Software is furnished to do so, subject
  27. * to the following conditions:
  28. * The above copyright notice and this permission notice shall be included
  29. * in all copies or substantial portions of the Software.
  30. *
  31. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  32. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  33. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  34. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  35. * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  36. * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  37. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  38. *
  39. */
  40. /** OMX_Component.h - OpenMax IL version 1.1.2
  41. * The OMX_Component header file contains the definitions used to define
  42. * the public interface of a component. This header file is intended to
  43. * be used by both the application and the component.
  44. */
  45. #ifndef OMX_Component_h
  46. #define OMX_Component_h
  47. #ifdef __cplusplus
  48. extern "C" {
  49. #endif /* __cplusplus */
  50. /* Each OMX header must include all required header files to allow the
  51. * header to compile without errors. The includes below are required
  52. * for this header file to compile successfully
  53. */
  54. #include <OMX_Audio.h>
  55. #include <OMX_Video.h>
  56. #include <OMX_Image.h>
  57. #include <OMX_Other.h>
  58. /** @ingroup comp */
  59. typedef enum OMX_PORTDOMAINTYPE {
  60. OMX_PortDomainAudio,
  61. OMX_PortDomainVideo,
  62. OMX_PortDomainImage,
  63. OMX_PortDomainOther,
  64. OMX_PortDomainKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  65. OMX_PortDomainVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  66. OMX_PortDomainMax = 0x7ffffff
  67. } OMX_PORTDOMAINTYPE;
  68. /** @ingroup comp */
  69. typedef struct OMX_PARAM_PORTDEFINITIONTYPE {
  70. OMX_U32 nSize; /**< Size of the structure in bytes */
  71. OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
  72. OMX_U32 nPortIndex; /**< Port number the structure applies to */
  73. OMX_DIRTYPE eDir; /**< Direction (input or output) of this port */
  74. OMX_U32 nBufferCountActual; /**< The actual number of buffers allocated on this port */
  75. OMX_U32 nBufferCountMin; /**< The minimum number of buffers this port requires */
  76. OMX_U32 nBufferSize; /**< Size, in bytes, for buffers to be used for this channel */
  77. OMX_BOOL bEnabled; /**< Ports default to enabled and are enabled/disabled by
  78. OMX_CommandPortEnable/OMX_CommandPortDisable.
  79. When disabled a port is unpopulated. A disabled port
  80. is not populated with buffers on a transition to IDLE. */
  81. OMX_BOOL bPopulated; /**< Port is populated with all of its buffers as indicated by
  82. nBufferCountActual. A disabled port is always unpopulated.
  83. An enabled port is populated on a transition to OMX_StateIdle
  84. and unpopulated on a transition to loaded. */
  85. OMX_PORTDOMAINTYPE eDomain; /**< Domain of the port. Determines the contents of metadata below. */
  86. union {
  87. OMX_AUDIO_PORTDEFINITIONTYPE audio;
  88. OMX_VIDEO_PORTDEFINITIONTYPE video;
  89. OMX_IMAGE_PORTDEFINITIONTYPE image;
  90. OMX_OTHER_PORTDEFINITIONTYPE other;
  91. } format;
  92. OMX_BOOL bBuffersContiguous;
  93. OMX_U32 nBufferAlignment;
  94. } OMX_PARAM_PORTDEFINITIONTYPE;
  95. /** @ingroup comp */
  96. typedef struct OMX_PARAM_U32TYPE {
  97. OMX_U32 nSize; /**< Size of this structure, in Bytes */
  98. OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
  99. OMX_U32 nPortIndex; /**< port that this structure applies to */
  100. OMX_U32 nU32; /**< U32 value */
  101. } OMX_PARAM_U32TYPE;
  102. /** @ingroup rpm */
  103. typedef enum OMX_SUSPENSIONPOLICYTYPE {
  104. OMX_SuspensionDisabled, /**< No suspension; v1.0 behavior */
  105. OMX_SuspensionEnabled, /**< Suspension allowed */
  106. OMX_SuspensionPolicyKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  107. OMX_SuspensionPolicyStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  108. OMX_SuspensionPolicyMax = 0x7fffffff
  109. } OMX_SUSPENSIONPOLICYTYPE;
  110. /** @ingroup rpm */
  111. typedef struct OMX_PARAM_SUSPENSIONPOLICYTYPE {
  112. OMX_U32 nSize;
  113. OMX_VERSIONTYPE nVersion;
  114. OMX_SUSPENSIONPOLICYTYPE ePolicy;
  115. } OMX_PARAM_SUSPENSIONPOLICYTYPE;
  116. /** @ingroup rpm */
  117. typedef enum OMX_SUSPENSIONTYPE {
  118. OMX_NotSuspended, /**< component is not suspended */
  119. OMX_Suspended, /**< component is suspended */
  120. OMX_SuspensionKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  121. OMX_SuspensionVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  122. OMX_SuspendMax = 0x7FFFFFFF
  123. } OMX_SUSPENSIONTYPE;
  124. /** @ingroup rpm */
  125. typedef struct OMX_PARAM_SUSPENSIONTYPE {
  126. OMX_U32 nSize;
  127. OMX_VERSIONTYPE nVersion;
  128. OMX_SUSPENSIONTYPE eType;
  129. } OMX_PARAM_SUSPENSIONTYPE ;
  130. typedef struct OMX_CONFIG_BOOLEANTYPE {
  131. OMX_U32 nSize;
  132. OMX_VERSIONTYPE nVersion;
  133. OMX_BOOL bEnabled;
  134. } OMX_CONFIG_BOOLEANTYPE;
  135. /* Parameter specifying the content uri to use. */
  136. /** @ingroup cp */
  137. typedef struct OMX_PARAM_CONTENTURITYPE
  138. {
  139. OMX_U32 nSize; /**< size of the structure in bytes, including
  140. actual URI name */
  141. OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
  142. OMX_U8 contentURI[1]; /**< The URI name */
  143. } OMX_PARAM_CONTENTURITYPE;
  144. /* Parameter specifying the pipe to use. */
  145. /** @ingroup cp */
  146. typedef struct OMX_PARAM_CONTENTPIPETYPE
  147. {
  148. OMX_U32 nSize; /**< size of the structure in bytes */
  149. OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
  150. OMX_HANDLETYPE hPipe; /**< The pipe handle*/
  151. } OMX_PARAM_CONTENTPIPETYPE;
  152. /** @ingroup rpm */
  153. typedef struct OMX_RESOURCECONCEALMENTTYPE {
  154. OMX_U32 nSize; /**< size of the structure in bytes */
  155. OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
  156. OMX_BOOL bResourceConcealmentForbidden; /**< disallow the use of resource concealment
  157. methods (like degrading algorithm quality to
  158. lower resource consumption or functional bypass)
  159. on a component as a resolution to resource conflicts. */
  160. } OMX_RESOURCECONCEALMENTTYPE;
  161. /** @ingroup metadata */
  162. typedef enum OMX_METADATACHARSETTYPE {
  163. OMX_MetadataCharsetUnknown = 0,
  164. OMX_MetadataCharsetASCII,
  165. OMX_MetadataCharsetBinary,
  166. OMX_MetadataCharsetCodePage1252,
  167. OMX_MetadataCharsetUTF8,
  168. OMX_MetadataCharsetJavaConformantUTF8,
  169. OMX_MetadataCharsetUTF7,
  170. OMX_MetadataCharsetImapUTF7,
  171. OMX_MetadataCharsetUTF16LE,
  172. OMX_MetadataCharsetUTF16BE,
  173. OMX_MetadataCharsetGB12345,
  174. OMX_MetadataCharsetHZGB2312,
  175. OMX_MetadataCharsetGB2312,
  176. OMX_MetadataCharsetGB18030,
  177. OMX_MetadataCharsetGBK,
  178. OMX_MetadataCharsetBig5,
  179. OMX_MetadataCharsetISO88591,
  180. OMX_MetadataCharsetISO88592,
  181. OMX_MetadataCharsetISO88593,
  182. OMX_MetadataCharsetISO88594,
  183. OMX_MetadataCharsetISO88595,
  184. OMX_MetadataCharsetISO88596,
  185. OMX_MetadataCharsetISO88597,
  186. OMX_MetadataCharsetISO88598,
  187. OMX_MetadataCharsetISO88599,
  188. OMX_MetadataCharsetISO885910,
  189. OMX_MetadataCharsetISO885913,
  190. OMX_MetadataCharsetISO885914,
  191. OMX_MetadataCharsetISO885915,
  192. OMX_MetadataCharsetShiftJIS,
  193. OMX_MetadataCharsetISO2022JP,
  194. OMX_MetadataCharsetISO2022JP1,
  195. OMX_MetadataCharsetISOEUCJP,
  196. OMX_MetadataCharsetSMS7Bit,
  197. OMX_MetadataCharsetKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  198. OMX_MetadataCharsetVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  199. OMX_MetadataCharsetTypeMax= 0x7FFFFFFF
  200. } OMX_METADATACHARSETTYPE;
  201. /** @ingroup metadata */
  202. typedef enum OMX_METADATASCOPETYPE
  203. {
  204. OMX_MetadataScopeAllLevels,
  205. OMX_MetadataScopeTopLevel,
  206. OMX_MetadataScopePortLevel,
  207. OMX_MetadataScopeNodeLevel,
  208. OMX_MetadataScopeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  209. OMX_MetadataScopeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  210. OMX_MetadataScopeTypeMax = 0x7fffffff
  211. } OMX_METADATASCOPETYPE;
  212. /** @ingroup metadata */
  213. typedef enum OMX_METADATASEARCHMODETYPE
  214. {
  215. OMX_MetadataSearchValueSizeByIndex,
  216. OMX_MetadataSearchItemByIndex,
  217. OMX_MetadataSearchNextItemByKey,
  218. OMX_MetadataSearchKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  219. OMX_MetadataSearchVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  220. OMX_MetadataSearchTypeMax = 0x7fffffff
  221. } OMX_METADATASEARCHMODETYPE;
  222. /** @ingroup metadata */
  223. typedef struct OMX_CONFIG_METADATAITEMCOUNTTYPE
  224. {
  225. OMX_U32 nSize;
  226. OMX_VERSIONTYPE nVersion;
  227. OMX_METADATASCOPETYPE eScopeMode;
  228. OMX_U32 nScopeSpecifier;
  229. OMX_U32 nMetadataItemCount;
  230. } OMX_CONFIG_METADATAITEMCOUNTTYPE;
  231. /** @ingroup metadata */
  232. typedef struct OMX_CONFIG_METADATAITEMTYPE
  233. {
  234. OMX_U32 nSize;
  235. OMX_VERSIONTYPE nVersion;
  236. OMX_METADATASCOPETYPE eScopeMode;
  237. OMX_U32 nScopeSpecifier;
  238. OMX_U32 nMetadataItemIndex;
  239. OMX_METADATASEARCHMODETYPE eSearchMode;
  240. OMX_METADATACHARSETTYPE eKeyCharset;
  241. OMX_U8 nKeySizeUsed;
  242. OMX_U8 nKey[128];
  243. OMX_METADATACHARSETTYPE eValueCharset;
  244. OMX_STRING sLanguageCountry;
  245. OMX_U32 nValueMaxSize;
  246. OMX_U32 nValueSizeUsed;
  247. OMX_U8 nValue[1];
  248. } OMX_CONFIG_METADATAITEMTYPE;
  249. /* @ingroup metadata */
  250. typedef struct OMX_CONFIG_CONTAINERNODECOUNTTYPE
  251. {
  252. OMX_U32 nSize;
  253. OMX_VERSIONTYPE nVersion;
  254. OMX_BOOL bAllKeys;
  255. OMX_U32 nParentNodeID;
  256. OMX_U32 nNumNodes;
  257. } OMX_CONFIG_CONTAINERNODECOUNTTYPE;
  258. /** @ingroup metadata */
  259. typedef struct OMX_CONFIG_CONTAINERNODEIDTYPE
  260. {
  261. OMX_U32 nSize;
  262. OMX_VERSIONTYPE nVersion;
  263. OMX_BOOL bAllKeys;
  264. OMX_U32 nParentNodeID;
  265. OMX_U32 nNodeIndex;
  266. OMX_U32 nNodeID;
  267. OMX_STRING cNodeName;
  268. OMX_BOOL bIsLeafType;
  269. } OMX_CONFIG_CONTAINERNODEIDTYPE;
  270. /** @ingroup metadata */
  271. typedef struct OMX_PARAM_METADATAFILTERTYPE
  272. {
  273. OMX_U32 nSize;
  274. OMX_VERSIONTYPE nVersion;
  275. OMX_BOOL bAllKeys; /* if true then this structure refers to all keys and
  276. * the three key fields below are ignored */
  277. OMX_METADATACHARSETTYPE eKeyCharset;
  278. OMX_U32 nKeySizeUsed;
  279. OMX_U8 nKey [128];
  280. OMX_U32 nLanguageCountrySizeUsed;
  281. OMX_U8 nLanguageCountry[128];
  282. OMX_BOOL bEnabled; /* if true then key is part of filter (e.g.
  283. * retained for query later). If false then
  284. * key is not part of filter */
  285. } OMX_PARAM_METADATAFILTERTYPE;
  286. /** The OMX_HANDLETYPE structure defines the component handle. The component
  287. * handle is used to access all of the component's public methods and also
  288. * contains pointers to the component's private data area. The component
  289. * handle is initialized by the OMX core (with help from the component)
  290. * during the process of loading the component. After the component is
  291. * successfully loaded, the application can safely access any of the
  292. * component's public functions (although some may return an error because
  293. * the state is inappropriate for the access).
  294. *
  295. * @ingroup comp
  296. */
  297. typedef struct OMX_COMPONENTTYPE
  298. {
  299. /** The size of this structure, in bytes. It is the responsibility
  300. of the allocator of this structure to fill in this value. Since
  301. this structure is allocated by the GetHandle function, this
  302. function will fill in this value. */
  303. OMX_U32 nSize;
  304. /** nVersion is the version of the OMX specification that the structure
  305. is built against. It is the responsibility of the creator of this
  306. structure to initialize this value and every user of this structure
  307. should verify that it knows how to use the exact version of
  308. this structure found herein. */
  309. OMX_VERSIONTYPE nVersion;
  310. /** pComponentPrivate is a pointer to the component private data area.
  311. This member is allocated and initialized by the component when the
  312. component is first loaded. The application should not access this
  313. data area. */
  314. OMX_PTR pComponentPrivate;
  315. /** pApplicationPrivate is a pointer that is a parameter to the
  316. OMX_GetHandle method, and contains an application private value
  317. provided by the IL client. This application private data is
  318. returned to the IL Client by OMX in all callbacks */
  319. OMX_PTR pApplicationPrivate;
  320. /** refer to OMX_GetComponentVersion in OMX_core.h or the OMX IL
  321. specification for details on the GetComponentVersion method.
  322. */
  323. OMX_ERRORTYPE (*GetComponentVersion)(
  324. OMX_IN OMX_HANDLETYPE hComponent,
  325. OMX_OUT OMX_STRING pComponentName,
  326. OMX_OUT OMX_VERSIONTYPE* pComponentVersion,
  327. OMX_OUT OMX_VERSIONTYPE* pSpecVersion,
  328. OMX_OUT OMX_UUIDTYPE* pComponentUUID);
  329. /** refer to OMX_SendCommand in OMX_core.h or the OMX IL
  330. specification for details on the SendCommand method.
  331. */
  332. OMX_ERRORTYPE (*SendCommand)(
  333. OMX_IN OMX_HANDLETYPE hComponent,
  334. OMX_IN OMX_COMMANDTYPE Cmd,
  335. OMX_IN OMX_U32 nParam1,
  336. OMX_IN OMX_PTR pCmdData);
  337. /** refer to OMX_GetParameter in OMX_core.h or the OMX IL
  338. specification for details on the GetParameter method.
  339. */
  340. OMX_ERRORTYPE (*GetParameter)(
  341. OMX_IN OMX_HANDLETYPE hComponent,
  342. OMX_IN OMX_INDEXTYPE nParamIndex,
  343. OMX_INOUT OMX_PTR pComponentParameterStructure);
  344. /** refer to OMX_SetParameter in OMX_core.h or the OMX IL
  345. specification for details on the SetParameter method.
  346. */
  347. OMX_ERRORTYPE (*SetParameter)(
  348. OMX_IN OMX_HANDLETYPE hComponent,
  349. OMX_IN OMX_INDEXTYPE nIndex,
  350. OMX_IN OMX_PTR pComponentParameterStructure);
  351. /** refer to OMX_GetConfig in OMX_core.h or the OMX IL
  352. specification for details on the GetConfig method.
  353. */
  354. OMX_ERRORTYPE (*GetConfig)(
  355. OMX_IN OMX_HANDLETYPE hComponent,
  356. OMX_IN OMX_INDEXTYPE nIndex,
  357. OMX_INOUT OMX_PTR pComponentConfigStructure);
  358. /** refer to OMX_SetConfig in OMX_core.h or the OMX IL
  359. specification for details on the SetConfig method.
  360. */
  361. OMX_ERRORTYPE (*SetConfig)(
  362. OMX_IN OMX_HANDLETYPE hComponent,
  363. OMX_IN OMX_INDEXTYPE nIndex,
  364. OMX_IN OMX_PTR pComponentConfigStructure);
  365. /** refer to OMX_GetExtensionIndex in OMX_core.h or the OMX IL
  366. specification for details on the GetExtensionIndex method.
  367. */
  368. OMX_ERRORTYPE (*GetExtensionIndex)(
  369. OMX_IN OMX_HANDLETYPE hComponent,
  370. OMX_IN OMX_STRING cParameterName,
  371. OMX_OUT OMX_INDEXTYPE* pIndexType);
  372. /** refer to OMX_GetState in OMX_core.h or the OMX IL
  373. specification for details on the GetState method.
  374. */
  375. OMX_ERRORTYPE (*GetState)(
  376. OMX_IN OMX_HANDLETYPE hComponent,
  377. OMX_OUT OMX_STATETYPE* pState);
  378. /** The ComponentTunnelRequest method will interact with another OMX
  379. component to determine if tunneling is possible and to setup the
  380. tunneling. The return codes for this method can be used to
  381. determine if tunneling is not possible, or if tunneling is not
  382. supported.
  383. Base profile components (i.e. non-interop) do not support this
  384. method and should return OMX_ErrorNotImplemented
  385. The interop profile component MUST support tunneling to another
  386. interop profile component with a compatible port parameters.
  387. A component may also support proprietary communication.
  388. If proprietary communication is supported the negotiation of
  389. proprietary communication is done outside of OMX in a vendor
  390. specific way. It is only required that the proper result be
  391. returned and the details of how the setup is done is left
  392. to the component implementation.
  393. When this method is invoked when nPort in an output port, the
  394. component will:
  395. 1. Populate the pTunnelSetup structure with the output port's
  396. requirements and constraints for the tunnel.
  397. When this method is invoked when nPort in an input port, the
  398. component will:
  399. 1. Query the necessary parameters from the output port to
  400. determine if the ports are compatible for tunneling
  401. 2. If the ports are compatible, the component should store
  402. the tunnel step provided by the output port
  403. 3. Determine which port (either input or output) is the buffer
  404. supplier, and call OMX_SetParameter on the output port to
  405. indicate this selection.
  406. The component will return from this call within 5 msec.
  407. @param [in] hComp
  408. Handle of the component to be accessed. This is the component
  409. handle returned by the call to the OMX_GetHandle method.
  410. @param [in] nPort
  411. nPort is used to select the port on the component to be used
  412. for tunneling.
  413. @param [in] hTunneledComp
  414. Handle of the component to tunnel with. This is the component
  415. handle returned by the call to the OMX_GetHandle method. When
  416. this parameter is 0x0 the component should setup the port for
  417. communication with the application / IL Client.
  418. @param [in] nPortOutput
  419. nPortOutput is used indicate the port the component should
  420. tunnel with.
  421. @param [in] pTunnelSetup
  422. Pointer to the tunnel setup structure. When nPort is an output port
  423. the component should populate the fields of this structure. When
  424. When nPort is an input port the component should review the setup
  425. provided by the component with the output port.
  426. @return OMX_ERRORTYPE
  427. If the command successfully executes, the return code will be
  428. OMX_ErrorNone. Otherwise the appropriate OMX error will be returned.
  429. @ingroup tun
  430. */
  431. OMX_ERRORTYPE (*ComponentTunnelRequest)(
  432. OMX_IN OMX_HANDLETYPE hComp,
  433. OMX_IN OMX_U32 nPort,
  434. OMX_IN OMX_HANDLETYPE hTunneledComp,
  435. OMX_IN OMX_U32 nTunneledPort,
  436. OMX_INOUT OMX_TUNNELSETUPTYPE* pTunnelSetup);
  437. /** refer to OMX_UseBuffer in OMX_core.h or the OMX IL
  438. specification for details on the UseBuffer method.
  439. @ingroup buf
  440. */
  441. OMX_ERRORTYPE (*UseBuffer)(
  442. OMX_IN OMX_HANDLETYPE hComponent,
  443. OMX_INOUT OMX_BUFFERHEADERTYPE** ppBufferHdr,
  444. OMX_IN OMX_U32 nPortIndex,
  445. OMX_IN OMX_PTR pAppPrivate,
  446. OMX_IN OMX_U32 nSizeBytes,
  447. OMX_IN OMX_U8* pBuffer);
  448. /** refer to OMX_AllocateBuffer in OMX_core.h or the OMX IL
  449. specification for details on the AllocateBuffer method.
  450. @ingroup buf
  451. */
  452. OMX_ERRORTYPE (*AllocateBuffer)(
  453. OMX_IN OMX_HANDLETYPE hComponent,
  454. OMX_INOUT OMX_BUFFERHEADERTYPE** ppBuffer,
  455. OMX_IN OMX_U32 nPortIndex,
  456. OMX_IN OMX_PTR pAppPrivate,
  457. OMX_IN OMX_U32 nSizeBytes);
  458. /** refer to OMX_FreeBuffer in OMX_core.h or the OMX IL
  459. specification for details on the FreeBuffer method.
  460. @ingroup buf
  461. */
  462. OMX_ERRORTYPE (*FreeBuffer)(
  463. OMX_IN OMX_HANDLETYPE hComponent,
  464. OMX_IN OMX_U32 nPortIndex,
  465. OMX_IN OMX_BUFFERHEADERTYPE* pBuffer);
  466. /** refer to OMX_EmptyThisBuffer in OMX_core.h or the OMX IL
  467. specification for details on the EmptyThisBuffer method.
  468. @ingroup buf
  469. */
  470. OMX_ERRORTYPE (*EmptyThisBuffer)(
  471. OMX_IN OMX_HANDLETYPE hComponent,
  472. OMX_IN OMX_BUFFERHEADERTYPE* pBuffer);
  473. /** refer to OMX_FillThisBuffer in OMX_core.h or the OMX IL
  474. specification for details on the FillThisBuffer method.
  475. @ingroup buf
  476. */
  477. OMX_ERRORTYPE (*FillThisBuffer)(
  478. OMX_IN OMX_HANDLETYPE hComponent,
  479. OMX_IN OMX_BUFFERHEADERTYPE* pBuffer);
  480. /** The SetCallbacks method is used by the core to specify the callback
  481. structure from the application to the component. This is a blocking
  482. call. The component will return from this call within 5 msec.
  483. @param [in] hComponent
  484. Handle of the component to be accessed. This is the component
  485. handle returned by the call to the GetHandle function.
  486. @param [in] pCallbacks
  487. pointer to an OMX_CALLBACKTYPE structure used to provide the
  488. callback information to the component
  489. @param [in] pAppData
  490. pointer to an application defined value. It is anticipated that
  491. the application will pass a pointer to a data structure or a "this
  492. pointer" in this area to allow the callback (in the application)
  493. to determine the context of the call
  494. @return OMX_ERRORTYPE
  495. If the command successfully executes, the return code will be
  496. OMX_ErrorNone. Otherwise the appropriate OMX error will be returned.
  497. */
  498. OMX_ERRORTYPE (*SetCallbacks)(
  499. OMX_IN OMX_HANDLETYPE hComponent,
  500. OMX_IN OMX_CALLBACKTYPE* pCallbacks,
  501. OMX_IN OMX_PTR pAppData);
  502. /** ComponentDeInit method is used to deinitialize the component
  503. providing a means to free any resources allocated at component
  504. initialization. NOTE: After this call the component handle is
  505. not valid for further use.
  506. @param [in] hComponent
  507. Handle of the component to be accessed. This is the component
  508. handle returned by the call to the GetHandle function.
  509. @return OMX_ERRORTYPE
  510. If the command successfully executes, the return code will be
  511. OMX_ErrorNone. Otherwise the appropriate OMX error will be returned.
  512. */
  513. OMX_ERRORTYPE (*ComponentDeInit)(
  514. OMX_IN OMX_HANDLETYPE hComponent);
  515. /** @ingroup buf */
  516. OMX_ERRORTYPE (*UseEGLImage)(
  517. OMX_IN OMX_HANDLETYPE hComponent,
  518. OMX_INOUT OMX_BUFFERHEADERTYPE** ppBufferHdr,
  519. OMX_IN OMX_U32 nPortIndex,
  520. OMX_IN OMX_PTR pAppPrivate,
  521. OMX_IN void* eglImage);
  522. OMX_ERRORTYPE (*ComponentRoleEnum)(
  523. OMX_IN OMX_HANDLETYPE hComponent,
  524. OMX_OUT OMX_U8 *cRole,
  525. OMX_IN OMX_U32 nIndex);
  526. } OMX_COMPONENTTYPE;
  527. #ifdef __cplusplus
  528. }
  529. #endif /* __cplusplus */
  530. #endif
  531. /* File EOF */