diff options
author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-07-25 15:39:26 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-07-25 15:39:26 -0700 |
commit | 3e207173067eb7c8b608aefe06566cd69815e7c9 (patch) | |
tree | 0c94f7316eb9b8a7c7195fdf300e89b7270f744c /mm-core | |
parent | 8303c394878cf9f6804dccdfd8dd285840ce38f3 (diff) | |
parent | 82b6835fef5761efd9144a79203deb32b43800be (diff) | |
download | media-3e207173067eb7c8b608aefe06566cd69815e7c9.tar.gz |
Merge "mm-video-v4l2: add support to get extradatatype"
Diffstat (limited to 'mm-core')
-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; |