1 /* 2 * 3 * Copyright 2012 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 Exynos_OMX_Def.h 20 * @brief Exynos_OMX specific define 21 * @author SeungBeom Kim (sbcrux.kim (at) samsung.com) 22 * @version 2.0.0 23 * @history 24 * 2012.02.20 : Create 25 */ 26 27 #ifndef EXYNOS_OMX_DEF 28 #define EXYNOS_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 40 47 #define MAX_FLAGS 40 48 49 #define MAX_BUFFER_PLANE 3 50 51 #define EXYNOS_OMX_INSTALL_PATH "/system/lib/omx/" 52 53 typedef enum _EXYNOS_CODEC_TYPE 54 { 55 SW_CODEC, 56 HW_VIDEO_DEC_CODEC, 57 HW_VIDEO_ENC_CODEC, 58 HW_AUDIO_DEC_CODEC, 59 HW_AUDIO_ENC_CODEC 60 } EXYNOS_CODEC_TYPE; 61 62 typedef struct _EXYNOS_OMX_PRIORITYMGMTTYPE 63 { 64 OMX_U32 nGroupPriority; /* the value 0 represents the highest priority */ 65 /* for a group of components */ 66 OMX_U32 nGroupID; 67 } EXYNOS_OMX_PRIORITYMGMTTYPE; 68 69 typedef enum _EXYNOS_OMX_INDEXTYPE 70 { 71 #define EXYNOS_INDEX_PARAM_ENABLE_THUMBNAIL "OMX.SEC.index.ThumbnailMode" 72 OMX_IndexVendorThumbnailMode = 0x7F000001, 73 #define EXYNOS_INDEX_CONFIG_VIDEO_INTRAPERIOD "OMX.SEC.index.VideoIntraPeriod" 74 OMX_IndexConfigVideoIntraPeriod = 0x7F000002, 75 76 /* for Android Native Window */ 77 #define EXYNOS_INDEX_PARAM_ENABLE_ANB "OMX.google.android.index.enableAndroidNativeBuffers" 78 OMX_IndexParamEnableAndroidBuffers = 0x7F000011, 79 #define EXYNOS_INDEX_PARAM_GET_ANB "OMX.google.android.index.getAndroidNativeBufferUsage" 80 OMX_IndexParamGetAndroidNativeBuffer = 0x7F000012, 81 #define EXYNOS_INDEX_PARAM_USE_ANB "OMX.google.android.index.useAndroidNativeBuffer" 82 OMX_IndexParamUseAndroidNativeBuffer = 0x7F000013, 83 /* for Android Store Metadata Inbuffer */ 84 #define EXYNOS_INDEX_PARAM_STORE_METADATA_BUFFER "OMX.google.android.index.storeMetaDataInBuffers" 85 OMX_IndexParamStoreMetaDataBuffer = 0x7F000014, 86 87 /* for Android PV OpenCore*/ 88 OMX_COMPONENT_CAPABILITY_TYPE_INDEX = 0xFF7A347 89 } EXYNOS_OMX_INDEXTYPE; 90 91 typedef enum _EXYNOS_OMX_ERRORTYPE 92 { 93 OMX_ErrorNoEOF = (OMX_S32) 0x90000001, 94 OMX_ErrorInputDataDecodeYet = (OMX_S32) 0x90000002, 95 OMX_ErrorInputDataEncodeYet = (OMX_S32) 0x90000003, 96 OMX_ErrorCodecInit = (OMX_S32) 0x90000004, 97 OMX_ErrorCodecDecode = (OMX_S32) 0x90000005, 98 OMX_ErrorCodecEncode = (OMX_S32) 0x90000006, 99 OMX_ErrorCodecFlush = (OMX_S32) 0x90000007, 100 OMX_ErrorOutputBufferUseYet = (OMX_S32) 0x90000008 101 } EXYNOS_OMX_ERRORTYPE; 102 103 typedef enum _EXYNOS_OMX_COMMANDTYPE 104 { 105 EXYNOS_OMX_CommandComponentDeInit = 0x7F000001, 106 EXYNOS_OMX_CommandEmptyBuffer, 107 EXYNOS_OMX_CommandFillBuffer, 108 EXYNOS_OMX_CommandFakeBuffer 109 } EXYNOS_OMX_COMMANDTYPE; 110 111 typedef enum _EXYNOS_OMX_TRANS_STATETYPE { 112 EXYNOS_OMX_TransStateInvalid, 113 EXYNOS_OMX_TransStateLoadedToIdle, 114 EXYNOS_OMX_TransStateIdleToExecuting, 115 EXYNOS_OMX_TransStateExecutingToIdle, 116 EXYNOS_OMX_TransStateIdleToLoaded, 117 EXYNOS_OMX_TransStateMax = 0X7FFFFFFF 118 } EXYNOS_OMX_TRANS_STATETYPE; 119 120 typedef enum _EXYNOS_OMX_COLOR_FORMATTYPE { 121 OMX_SEC_COLOR_FormatNV12TPhysicalAddress = 0x7F000001, /**< Reserved region for introducing Vendor Extensions */ 122 OMX_SEC_COLOR_FormatNV12LPhysicalAddress = 0x7F000002, 123 OMX_SEC_COLOR_FormatNV12LVirtualAddress = 0x7F000003, 124 OMX_SEC_COLOR_FormatNV12Tiled = 0x7FC00002, /* 0x7FC00002 */ 125 OMX_SEC_COLOR_FormatNV21LPhysicalAddress = 0x7F000010, 126 OMX_SEC_COLOR_FormatNV21Linear = 0x7F000011, 127 128 /* to copy a encoded data for drm component using gsc or fimc */ 129 OMX_SEC_COLOR_FormatEncodedData = OMX_COLOR_FormatYCbYCr, 130 /* for Android SurfaceMediaSource*/ 131 OMX_COLOR_FormatAndroidOpaque = 0x7F000789 132 }EXYNOS_OMX_COLOR_FORMATTYPE; 133 134 typedef enum _EXYNOS_OMX_SUPPORTFORMAT_TYPE 135 { 136 supportFormat_0 = 0x00, 137 supportFormat_1, 138 supportFormat_2, 139 supportFormat_3, 140 supportFormat_4, 141 supportFormat_5, 142 supportFormat_6, 143 supportFormat_7 144 } EXYNOS_OMX_SUPPORTFORMAT_TYPE; 145 146 typedef enum _EXYNOS_OMX_BUFFERPROCESS_TYPE 147 { 148 BUFFER_DEFAULT = 0x00, 149 BUFFER_COPY = 0x01, 150 BUFFER_SHARE = 0x02, 151 BUFFER_METADATA = 0x04, 152 BUFFER_ANBSHARE = 0x08 153 } EXYNOS_OMX_BUFFERPROCESS_TYPE; 154 155 typedef struct _EXYNOS_OMX_VIDEO_PROFILELEVEL 156 { 157 OMX_S32 profile; 158 OMX_S32 level; 159 } EXYNOS_OMX_VIDEO_PROFILELEVEL; 160 161 #define OMX_VIDEO_CodingVPX 0x09 /**< Google VPX, formerly known as On2 VP8 */ 162 163 #ifndef __OMX_EXPORTS 164 #define __OMX_EXPORTS 165 #define EXYNOS_EXPORT_REF __attribute__((visibility("default"))) 166 #define EXYNOS_IMPORT_REF __attribute__((visibility("default"))) 167 #endif 168 169 #endif 170