1 /* 2 * 3 * Copyright 2010 Samsung Electronics S.LSI Co. LTD 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 /* 19 * @file SEC_OMX_Def.h 20 * @brief SEC_OMX specific define 21 * @author SeungBeom Kim (sbcrux.kim (at) samsung.com) 22 * @version 1.0 23 * @history 24 * 2010.7.15 : Create 25 */ 26 27 #ifndef SEC_OMX_DEF 28 #define SEC_OMX_DEF 29 30 #include "OMX_Types.h" 31 #include "OMX_IVCommon.h" 32 33 #define VERSIONMAJOR_NUMBER 1 34 #define VERSIONMINOR_NUMBER 0 35 #define REVISION_NUMBER 0 36 #define STEP_NUMBER 0 37 38 39 #define MAX_OMX_COMPONENT_NUM 20 40 #define MAX_OMX_COMPONENT_ROLE_NUM 10 41 #define MAX_OMX_COMPONENT_NAME_SIZE OMX_MAX_STRINGNAME_SIZE 42 #define MAX_OMX_COMPONENT_ROLE_SIZE OMX_MAX_STRINGNAME_SIZE 43 #define MAX_OMX_COMPONENT_LIBNAME_SIZE OMX_MAX_STRINGNAME_SIZE * 2 44 #define MAX_OMX_MIMETYPE_SIZE OMX_MAX_STRINGNAME_SIZE 45 46 #define MAX_TIMESTAMP 16 47 #define MAX_FLAGS 16 48 49 50 typedef enum _SEC_CODEC_TYPE 51 { 52 SW_CODEC, 53 HW_VIDEO_CODEC, 54 HW_AUDIO_CODEC 55 } SEC_CODEC_TYPE; 56 57 typedef struct _SEC_OMX_PRIORITYMGMTTYPE 58 { 59 OMX_U32 nGroupPriority; /* the value 0 represents the highest priority */ 60 /* for a group of components */ 61 OMX_U32 nGroupID; 62 } SEC_OMX_PRIORITYMGMTTYPE; 63 64 typedef enum _SEC_OMX_INDEXTYPE 65 { 66 OMX_IndexVendorThumbnailMode = 0x7F000001, 67 OMX_COMPONENT_CAPABILITY_TYPE_INDEX = 0xFF7A347 /*for Android*/ 68 } SEC_OMX_INDEXTYPE; 69 70 typedef enum _SEC_OMX_ERRORTYPE 71 { 72 OMX_ErrorNoEOF = 0x90000001, 73 OMX_ErrorInputDataDecodeYet, 74 OMX_ErrorInputDataEncodeYet, 75 OMX_ErrorMFCInit 76 } SEC_OMX_ERRORTYPE; 77 78 typedef enum _SEC_OMX_COMMANDTYPE 79 { 80 SEC_OMX_CommandComponentDeInit = 0x7F000001, 81 SEC_OMX_CommandEmptyBuffer, 82 SEC_OMX_CommandFillBuffer 83 } SEC_OMX_COMMANDTYPE; 84 85 typedef enum _SEC_OMX_TRANS_STATETYPE { 86 SEC_OMX_TransStateInvalid, 87 SEC_OMX_TransStateLoadedToIdle, 88 SEC_OMX_TransStateIdleToExecuting, 89 SEC_OMX_TransStateExecutingToIdle, 90 SEC_OMX_TransStateIdleToLoaded, 91 SEC_OMX_TransStateMax = 0X7FFFFFFF 92 } SEC_OMX_TRANS_STATETYPE; 93 94 typedef enum _SEC_OMX_COLOR_FORMATTYPE { 95 #ifndef USE_SAMSUNG_COLORFORMAT 96 SEC_OMX_COLOR_FormatNV12PhysicalAddress = OMX_COLOR_FormatYUV420SemiPlanar 97 #else 98 SEC_OMX_COLOR_FormatNV12PhysicalAddress = 0x7F000001 /**< Reserved region for introducing Vendor Extensions */ 99 #endif 100 }SEC_OMX_COLOR_FORMATTYPE; 101 102 typedef enum _SEC_OMX_SUPPORTFORMAT_TYPE 103 { 104 supportFormat_1 = 0x00, 105 supportFormat_2, 106 supportFormat_3, 107 supportFormat_4 108 } SEC_OMX_SUPPORTFORMAT_TYPE; 109 110 111 /* for Android */ 112 typedef struct _OMXComponentCapabilityFlagsType 113 { 114 /* OMX COMPONENT CAPABILITY RELATED MEMBERS */ 115 OMX_BOOL iIsOMXComponentMultiThreaded; 116 OMX_BOOL iOMXComponentSupportsExternalOutputBufferAlloc; 117 OMX_BOOL iOMXComponentSupportsExternalInputBufferAlloc; 118 OMX_BOOL iOMXComponentSupportsMovableInputBuffers; 119 OMX_BOOL iOMXComponentSupportsPartialFrames; 120 OMX_BOOL iOMXComponentUsesNALStartCodes; 121 OMX_BOOL iOMXComponentCanHandleIncompleteFrames; 122 OMX_BOOL iOMXComponentUsesFullAVCFrames; 123 } OMXComponentCapabilityFlagsType; 124 125 typedef struct _SEC_OMX_VIDEO_PROFILELEVEL 126 { 127 OMX_S32 profile; 128 OMX_S32 level; 129 } SEC_OMX_VIDEO_PROFILELEVEL; 130 131 132 #ifndef __OMX_EXPORTS 133 #define __OMX_EXPORTS 134 #define SEC_EXPORT_REF __attribute__((visibility("default"))) 135 #define SEC_IMPORT_REF __attribute__((visibility("default"))) 136 #endif 137 138 #endif 139