OpenMAX Bellagio 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
33extern "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
60
61
62
115
126typedef enum OMX_ERRORTYPE
127{
129
132
135
138
141
145
148
151
154
157
160
163
166
169
173
175 OMX_ErrorNoMore = (OMX_S32) 0x8000100E,
176
179
182
184 OMX_ErrorTimeout = (OMX_S32) 0x80001011,
185
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
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
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
444
459
460
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
477
496
497typedef struct OMX_CALLBACKTYPE
498{
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
561 OMX_IN OMX_HANDLETYPE hComponent,
562 OMX_IN OMX_PTR pAppData,
564
590 OMX_OUT OMX_HANDLETYPE hComponent,
591 OMX_OUT OMX_PTR pAppData,
593
595
610
611
621
622
627#define OMX_PORTTUNNELFLAG_READONLY 0x00000001
628
629
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_EXTRADATATYPE
Definition OMX_Core.h:452
@ OMX_ExtraDataVendorStartUnused
Definition OMX_Core.h:456
@ OMX_ExtraDataQuantization
Definition OMX_Core.h:454
@ OMX_ExtraDataNone
Definition OMX_Core.h:453
@ OMX_ExtraDataKhronosExtensions
Definition OMX_Core.h:455
@ OMX_ExtraDataMax
Definition OMX_Core.h:457
#define OMX_MAX_STRINGNAME_SIZE
Definition OMX_Core.h:281
OMX_ERRORTYPE
Definition OMX_Core.h:127
@ OMX_ErrorInvalidState
Definition OMX_Core.h:162
@ OMX_ErrorUnsupportedSetting
Definition OMX_Core.h:218
@ OMX_ErrorDynamicResourcesUnavailable
Definition OMX_Core.h:233
@ OMX_ErrorInsufficientResources
Definition OMX_Core.h:131
@ OMX_ErrorTimeout
Definition OMX_Core.h:184
@ OMX_ErrorSameState
Definition OMX_Core.h:187
@ OMX_ErrorNotImplemented
Definition OMX_Core.h:150
@ OMX_ErrorMbErrorsInFrame
Definition OMX_Core.h:237
@ OMX_ErrorBadPortIndex
Definition OMX_Core.h:224
@ OMX_ErrorPortUnresponsiveDuringAllocation
Definition OMX_Core.h:197
@ OMX_ErrorContentPipeOpenFailed
Definition OMX_Core.h:243
@ OMX_ErrorPortUnpopulated
Definition OMX_Core.h:227
@ OMX_ErrorUnderflow
Definition OMX_Core.h:153
@ OMX_ErrorNotReady
Definition OMX_Core.h:181
@ OMX_ErrorNoMore
Definition OMX_Core.h:175
@ OMX_ErrorNone
Definition OMX_Core.h:128
@ OMX_ErrorFormatNotDetected
Definition OMX_Core.h:240
@ OMX_ErrorUndefined
Definition OMX_Core.h:134
@ OMX_ErrorInvalidComponentName
Definition OMX_Core.h:137
@ OMX_ErrorComponentNotFound
Definition OMX_Core.h:140
@ OMX_ErrorKhronosExtensions
Definition OMX_Core.h:254
@ OMX_ErrorPortsNotCompatible
Definition OMX_Core.h:168
@ OMX_ErrorResourcesPreempted
Definition OMX_Core.h:191
@ OMX_ErrorTunnelingUnsupported
Definition OMX_Core.h:252
@ OMX_ErrorHardware
Definition OMX_Core.h:159
@ OMX_ErrorUnsupportedIndex
Definition OMX_Core.h:221
@ OMX_ErrorSeperateTablesUsed
Definition OMX_Core.h:249
@ OMX_ErrorPortUnresponsiveDuringDeallocation
Definition OMX_Core.h:203
@ OMX_ErrorComponentSuspended
Definition OMX_Core.h:230
@ OMX_ErrorMax
Definition OMX_Core.h:256
@ OMX_ErrorInvalidComponent
Definition OMX_Core.h:144
@ OMX_ErrorResourcesLost
Definition OMX_Core.h:172
@ OMX_ErrorStreamCorrupt
Definition OMX_Core.h:165
@ OMX_ErrorVendorStartUnused
Definition OMX_Core.h:255
@ OMX_ErrorBadParameter
Definition OMX_Core.h:147
@ OMX_ErrorIncorrectStateTransition
Definition OMX_Core.h:212
@ OMX_ErrorContentPipeCreationFailed
Definition OMX_Core.h:246
@ OMX_ErrorPortUnresponsiveDuringStop
Definition OMX_Core.h:209
@ OMX_ErrorOverflow
Definition OMX_Core.h:156
@ OMX_ErrorVersionMismatch
Definition OMX_Core.h:178
@ OMX_ErrorIncorrectStateOperation
Definition OMX_Core.h:215
unsigned long OMX_U32
Definition OMX_Types.h:145
char * OMX_STRING
Definition OMX_Types.h:206
unsigned char OMX_U8
Definition OMX_Types.h:133
void * OMX_PTR
Definition OMX_Types.h:199
OMX_S64 OMX_TICKS
Definition OMX_Types.h:282
void * OMX_HANDLETYPE
Definition OMX_Types.h:295
signed long OMX_S32
Definition OMX_Types.h:148
#define OMX_APIENTRY
Definition OMX_Types.h:68
#define OMX_IN
Definition OMX_Types.h:75
#define OMX_API
Definition OMX_Types.h:62
#define OMX_OUT
Definition OMX_Types.h:82
#define OMX_INOUT
Definition OMX_Types.h:91
OMX_ERRORTYPE(* FillBufferDone)(OMX_OUT OMX_HANDLETYPE hComponent, OMX_OUT OMX_PTR pAppData, OMX_OUT OMX_BUFFERHEADERTYPE *pBuffer)
Definition OMX_Core.h:589
OMX_BUFFERSUPPLIERTYPE
Definition OMX_Core.h:601
OMX_ERRORTYPE(* EmptyBufferDone)(OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_PTR pAppData, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer)
Definition OMX_Core.h:560
@ OMX_BufferSupplyVendorStartUnused
Definition OMX_Core.h:607
@ OMX_BufferSupplyOutput
Definition OMX_Core.h:605
@ OMX_BufferSupplyInput
Definition OMX_Core.h:604
@ OMX_BufferSupplyKhronosExtensions
Definition OMX_Core.h:606
@ OMX_BufferSupplyUnspecified
Definition OMX_Core.h:602
@ OMX_BufferSupplyMax
Definition OMX_Core.h:608
OMX_STATETYPE
Definition OMX_Core.h:93
OMX_EVENTTYPE
Definition OMX_Core.h:480
@ OMX_StateExecuting
Definition OMX_Core.h:105
@ OMX_StateVendorStartUnused
Definition OMX_Core.h:112
@ OMX_StateKhronosExtensions
Definition OMX_Core.h:111
@ OMX_StateWaitForResources
Definition OMX_Core.h:108
@ OMX_StateMax
Definition OMX_Core.h:113
@ OMX_StateLoaded
Definition OMX_Core.h:97
@ OMX_StateInvalid
Definition OMX_Core.h:94
@ OMX_StateIdle
Definition OMX_Core.h:102
@ OMX_StatePause
Definition OMX_Core.h:107
@ OMX_EventResourcesAcquired
Definition OMX_Core.h:486
@ OMX_EventMax
Definition OMX_Core.h:494
@ OMX_EventKhronosExtensions
Definition OMX_Core.h:492
@ OMX_EventMark
Definition OMX_Core.h:483
@ OMX_EventBufferFlag
Definition OMX_Core.h:485
@ OMX_EventCmdComplete
Definition OMX_Core.h:481
@ OMX_EventDynamicResourcesAvailable
Definition OMX_Core.h:490
@ OMX_EventPortSettingsChanged
Definition OMX_Core.h:484
@ OMX_EventComponentResumed
Definition OMX_Core.h:489
@ OMX_EventPortFormatDetected
Definition OMX_Core.h:491
@ OMX_EventVendorStartUnused
Definition OMX_Core.h:493
@ OMX_EventError
Definition OMX_Core.h:482
OMX_ERRORTYPE(* OMX_COMPONENTINITTYPE)(OMX_IN OMX_HANDLETYPE hComponent)
Definition OMX_Core.h:260
OMX_API OMX_ERRORTYPE OMX_GetComponentsOfRole(OMX_IN OMX_STRING role, OMX_INOUT OMX_U32 *pNumComps, OMX_INOUT OMX_U8 **compNames)
OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_ComponentNameEnum(OMX_OUT OMX_STRING cComponentName, OMX_IN OMX_U32 nNameLength, OMX_IN OMX_U32 nIndex)
OMX_API OMX_ERRORTYPE OMX_GetRolesOfComponent(OMX_IN OMX_STRING compName, OMX_INOUT OMX_U32 *pNumRoles, OMX_OUT OMX_U8 **roles)
OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Deinit(void)
The OMX_Deinit standard function.
Definition omxcore.c:123
OMX_COMMANDTYPE
Definition OMX_Core.h:50
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_API OMX_ERRORTYPE OMX_APIENTRY OMX_Init(void)
The OMX_Init standard function.
Definition omxcore.c:94
OMX_COMPONENTREGISTERTYPE OMX_ComponentRegistered[]
@ OMX_CommandMarkBuffer
Definition OMX_Core.h:55
@ OMX_CommandKhronosExtensions
Definition OMX_Core.h:56
@ OMX_CommandMax
Definition OMX_Core.h:58
@ OMX_CommandPortDisable
Definition OMX_Core.h:53
@ OMX_CommandPortEnable
Definition OMX_Core.h:54
@ OMX_CommandFlush
Definition OMX_Core.h:52
@ OMX_CommandStateSet
Definition OMX_Core.h:51
@ OMX_CommandVendorStartUnused
Definition OMX_Core.h:57
OMX_API OMX_ERRORTYPE OMX_GetContentPipe(OMX_OUT OMX_HANDLETYPE *hPipe, OMX_IN OMX_STRING szURI)
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_VERSIONTYPE nVersion
Definition OMX_Core.h:401
OMX_PTR pOutputPortPrivate
Definition OMX_Core.h:415
OMX_PTR pPlatformPrivate
Definition OMX_Core.h:411
OMX_U32 nOutputPortIndex
Definition OMX_Core.h:439
OMX_U32 nInputPortIndex
Definition OMX_Core.h:441
OMX_TICKS nTimeStamp
Definition OMX_Core.h:431
OMX_HANDLETYPE hMarkTargetComponent
Definition OMX_Core.h:417
OMX_PTR pInputPortPrivate
Definition OMX_Core.h:413
OMX_ERRORTYPE(* EventHandler)(OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_PTR pAppData, OMX_IN OMX_EVENTTYPE eEvent, OMX_IN OMX_U32 nData1, OMX_IN OMX_U32 nData2, OMX_IN OMX_PTR pEventData)
Definition OMX_Core.h:530
OMX_COMPONENTINITTYPE pInitialize
Definition OMX_Core.h:266
OMX_EXTRADATATYPE eType
Definition OMX_Core.h:465
OMX_VERSIONTYPE nVersion
Definition OMX_Core.h:463
OMX_VERSIONTYPE nVersion
Definition OMX_Core.h:617
OMX_BUFFERSUPPLIERTYPE eBufferSupplier
Definition OMX_Core.h:619
OMX_VERSIONTYPE nVersion
Definition OMX_Core.h:286
OMX_VERSIONTYPE nVersion
Definition OMX_Core.h:473
OMX_U32 nStartPortNumber
Definition OMX_Core.h:475
OMX_VERSIONTYPE nVersion
Definition OMX_Core.h:275
OMX_BUFFERSUPPLIERTYPE eSupplier
Definition OMX_Core.h:638

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