OpenMAXBellagio  0.9.3
OMX_Core.h
Go to the documentation of this file.
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 
29 #ifndef OMX_Core_h
30 #define OMX_Core_h
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif /* __cplusplus */
35 
36 
37 /* Each OMX header shall include all required header files to allow the
38  * header to compile without errors. The includes below are required
39  * for this header file to compile successfully
40  */
41 
42 #include <OMX_Index.h>
43 
44 
49 typedef enum OMX_COMMANDTYPE
50 {
58  OMX_CommandMax = 0X7FFFFFFF
60 
61 
62 
92 typedef enum OMX_STATETYPE
93 {
113  OMX_StateMax = 0X7FFFFFFF
114 } OMX_STATETYPE;
115 
126 typedef enum OMX_ERRORTYPE
127 {
129 
132 
134  OMX_ErrorUndefined = (OMX_S32) 0x80001001,
135 
138 
141 
145 
148 
151 
153  OMX_ErrorUnderflow = (OMX_S32) 0x80001007,
154 
156  OMX_ErrorOverflow = (OMX_S32) 0x80001008,
157 
159  OMX_ErrorHardware = (OMX_S32) 0x80001009,
160 
163 
166 
169 
173 
175  OMX_ErrorNoMore = (OMX_S32) 0x8000100E,
176 
179 
181  OMX_ErrorNotReady = (OMX_S32) 0x80001010,
182 
184  OMX_ErrorTimeout = (OMX_S32) 0x80001011,
185 
187  OMX_ErrorSameState = (OMX_S32) 0x80001012,
188 
192 
198 
204 
210 
213 
214  /* Attempting a command that is not allowed during the present state. */
216 
219 
222 
225 
228 
231 
234 
238 
241 
244 
247 
250 
253 
256  OMX_ErrorMax = 0x7FFFFFFF
257 } OMX_ERRORTYPE;
258 
261 
264 {
265  const char * pName; /* Component name, 128 byte limit (including '\0') applies */
266  OMX_COMPONENTINITTYPE pInitialize; /* Component instance initialization function */
268 
271 
273 typedef struct OMX_PRIORITYMGMTTYPE {
279 
280 /* Component name and Role names are limited to 128 characters including the terminating '\0'. */
281 #define OMX_MAX_STRINGNAME_SIZE 128
282 
289 
299 #define OMX_BUFFERFLAG_EOS 0x00000001
300 
326 #define OMX_BUFFERFLAG_STARTTIME 0x00000002
327 
328 
329 
349 #define OMX_BUFFERFLAG_DECODEONLY 0x00000004
350 
351 
352 /* Data Corrupt Flag: This flag is set when the IL client believes the data in the associated buffer is corrupt
353  * @ingroup buf
354  */
355 
356 #define OMX_BUFFERFLAG_DATACORRUPT 0x00000008
357 
358 /* End of Frame: The buffer contains exactly one end of frame and no data
359  * occurs after the end of frame. This flag is an optional hint. The absence
360  * of this flag does not imply the absence of an end of frame within the buffer.
361  * @ingroup buf
362 */
363 #define OMX_BUFFERFLAG_ENDOFFRAME 0x00000010
364 
365 /* Sync Frame Flag: This flag is set when the buffer content contains a coded sync frame '
366  * a frame that has no dependency on any other frame information
367  * @ingroup buf
368  */
369 #define OMX_BUFFERFLAG_SYNCFRAME 0x00000020
370 
371 /* Extra data present flag: there is extra data appended to the data stream
372  * residing in the buffer
373  * @ingroup buf
374  */
375 #define OMX_BUFFERFLAG_EXTRADATA 0x00000040
376 
393 #define OMX_BUFFERFLAG_CODECCONFIG 0x00000080
394 
395 
396 
398 typedef struct OMX_BUFFERHEADERTYPE
399 {
444 
451 typedef enum OMX_EXTRADATATYPE
452 {
457  OMX_ExtraDataMax = 0x7FFFFFFF
459 
460 
461 typedef struct OMX_OTHER_EXTRADATATYPE {
465  OMX_EXTRADATATYPE eType; /* Extra Data type */
466  OMX_U32 nDataSize; /* Size of the supporting data to follow */
467  OMX_U8 data[1]; /* Supporting data hint */
469 
471 typedef struct OMX_PORT_PARAM_TYPE {
477 
479 typedef enum OMX_EVENTTYPE
480 {
494  OMX_EventMax = 0x7FFFFFFF
495 } OMX_EVENTTYPE;
496 
497 typedef struct OMX_CALLBACKTYPE
498 {
530  OMX_ERRORTYPE (*EventHandler)(
531  OMX_IN OMX_HANDLETYPE hComponent,
532  OMX_IN OMX_PTR pAppData,
533  OMX_IN OMX_EVENTTYPE eEvent,
534  OMX_IN OMX_U32 nData1,
535  OMX_IN OMX_U32 nData2,
536  OMX_IN OMX_PTR pEventData);
537 
560  OMX_ERRORTYPE (*EmptyBufferDone)(
561  OMX_IN OMX_HANDLETYPE hComponent,
562  OMX_IN OMX_PTR pAppData,
563  OMX_IN OMX_BUFFERHEADERTYPE* pBuffer);
564 
589  OMX_ERRORTYPE (*FillBufferDone)(
590  OMX_OUT OMX_HANDLETYPE hComponent,
591  OMX_OUT OMX_PTR pAppData,
592  OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer);
593 
595 
601 {
608  OMX_BufferSupplyMax = 0x7FFFFFFF
610 
611 
621 
622 
627 #define OMX_PORTTUNNELFLAG_READONLY 0x00000001
628 
629 
635 typedef struct OMX_TUNNELSETUPTYPE
636 {
640 
641 /* OMX Component headers is included to enable the core to use
642  macros for functions into the component for OMX release 1.0.
643  Developers should not access any structures or data from within
644  the component header directly */
645 /* TO BE REMOVED - #include <OMX_Component.h> */
646 
684 #define OMX_GetComponentVersion( \
685  hComponent, \
686  pComponentName, \
687  pComponentVersion, \
688  pSpecVersion, \
689  pComponentUUID) \
690  ((OMX_COMPONENTTYPE*)hComponent)->GetComponentVersion( \
691  hComponent, \
692  pComponentName, \
693  pComponentVersion, \
694  pSpecVersion, \
695  pComponentUUID) /* Macro End */
696 
697 
745 #define OMX_SendCommand( \
746  hComponent, \
747  Cmd, \
748  nParam, \
749  pCmdData) \
750  ((OMX_COMPONENTTYPE*)hComponent)->SendCommand( \
751  hComponent, \
752  Cmd, \
753  nParam, \
754  pCmdData) /* Macro End */
755 
756 
786 #define OMX_GetParameter( \
787  hComponent, \
788  nParamIndex, \
789  pComponentParameterStructure) \
790  ((OMX_COMPONENTTYPE*)hComponent)->GetParameter( \
791  hComponent, \
792  nParamIndex, \
793  pComponentParameterStructure) /* Macro End */
794 
795 
825 #define OMX_SetParameter( \
826  hComponent, \
827  nParamIndex, \
828  pComponentParameterStructure) \
829  ((OMX_COMPONENTTYPE*)hComponent)->SetParameter( \
830  hComponent, \
831  nParamIndex, \
832  pComponentParameterStructure) /* Macro End */
833 
834 
861 #define OMX_GetConfig( \
862  hComponent, \
863  nConfigIndex, \
864  pComponentConfigStructure) \
865  ((OMX_COMPONENTTYPE*)hComponent)->GetConfig( \
866  hComponent, \
867  nConfigIndex, \
868  pComponentConfigStructure) /* Macro End */
869 
870 
897 #define OMX_SetConfig( \
898  hComponent, \
899  nConfigIndex, \
900  pComponentConfigStructure) \
901  ((OMX_COMPONENTTYPE*)hComponent)->SetConfig( \
902  hComponent, \
903  nConfigIndex, \
904  pComponentConfigStructure) /* Macro End */
905 
906 
931 #define OMX_GetExtensionIndex( \
932  hComponent, \
933  cParameterName, \
934  pIndexType) \
935  ((OMX_COMPONENTTYPE*)hComponent)->GetExtensionIndex( \
936  hComponent, \
937  cParameterName, \
938  pIndexType) /* Macro End */
939 
940 
958 #define OMX_GetState( \
959  hComponent, \
960  pState) \
961  ((OMX_COMPONENTTYPE*)hComponent)->GetState( \
962  hComponent, \
963  pState) /* Macro End */
964 
965 
985 #define OMX_UseBuffer( \
986  hComponent, \
987  ppBufferHdr, \
988  nPortIndex, \
989  pAppPrivate, \
990  nSizeBytes, \
991  pBuffer) \
992  ((OMX_COMPONENTTYPE*)hComponent)->UseBuffer( \
993  hComponent, \
994  ppBufferHdr, \
995  nPortIndex, \
996  pAppPrivate, \
997  nSizeBytes, \
998  pBuffer)
999 
1000 
1028 #define OMX_AllocateBuffer( \
1029  hComponent, \
1030  ppBuffer, \
1031  nPortIndex, \
1032  pAppPrivate, \
1033  nSizeBytes) \
1034  ((OMX_COMPONENTTYPE*)hComponent)->AllocateBuffer( \
1035  hComponent, \
1036  ppBuffer, \
1037  nPortIndex, \
1038  pAppPrivate, \
1039  nSizeBytes) /* Macro End */
1040 
1041 
1064 #define OMX_FreeBuffer( \
1065  hComponent, \
1066  nPortIndex, \
1067  pBuffer) \
1068  ((OMX_COMPONENTTYPE*)hComponent)->FreeBuffer( \
1069  hComponent, \
1070  nPortIndex, \
1071  pBuffer) /* Macro End */
1072 
1073 
1096 #define OMX_EmptyThisBuffer( \
1097  hComponent, \
1098  pBuffer) \
1099  ((OMX_COMPONENTTYPE*)hComponent)->EmptyThisBuffer( \
1100  hComponent, \
1101  pBuffer) /* Macro End */
1102 
1103 
1126 #define OMX_FillThisBuffer( \
1127  hComponent, \
1128  pBuffer) \
1129  ((OMX_COMPONENTTYPE*)hComponent)->FillThisBuffer( \
1130  hComponent, \
1131  pBuffer) /* Macro End */
1132 
1133 
1134 
1165 #define OMX_UseEGLImage( \
1166  hComponent, \
1167  ppBufferHdr, \
1168  nPortIndex, \
1169  pAppPrivate, \
1170  eglImage) \
1171  ((OMX_COMPONENTTYPE*)hComponent)->UseEGLImage( \
1172  hComponent, \
1173  ppBufferHdr, \
1174  nPortIndex, \
1175  pAppPrivate, \
1176  eglImage)
1177 
1190 
1191 
1205 
1206 
1245  OMX_OUT OMX_STRING cComponentName,
1246  OMX_IN OMX_U32 nNameLength,
1247  OMX_IN OMX_U32 nIndex);
1248 
1249 
1278  OMX_OUT OMX_HANDLETYPE* pHandle,
1279  OMX_IN OMX_STRING cComponentName,
1280  OMX_IN OMX_PTR pAppData,
1281  OMX_IN OMX_CALLBACKTYPE* pCallBacks);
1282 
1283 
1300  OMX_IN OMX_HANDLETYPE hComponent);
1301 
1302 
1303 
1353  OMX_IN OMX_HANDLETYPE hOutput,
1354  OMX_IN OMX_U32 nPortOutput,
1355  OMX_IN OMX_HANDLETYPE hInput,
1356  OMX_IN OMX_U32 nPortInput);
1357 
1360  OMX_OUT OMX_HANDLETYPE *hPipe,
1361  OMX_IN OMX_STRING szURI);
1362 
1391  OMX_IN OMX_STRING role,
1392  OMX_INOUT OMX_U32 *pNumComps,
1393  OMX_INOUT OMX_U8 **compNames);
1394 
1421  OMX_IN OMX_STRING compName,
1422  OMX_INOUT OMX_U32 *pNumRoles,
1423  OMX_OUT OMX_U8 **roles);
1424 
1425 #ifdef __cplusplus
1426 }
1427 #endif /* __cplusplus */
1428 
1429 #endif
1430 /* File EOF */
1431 
OMX_VERSIONTYPE nVersion
Definition: OMX_Core.h:401
void * OMX_HANDLETYPE
Definition: OMX_Types.h:295
struct OMX_PRIORITYMGMTTYPE OMX_PRIORITYMGMTTYPE
OMX_COMPONENTINITTYPE pInitialize
Definition: OMX_Core.h:266
unsigned long OMX_U32
Definition: OMX_Types.h:145
OMX_U32 nStartPortNumber
Definition: OMX_Core.h:475
struct OMX_PARAM_BUFFERSUPPLIERTYPE OMX_PARAM_BUFFERSUPPLIERTYPE
OMX_API OMX_ERRORTYPE OMX_GetComponentsOfRole(OMX_IN OMX_STRING role, OMX_INOUT OMX_U32 *pNumComps, OMX_INOUT OMX_U8 **compNames)
OMX_BUFFERSUPPLIERTYPE
Definition: OMX_Core.h:600
signed long OMX_S32
Definition: OMX_Types.h:148
OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Init(void)
The OMX_Init standard function.
Definition: omxcore.c:94
OMX_S64 OMX_TICKS
Definition: OMX_Types.h:282
OMX_U32 nGroupPriority
Definition: OMX_Core.h:276
OMX_EXTRADATATYPE eType
Definition: OMX_Core.h:465
OMX_ERRORTYPE(* OMX_COMPONENTINITTYPE)(OMX_IN OMX_HANDLETYPE hComponent)
Definition: OMX_Core.h:260
char * OMX_STRING
Definition: OMX_Types.h:206
void * OMX_PTR
Definition: OMX_Types.h:199
OMX_EVENTTYPE
Definition: OMX_Core.h:479
struct OMX_CALLBACKTYPE OMX_CALLBACKTYPE
struct OMX_OTHER_EXTRADATATYPE OMX_OTHER_EXTRADATATYPE
OMX_PTR pOutputPortPrivate
Definition: OMX_Core.h:415
OMX_COMPONENTREGISTERTYPE OMX_ComponentRegistered[]
OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_SetupTunnel(OMX_IN OMX_HANDLETYPE hOutput, OMX_IN OMX_U32 nPortOutput, OMX_IN OMX_HANDLETYPE hInput, OMX_IN OMX_U32 nPortInput)
OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_GetHandle(OMX_OUT OMX_HANDLETYPE *pHandle, OMX_IN OMX_STRING cComponentName, OMX_IN OMX_PTR pAppData, OMX_IN OMX_CALLBACKTYPE *pCallBacks)
OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_FreeHandle(OMX_IN OMX_HANDLETYPE hComponent)
OMX_U32 nInputPortIndex
Definition: OMX_Core.h:441
#define OMX_API
Definition: OMX_Types.h:62
OMX_TICKS nTimeStamp
Definition: OMX_Core.h:431
OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_ComponentNameEnum(OMX_OUT OMX_STRING cComponentName, OMX_IN OMX_U32 nNameLength, OMX_IN OMX_U32 nIndex)
OMX_PTR pInputPortPrivate
Definition: OMX_Core.h:413
struct OMX_PARAM_COMPONENTROLETYPE OMX_PARAM_COMPONENTROLETYPE
OMX_VERSIONTYPE nVersion
Definition: OMX_Core.h:275
OMX_VERSIONTYPE nVersion
Definition: OMX_Core.h:286
OMX_VERSIONTYPE nVersion
Definition: OMX_Core.h:463
#define OMX_APIENTRY
Definition: OMX_Types.h:68
#define OMX_MAX_STRINGNAME_SIZE
Definition: OMX_Core.h:281
struct OMX_BUFFERHEADERTYPE OMX_BUFFERHEADERTYPE
unsigned char OMX_U8
Definition: OMX_Types.h:133
OMX_U32 nOutputPortIndex
Definition: OMX_Core.h:439
OMX_VERSIONTYPE nVersion
Definition: OMX_Core.h:617
OMX_U32 nTunnelFlags
Definition: OMX_Core.h:637
OMX_API OMX_ERRORTYPE OMX_GetContentPipe(OMX_OUT OMX_HANDLETYPE *hPipe, OMX_IN OMX_STRING szURI)
OMX_HANDLETYPE hMarkTargetComponent
Definition: OMX_Core.h:417
OMX_PTR pPlatformPrivate
Definition: OMX_Core.h:411
OMX_STATETYPE
Definition: OMX_Core.h:92
OMX_API OMX_ERRORTYPE OMX_GetRolesOfComponent(OMX_IN OMX_STRING compName, OMX_INOUT OMX_U32 *pNumRoles, OMX_OUT OMX_U8 **roles)
OMX_COMMANDTYPE
Definition: OMX_Core.h:49
#define OMX_IN
Definition: OMX_Types.h:75
OMX_EXTRADATATYPE
Definition: OMX_Core.h:451
struct OMX_COMPONENTREGISTERTYPE OMX_COMPONENTREGISTERTYPE
#define OMX_INOUT
Definition: OMX_Types.h:91
struct OMX_TUNNELSETUPTYPE OMX_TUNNELSETUPTYPE
OMX_BUFFERSUPPLIERTYPE eSupplier
Definition: OMX_Core.h:638
#define OMX_OUT
Definition: OMX_Types.h:82
OMX_BUFFERSUPPLIERTYPE eBufferSupplier
Definition: OMX_Core.h:619
OMX_VERSIONTYPE nVersion
Definition: OMX_Core.h:473
OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Deinit(void)
The OMX_Deinit standard function.
Definition: omxcore.c:123
OMX_ERRORTYPE
Definition: OMX_Core.h:126
struct OMX_PORT_PARAM_TYPE OMX_PORT_PARAM_TYPE

Generated for OpenMAX Bellagio rel. 0.9.3 by  doxygen 1.5.1
SourceForge.net Logo