Home | History | Annotate | Download | only in sec
      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        17
     47 #define MAX_FLAGS            17
     48 
     49 #define USE_ANDROID_EXTENSION
     50 
     51 
     52 typedef enum _SEC_CODEC_TYPE
     53 {
     54     SW_CODEC,
     55     HW_VIDEO_CODEC,
     56     HW_AUDIO_CODEC
     57 } SEC_CODEC_TYPE;
     58 
     59 typedef struct _SEC_OMX_PRIORITYMGMTTYPE
     60 {
     61     OMX_U32 nGroupPriority; /* the value 0 represents the highest priority */
     62                             /* for a group of components                   */
     63     OMX_U32 nGroupID;
     64 } SEC_OMX_PRIORITYMGMTTYPE;
     65 
     66 typedef enum _SEC_OMX_INDEXTYPE
     67 {
     68 #define SEC_INDEX_PARAM_ENABLE_THUMBNAIL "OMX.SEC.index.ThumbnailMode"
     69     OMX_IndexVendorThumbnailMode        = 0x7F000001,
     70 
     71     /* for Android Native Window */
     72 #define SEC_INDEX_PARAM_ENABLE_ANB "OMX.google.android.index.enableAndroidNativeBuffers"
     73     OMX_IndexParamEnableAndroidBuffers    = 0x7F000011,
     74 #define SEC_INDEX_PARAM_GET_ANB "OMX.google.android.index.getAndroidNativeBufferUsage"
     75     OMX_IndexParamGetAndroidNativeBuffer  = 0x7F000012,
     76 #define SEC_INDEX_PARAM_USE_ANB "OMX.google.android.index.useAndroidNativeBuffer"
     77     OMX_IndexParamUseAndroidNativeBuffer  = 0x7F000013,
     78     /* for Android Store Metadata Inbuffer */
     79 #define SEC_INDEX_PARAM_STORE_METADATA_BUFFER "OMX.google.android.index.storeMetaDataInBuffers"
     80     OMX_IndexParamStoreMetaDataBuffer     = 0x7F000014,
     81 
     82     /* for Android PV OpenCore*/
     83     OMX_COMPONENT_CAPABILITY_TYPE_INDEX = 0xFF7A347
     84 } SEC_OMX_INDEXTYPE;
     85 
     86 typedef enum _SEC_OMX_ERRORTYPE
     87 {
     88     OMX_ErrorNoEOF = 0x90000001,
     89     OMX_ErrorInputDataDecodeYet,
     90     OMX_ErrorInputDataEncodeYet,
     91     OMX_ErrorMFCInit
     92 } SEC_OMX_ERRORTYPE;
     93 
     94 typedef enum _SEC_OMX_COMMANDTYPE
     95 {
     96     SEC_OMX_CommandComponentDeInit = 0x7F000001,
     97     SEC_OMX_CommandEmptyBuffer,
     98     SEC_OMX_CommandFillBuffer
     99 } SEC_OMX_COMMANDTYPE;
    100 
    101 typedef enum _SEC_OMX_TRANS_STATETYPE {
    102     SEC_OMX_TransStateInvalid,
    103     SEC_OMX_TransStateLoadedToIdle,
    104     SEC_OMX_TransStateIdleToExecuting,
    105     SEC_OMX_TransStateExecutingToIdle,
    106     SEC_OMX_TransStateIdleToLoaded,
    107     SEC_OMX_TransStateMax = 0X7FFFFFFF
    108 } SEC_OMX_TRANS_STATETYPE;
    109 
    110 typedef enum _SEC_OMX_COLOR_FORMATTYPE {
    111     OMX_SEC_COLOR_FormatNV12TPhysicalAddress = 0x7F000001, /**< Reserved region for introducing Vendor Extensions */
    112     /* for Android Native Window */
    113     OMX_SEC_COLOR_FormatANBYUV420SemiPlanar = 0x100,
    114     /* for Android surface texture encode */
    115     OMX_COLOR_FormatAndroidOpaque = 0x7F000789
    116 }SEC_OMX_COLOR_FORMATTYPE;
    117 
    118 typedef enum _SEC_OMX_SUPPORTFORMAT_TYPE
    119 {
    120     supportFormat_0 = 0x00,
    121     supportFormat_1,
    122     supportFormat_2,
    123     supportFormat_3
    124 } SEC_OMX_SUPPORTFORMAT_TYPE;
    125 
    126 
    127 /* for Android */
    128 typedef struct _OMXComponentCapabilityFlagsType
    129 {
    130     /* OMX COMPONENT CAPABILITY RELATED MEMBERS */
    131     OMX_BOOL iIsOMXComponentMultiThreaded;
    132     OMX_BOOL iOMXComponentSupportsExternalOutputBufferAlloc;
    133     OMX_BOOL iOMXComponentSupportsExternalInputBufferAlloc;
    134     OMX_BOOL iOMXComponentSupportsMovableInputBuffers;
    135     OMX_BOOL iOMXComponentSupportsPartialFrames;
    136     OMX_BOOL iOMXComponentUsesNALStartCodes;
    137     OMX_BOOL iOMXComponentCanHandleIncompleteFrames;
    138     OMX_BOOL iOMXComponentUsesFullAVCFrames;
    139 } OMXComponentCapabilityFlagsType;
    140 
    141 typedef struct _SEC_OMX_VIDEO_PROFILELEVEL
    142 {
    143     OMX_S32  profile;
    144     OMX_S32  level;
    145 } SEC_OMX_VIDEO_PROFILELEVEL;
    146 
    147 
    148 #ifndef __OMX_EXPORTS
    149 #define __OMX_EXPORTS
    150 #define SEC_EXPORT_REF __attribute__((visibility("default")))
    151 #define SEC_IMPORT_REF __attribute__((visibility("default")))
    152 #endif
    153 
    154 #endif
    155