diff options
| author | Yanli <yanli@yanli-HP-Compaq-8100-Elite-SFF-PC.(none)> | 2012-09-25 16:54:53 +0800 |
|---|---|---|
| committer | Patrick Tjin <pattjin@google.com> | 2014-07-21 22:02:48 -0700 |
| commit | c28131c7f4fd7a6506e46cededc4ae2657dd75de (patch) | |
| tree | 4d19b9bf49bb86676de195604de3266313eb631e /videocodec/OMXVideoEncoderH263.cpp | |
| parent | 5392514b1aff96ce5eb13b28fe2099d54bbd59d1 (diff) | |
| download | android_hardware_intel_common_omx-components-c28131c7f4fd7a6506e46cededc4ae2657dd75de.tar.gz android_hardware_intel_common_omx-components-c28131c7f4fd7a6506e46cededc4ae2657dd75de.tar.bz2 android_hardware_intel_common_omx-components-c28131c7f4fd7a6506e46cededc4ae2657dd75de.zip | |
omx-components: fix CTS MediaCodecListTest failure issue
BZ: 54024
Implement interface for GetParam with OMX_IndexParamVideoProfileLevelQuerySupported correctly for openmax encode component.
Change-Id: I29d318e62ee3d3b1a105b01b34af4576006997ac
Signed-off-by: Yanli <yanli@yanli-HP-Compaq-8100-Elite-SFF-PC.(none)>
Reviewed-on: http://android.intel.com:8080/67661
Reviewed-by: Yuan, Shengquan <shengquan.yuan@intel.com>
Reviewed-by: Shi, PingX <pingx.shi@intel.com>
Tested-by: Shi, PingX <pingx.shi@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
Diffstat (limited to 'videocodec/OMXVideoEncoderH263.cpp')
| -rw-r--r-- | videocodec/OMXVideoEncoderH263.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/videocodec/OMXVideoEncoderH263.cpp b/videocodec/OMXVideoEncoderH263.cpp index 15572a4..84cc9a8 100644 --- a/videocodec/OMXVideoEncoderH263.cpp +++ b/videocodec/OMXVideoEncoderH263.cpp @@ -236,9 +236,37 @@ out: OMX_ERRORTYPE OMXVideoEncoderH263::BuildHandlerList(void) { OMXVideoEncoderBase::BuildHandlerList(); AddHandler(OMX_IndexParamVideoH263, GetParamVideoH263, SetParamVideoH263); + AddHandler(OMX_IndexParamVideoProfileLevelQuerySupported, GetParamVideoProfileLevelQuerySupported, SetParamVideoProfileLevelQuerySupported); return OMX_ErrorNone; } +OMX_ERRORTYPE OMXVideoEncoderH263::GetParamVideoProfileLevelQuerySupported(OMX_PTR pStructure) { + OMX_ERRORTYPE ret; + OMX_VIDEO_PARAM_PROFILELEVELTYPE *p = (OMX_VIDEO_PARAM_PROFILELEVELTYPE *)pStructure; + CHECK_TYPE_HEADER(p); + CHECK_PORT_INDEX(p, OUTPORT_INDEX); + + struct ProfileLevelTable { + OMX_U32 profile; + OMX_U32 level; + } plTable[] = { + {OMX_VIDEO_H263ProfileBaseline, OMX_VIDEO_H263Level45} + }; + + OMX_U32 count = sizeof(plTable)/sizeof(ProfileLevelTable); + CHECK_ENUMERATION_RANGE(p->nProfileIndex,count); + + p->eProfile = plTable[p->nProfileIndex].profile; + p->eLevel = plTable[p->nProfileIndex].level; + + return OMX_ErrorNone; +} + +OMX_ERRORTYPE OMXVideoEncoderH263::SetParamVideoProfileLevelQuerySupported(OMX_PTR pStructure) { + LOGW("SetParamVideoH263ProfileLevel is not supported."); + return OMX_ErrorUnsupportedSetting; +} + OMX_ERRORTYPE OMXVideoEncoderH263::GetParamVideoH263(OMX_PTR pStructure) { OMX_ERRORTYPE ret; OMX_VIDEO_PARAM_H263TYPE *p = (OMX_VIDEO_PARAM_H263TYPE *)pStructure; |
