OMX_Component.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  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. OMX_U32 nSize; /**< size of the structure in bytes, including
  122. actual URI name */
  123. OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
  124. OMX_U8 contentURI[1]; /**< The URI name */
  125. } OMX_PARAM_CONTENTURITYPE;
  126. /* Parameter specifying the pipe to use. */
  127. /** @ingroup cp */
  128. typedef struct OMX_PARAM_CONTENTPIPETYPE {
  129. OMX_U32 nSize; /**< size of the structure in bytes */
  130. OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
  131. OMX_HANDLETYPE hPipe; /**< The pipe handle*/
  132. } OMX_PARAM_CONTENTPIPETYPE;
  133. /** @ingroup rpm */
  134. typedef struct OMX_RESOURCECONCEALMENTTYPE {
  135. OMX_U32 nSize; /**< size of the structure in bytes */
  136. OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
  137. OMX_BOOL bResourceConcealmentForbidden; /**< disallow the use of resource concealment
  138. methods (like degrading algorithm quality to
  139. lower resource consumption or functional bypass)
  140. on a component as a resolution to resource conflicts. */
  141. } OMX_RESOURCECONCEALMENTTYPE;
  142. /** @ingroup metadata */
  143. typedef enum OMX_METADATACHARSETTYPE {
  144. OMX_MetadataCharsetUnknown = 0,
  145. OMX_MetadataCharsetASCII,
  146. OMX_MetadataCharsetBinary,
  147. OMX_MetadataCharsetCodePage1252,
  148. OMX_MetadataCharsetUTF8,
  149. OMX_MetadataCharsetJavaConformantUTF8,
  150. OMX_MetadataCharsetUTF7,
  151. OMX_MetadataCharsetImapUTF7,
  152. OMX_MetadataCharsetUTF16LE,
  153. OMX_MetadataCharsetUTF16BE,
  154. OMX_MetadataCharsetGB12345,
  155. OMX_MetadataCharsetHZGB2312,
  156. OMX_MetadataCharsetGB2312,
  157. OMX_MetadataCharsetGB18030,
  158. OMX_MetadataCharsetGBK,
  159. OMX_MetadataCharsetBig5,
  160. OMX_MetadataCharsetISO88591,
  161. OMX_MetadataCharsetISO88592,
  162. OMX_MetadataCharsetISO88593,
  163. OMX_MetadataCharsetISO88594,
  164. OMX_MetadataCharsetISO88595,
  165. OMX_MetadataCharsetISO88596,
  166. OMX_MetadataCharsetISO88597,
  167. OMX_MetadataCharsetISO88598,
  168. OMX_MetadataCharsetISO88599,
  169. OMX_MetadataCharsetISO885910,
  170. OMX_MetadataCharsetISO885913,
  171. OMX_MetadataCharsetISO885914,
  172. OMX_MetadataCharsetISO885915,
  173. OMX_MetadataCharsetShiftJIS,
  174. OMX_MetadataCharsetISO2022JP,
  175. OMX_MetadataCharsetISO2022JP1,
  176. OMX_MetadataCharsetISOEUCJP,
  177. OMX_MetadataCharsetSMS7Bit,
  178. OMX_MetadataCharsetKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  179. OMX_MetadataCharsetVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  180. OMX_MetadataCharsetTypeMax = 0x7FFFFFFF
  181. } OMX_METADATACHARSETTYPE;
  182. /** @ingroup metadata */
  183. typedef enum OMX_METADATASCOPETYPE {
  184. OMX_MetadataScopeAllLevels,
  185. OMX_MetadataScopeTopLevel,
  186. OMX_MetadataScopePortLevel,
  187. OMX_MetadataScopeNodeLevel,
  188. OMX_MetadataScopeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  189. OMX_MetadataScopeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  190. OMX_MetadataScopeTypeMax = 0x7fffffff
  191. } OMX_METADATASCOPETYPE;
  192. /** @ingroup metadata */
  193. typedef enum OMX_METADATASEARCHMODETYPE {
  194. OMX_MetadataSearchValueSizeByIndex,
  195. OMX_MetadataSearchItemByIndex,
  196. OMX_MetadataSearchNextItemByKey,
  197. OMX_MetadataSearchKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
  198. OMX_MetadataSearchVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
  199. OMX_MetadataSearchTypeMax = 0x7fffffff
  200. } OMX_METADATASEARCHMODETYPE;
  201. /** @ingroup metadata */
  202. typedef struct OMX_CONFIG_METADATAITEMCOUNTTYPE {
  203. OMX_U32 nSize;
  204. OMX_VERSIONTYPE nVersion;
  205. OMX_METADATASCOPETYPE eScopeMode;
  206. OMX_U32 nScopeSpecifier;
  207. OMX_U32 nMetadataItemCount;
  208. } OMX_CONFIG_METADATAITEMCOUNTTYPE;
  209. /** @ingroup metadata */
  210. typedef struct OMX_CONFIG_METADATAITEMTYPE {
  211. OMX_U32 nSize;
  212. OMX_VERSIONTYPE nVersion;
  213. OMX_METADATASCOPETYPE eScopeMode;
  214. OMX_U32 nScopeSpecifier;
  215. OMX_U32 nMetadataItemIndex;
  216. OMX_METADATASEARCHMODETYPE eSearchMode;
  217. OMX_METADATACHARSETTYPE eKeyCharset;
  218. OMX_U8 nKeySizeUsed;
  219. OMX_U8 nKey[128];
  220. OMX_METADATACHARSETTYPE eValueCharset;
  221. OMX_STRING sLanguageCountry;
  222. OMX_U32 nValueMaxSize;
  223. OMX_U32 nValueSizeUsed;
  224. OMX_U8 nValue[1];
  225. } OMX_CONFIG_METADATAITEMTYPE;
  226. /* @ingroup metadata */
  227. typedef struct OMX_CONFIG_CONTAINERNODECOUNTTYPE {
  228. OMX_U32 nSize;
  229. OMX_VERSIONTYPE nVersion;
  230. OMX_BOOL bAllKeys;
  231. OMX_U32 nParentNodeID;
  232. OMX_U32 nNumNodes;
  233. } OMX_CONFIG_CONTAINERNODECOUNTTYPE;
  234. /** @ingroup metadata */
  235. typedef struct OMX_CONFIG_CONTAINERNODEIDTYPE {
  236. OMX_U32 nSize;
  237. OMX_VERSIONTYPE nVersion;
  238. OMX_BOOL bAllKeys;
  239. OMX_U32 nParentNodeID;
  240. OMX_U32 nNodeIndex;
  241. OMX_U32 nNodeID;
  242. OMX_STRING cNodeName;
  243. OMX_BOOL bIsLeafType;
  244. } OMX_CONFIG_CONTAINERNODEIDTYPE;
  245. /** @ingroup metadata */
  246. typedef struct OMX_PARAM_METADATAFILTERTYPE {
  247. OMX_U32 nSize;
  248. OMX_VERSIONTYPE nVersion;
  249. OMX_BOOL bAllKeys; /* if true then this structure refers to all keys and
  250. * the three key fields below are ignored */
  251. OMX_METADATACHARSETTYPE eKeyCharset;
  252. OMX_U32 nKeySizeUsed;
  253. OMX_U8 nKey [128];
  254. OMX_U32 nLanguageCountrySizeUsed;
  255. OMX_U8 nLanguageCountry[128];
  256. OMX_BOOL bEnabled; /* if true then key is part of filter (e.g.
  257. * retained for query later). If false then
  258. * key is not part of filter */
  259. } OMX_PARAM_METADATAFILTERTYPE;
  260. /** The OMX_HANDLETYPE structure defines the component handle. The component
  261. * handle is used to access all of the component's public methods and also
  262. * contains pointers to the component's private data area. The component
  263. * handle is initialized by the OMX core (with help from the component)
  264. * during the process of loading the component. After the component is
  265. * successfully loaded, the application can safely access any of the
  266. * component's public functions (although some may return an error because
  267. * the state is inappropriate for the access).
  268. *
  269. * @ingroup comp
  270. */
  271. typedef struct OMX_COMPONENTTYPE {
  272. /** The size of this structure, in bytes. It is the responsibility
  273. of the allocator of this structure to fill in this value. Since
  274. this structure is allocated by the GetHandle function, this
  275. function will fill in this value. */
  276. OMX_U32 nSize;
  277. /** nVersion is the version of the OMX specification that the structure
  278. is built against. It is the responsibility of the creator of this
  279. structure to initialize this value and every user of this structure
  280. should verify that it knows how to use the exact version of
  281. this structure found herein. */
  282. OMX_VERSIONTYPE nVersion;
  283. /** pComponentPrivate is a pointer to the component private data area.
  284. This member is allocated and initialized by the component when the
  285. component is first loaded. The application should not access this
  286. data area. */
  287. OMX_PTR pComponentPrivate;
  288. /** pApplicationPrivate is a pointer that is a parameter to the
  289. OMX_GetHandle method, and contains an application private value
  290. provided by the IL client. This application private data is
  291. returned to the IL Client by OMX in all callbacks */
  292. OMX_PTR pApplicationPrivate;
  293. /** refer to OMX_GetComponentVersion in OMX_core.h or the OMX IL
  294. specification for details on the GetComponentVersion method.
  295. */
  296. OMX_ERRORTYPE (*GetComponentVersion)(
  297. OMX_IN OMX_HANDLETYPE hComponent,
  298. OMX_OUT OMX_STRING pComponentName,
  299. OMX_OUT OMX_VERSIONTYPE* pComponentVersion,
  300. OMX_OUT OMX_VERSIONTYPE* pSpecVersion,
  301. OMX_OUT OMX_UUIDTYPE* pComponentUUID);
  302. /** refer to OMX_SendCommand in OMX_core.h or the OMX IL
  303. specification for details on the SendCommand method.
  304. */
  305. OMX_ERRORTYPE (*SendCommand)(
  306. OMX_IN OMX_HANDLETYPE hComponent,
  307. OMX_IN OMX_COMMANDTYPE Cmd,
  308. OMX_IN OMX_U32 nParam1,
  309. OMX_IN OMX_PTR pCmdData);
  310. /** refer to OMX_GetParameter in OMX_core.h or the OMX IL
  311. specification for details on the GetParameter method.
  312. */
  313. OMX_ERRORTYPE (*GetParameter)(
  314. OMX_IN OMX_HANDLETYPE hComponent,
  315. OMX_IN OMX_INDEXTYPE nParamIndex,
  316. OMX_INOUT OMX_PTR pComponentParameterStructure);
  317. /** refer to OMX_SetParameter in OMX_core.h or the OMX IL
  318. specification for details on the SetParameter method.
  319. */
  320. OMX_ERRORTYPE (*SetParameter)(
  321. OMX_IN OMX_HANDLETYPE hComponent,
  322. OMX_IN OMX_INDEXTYPE nIndex,
  323. OMX_IN OMX_PTR pComponentParameterStructure);
  324. /** refer to OMX_GetConfig in OMX_core.h or the OMX IL
  325. specification for details on the GetConfig method.
  326. */
  327. OMX_ERRORTYPE (*GetConfig)(
  328. OMX_IN OMX_HANDLETYPE hComponent,
  329. OMX_IN OMX_INDEXTYPE nIndex,
  330. OMX_INOUT OMX_PTR pComponentConfigStructure);
  331. /** refer to OMX_SetConfig in OMX_core.h or the OMX IL
  332. specification for details on the SetConfig method.
  333. */
  334. OMX_ERRORTYPE (*SetConfig)(
  335. OMX_IN OMX_HANDLETYPE hComponent,
  336. OMX_IN OMX_INDEXTYPE nIndex,
  337. OMX_IN OMX_PTR pComponentConfigStructure);
  338. /** refer to OMX_GetExtensionIndex in OMX_core.h or the OMX IL
  339. specification for details on the GetExtensionIndex method.
  340. */
  341. OMX_ERRORTYPE (*GetExtensionIndex)(
  342. OMX_IN OMX_HANDLETYPE hComponent,
  343. OMX_IN OMX_STRING cParameterName,
  344. OMX_OUT OMX_INDEXTYPE* pIndexType);
  345. /** refer to OMX_GetState in OMX_core.h or the OMX IL
  346. specification for details on the GetState method.
  347. */
  348. OMX_ERRORTYPE (*GetState)(
  349. OMX_IN OMX_HANDLETYPE hComponent,
  350. OMX_OUT OMX_STATETYPE* pState);
  351. /** The ComponentTunnelRequest method will interact with another OMX
  352. component to determine if tunneling is possible and to setup the
  353. tunneling. The return codes for this method can be used to
  354. determine if tunneling is not possible, or if tunneling is not
  355. supported.
  356. Base profile components (i.e. non-interop) do not support this
  357. method and should return OMX_ErrorNotImplemented
  358. The interop profile component MUST support tunneling to another
  359. interop profile component with a compatible port parameters.
  360. A component may also support proprietary communication.
  361. If proprietary communication is supported the negotiation of
  362. proprietary communication is done outside of OMX in a vendor
  363. specific way. It is only required that the proper result be
  364. returned and the details of how the setup is done is left
  365. to the component implementation.
  366. When this method is invoked when nPort in an output port, the
  367. component will:
  368. 1. Populate the pTunnelSetup structure with the output port's
  369. requirements and constraints for the tunnel.
  370. When this method is invoked when nPort in an input port, the
  371. component will:
  372. 1. Query the necessary parameters from the output port to
  373. determine if the ports are compatible for tunneling
  374. 2. If the ports are compatible, the component should store
  375. the tunnel step provided by the output port
  376. 3. Determine which port (either input or output) is the buffer
  377. supplier, and call OMX_SetParameter on the output port to
  378. indicate this selection.
  379. The component will return from this call within 5 msec.
  380. @param [in] hComp
  381. Handle of the component to be accessed. This is the component
  382. handle returned by the call to the OMX_GetHandle method.
  383. @param [in] nPort
  384. nPort is used to select the port on the component to be used
  385. for tunneling.
  386. @param [in] hTunneledComp
  387. Handle of the component to tunnel with. This is the component
  388. handle returned by the call to the OMX_GetHandle method. When
  389. this parameter is 0x0 the component should setup the port for
  390. communication with the application / IL Client.
  391. @param [in] nPortOutput
  392. nPortOutput is used indicate the port the component should
  393. tunnel with.
  394. @param [in] pTunnelSetup
  395. Pointer to the tunnel setup structure. When nPort is an output port
  396. the component should populate the fields of this structure. When
  397. When nPort is an input port the component should review the setup
  398. provided by the component with the output port.
  399. @return OMX_ERRORTYPE
  400. If the command successfully executes, the return code will be
  401. OMX_ErrorNone. Otherwise the appropriate OMX error will be returned.
  402. @ingroup tun
  403. */
  404. OMX_ERRORTYPE (*ComponentTunnelRequest)(
  405. OMX_IN OMX_HANDLETYPE hComp,
  406. OMX_IN OMX_U32 nPort,
  407. OMX_IN OMX_HANDLETYPE hTunneledComp,
  408. OMX_IN OMX_U32 nTunneledPort,
  409. OMX_INOUT OMX_TUNNELSETUPTYPE* pTunnelSetup);
  410. /** refer to OMX_UseBuffer in OMX_core.h or the OMX IL
  411. specification for details on the UseBuffer method.
  412. @ingroup buf
  413. */
  414. OMX_ERRORTYPE (*UseBuffer)(
  415. OMX_IN OMX_HANDLETYPE hComponent,
  416. OMX_INOUT OMX_BUFFERHEADERTYPE** ppBufferHdr,
  417. OMX_IN OMX_U32 nPortIndex,
  418. OMX_IN OMX_PTR pAppPrivate,
  419. OMX_IN OMX_U32 nSizeBytes,
  420. OMX_IN OMX_U8* pBuffer);
  421. /** refer to OMX_AllocateBuffer in OMX_core.h or the OMX IL
  422. specification for details on the AllocateBuffer method.
  423. @ingroup buf
  424. */
  425. OMX_ERRORTYPE (*AllocateBuffer)(
  426. OMX_IN OMX_HANDLETYPE hComponent,
  427. OMX_INOUT OMX_BUFFERHEADERTYPE** ppBuffer,
  428. OMX_IN OMX_U32 nPortIndex,
  429. OMX_IN OMX_PTR pAppPrivate,
  430. OMX_IN OMX_U32 nSizeBytes);
  431. /** refer to OMX_FreeBuffer in OMX_core.h or the OMX IL
  432. specification for details on the FreeBuffer method.
  433. @ingroup buf
  434. */
  435. OMX_ERRORTYPE (*FreeBuffer)(
  436. OMX_IN OMX_HANDLETYPE hComponent,
  437. OMX_IN OMX_U32 nPortIndex,
  438. OMX_IN OMX_BUFFERHEADERTYPE* pBuffer);
  439. /** refer to OMX_EmptyThisBuffer in OMX_core.h or the OMX IL
  440. specification for details on the EmptyThisBuffer method.
  441. @ingroup buf
  442. */
  443. OMX_ERRORTYPE (*EmptyThisBuffer)(
  444. OMX_IN OMX_HANDLETYPE hComponent,
  445. OMX_IN OMX_BUFFERHEADERTYPE* pBuffer);
  446. /** refer to OMX_FillThisBuffer in OMX_core.h or the OMX IL
  447. specification for details on the FillThisBuffer method.
  448. @ingroup buf
  449. */
  450. OMX_ERRORTYPE (*FillThisBuffer)(
  451. OMX_IN OMX_HANDLETYPE hComponent,
  452. OMX_IN OMX_BUFFERHEADERTYPE* pBuffer);
  453. /** The SetCallbacks method is used by the core to specify the callback
  454. structure from the application to the component. This is a blocking
  455. call. The component will return from this call within 5 msec.
  456. @param [in] hComponent
  457. Handle of the component to be accessed. This is the component
  458. handle returned by the call to the GetHandle function.
  459. @param [in] pCallbacks
  460. pointer to an OMX_CALLBACKTYPE structure used to provide the
  461. callback information to the component
  462. @param [in] pAppData
  463. pointer to an application defined value. It is anticipated that
  464. the application will pass a pointer to a data structure or a "this
  465. pointer" in this area to allow the callback (in the application)
  466. to determine the context of the call
  467. @return OMX_ERRORTYPE
  468. If the command successfully executes, the return code will be
  469. OMX_ErrorNone. Otherwise the appropriate OMX error will be returned.
  470. */
  471. OMX_ERRORTYPE (*SetCallbacks)(
  472. OMX_IN OMX_HANDLETYPE hComponent,
  473. OMX_IN OMX_CALLBACKTYPE* pCallbacks,
  474. OMX_IN OMX_PTR pAppData);
  475. /** ComponentDeInit method is used to deinitialize the component
  476. providing a means to free any resources allocated at component
  477. initialization. NOTE: After this call the component handle is
  478. not valid for further use.
  479. @param [in] hComponent
  480. Handle of the component to be accessed. This is the component
  481. handle returned by the call to the GetHandle function.
  482. @return OMX_ERRORTYPE
  483. If the command successfully executes, the return code will be
  484. OMX_ErrorNone. Otherwise the appropriate OMX error will be returned.
  485. */
  486. OMX_ERRORTYPE (*ComponentDeInit)(
  487. OMX_IN OMX_HANDLETYPE hComponent);
  488. /** @ingroup buf */
  489. OMX_ERRORTYPE (*UseEGLImage)(
  490. OMX_IN OMX_HANDLETYPE hComponent,
  491. OMX_INOUT OMX_BUFFERHEADERTYPE** ppBufferHdr,
  492. OMX_IN OMX_U32 nPortIndex,
  493. OMX_IN OMX_PTR pAppPrivate,
  494. OMX_IN void* eglImage);
  495. OMX_ERRORTYPE (*ComponentRoleEnum)(
  496. OMX_IN OMX_HANDLETYPE hComponent,
  497. OMX_OUT OMX_U8 *cRole,
  498. OMX_IN OMX_U32 nIndex);
  499. } OMX_COMPONENTTYPE;
  500. #ifdef __cplusplus
  501. }
  502. #endif /* __cplusplus */
  503. #endif
  504. /* File EOF */