OMX_Component.h 23 KB

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