diff options
author | Uma Mehta <umamehta@codeaurora.org> | 2017-07-05 12:32:33 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-07-25 01:04:09 -0700 |
commit | 82b6835fef5761efd9144a79203deb32b43800be (patch) | |
tree | 4daa4d38a1d8bdf070a317d4fc28d39a17d8aca8 /mm-core/inc | |
parent | c989f7319c543164d6e0182a78a9ea1cddc29124 (diff) | |
download | media-82b6835fef5761efd9144a79203deb32b43800be.tar.gz |
mm-video-v4l2: add support to get extradatatype
Adding support to get Extradata Types
and corresponding index
Change-Id: I6fabdad62707050e2d7d27c80ab47679afe1ef26
Diffstat (limited to 'mm-core/inc')
-rw-r--r-- | mm-core/inc/OMX_QCOMExtns.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mm-core/inc/OMX_QCOMExtns.h b/mm-core/inc/OMX_QCOMExtns.h index a5108c84..3bf3dd93 100644 --- a/mm-core/inc/OMX_QCOMExtns.h +++ b/mm-core/inc/OMX_QCOMExtns.h @@ -45,6 +45,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////// #include "OMX_Core.h" #include "OMX_Video.h" +#include "string.h" #define OMX_VIDEO_MAX_HP_LAYERS 6 @@ -1386,6 +1387,34 @@ typedef enum OMX_QCOM_EXTRADATATYPE OMX_ExtraDataOutputCropInfo = 0x7F000014, } OMX_QCOM_EXTRADATATYPE; +struct ExtraDataMap { + const char *type; + OMX_QCOM_EXTRADATATYPE index; +}; +static const struct ExtraDataMap kExtradataMap[] = { + { "ltrinfo", OMX_ExtraDataVideoLTRInfo }, + { "mbinfo", OMX_ExtraDataVideoEncoderMBInfo }, +}; + +static inline OMX_S32 getIndexForExtradataType(char * type) { + if(type == NULL) return -1; + for(int i = 0; i< (int)(sizeof(kExtradataMap)/ sizeof(struct ExtraDataMap)); i++){ + if(!strcmp(kExtradataMap[i].type,type)){ + return kExtradataMap[i].index; + } + } + return -1; +} + +static inline const char * getStringForExtradataType(int64_t index) { + for(int i = 0; i< (int)(sizeof(kExtradataMap)/sizeof(struct ExtraDataMap)); i++){ + if(kExtradataMap[i].index == index){ + return kExtradataMap[i].type; + } + } + return NULL; +} + typedef struct OMX_STREAMINTERLACEFORMATTYPE { OMX_U32 nSize; OMX_VERSIONTYPE nVersion; |