aboutsummaryrefslogtreecommitdiffstats
path: root/videocodec/OMXVideoEncoderMPEG4.cpp
diff options
context:
space:
mode:
authorYanli <yanli@yanli-HP-Compaq-8100-Elite-SFF-PC.(none)>2012-10-08 17:19:02 +0800
committerPatrick Tjin <pattjin@google.com>2014-07-21 22:02:49 -0700
commitcae415b84125ffc14bfdb121394a60b74d506f48 (patch)
tree0ad681c0a656bef3f4d554867ad493a22c4bede8 /videocodec/OMXVideoEncoderMPEG4.cpp
parenteb4e0f24d9e07fc733cf93cc883ecb9ab830b896 (diff)
downloadandroid_hardware_intel_common_omx-components-cae415b84125ffc14bfdb121394a60b74d506f48.tar.gz
android_hardware_intel_common_omx-components-cae415b84125ffc14bfdb121394a60b74d506f48.tar.bz2
android_hardware_intel_common_omx-components-cae415b84125ffc14bfdb121394a60b74d506f48.zip
omx-components: fix CTS MediaCodecListTest failure issue
BZ: 54024 Implement interface for GetParam with OMX_IndexParamVideoProfileLevelQuerySupported correctly for openmax encode component. Change-Id: If53ca95e57b950e50b29c6efbc431d85b0839210 Signed-off-by: Zhang Yanli <yanli.l.zhang@intel.com> Reviewed-on: http://android.intel.com:8080/69235 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/OMXVideoEncoderMPEG4.cpp')
-rw-r--r--videocodec/OMXVideoEncoderMPEG4.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/videocodec/OMXVideoEncoderMPEG4.cpp b/videocodec/OMXVideoEncoderMPEG4.cpp
index d9273f4..918b391 100644
--- a/videocodec/OMXVideoEncoderMPEG4.cpp
+++ b/videocodec/OMXVideoEncoderMPEG4.cpp
@@ -240,9 +240,38 @@ out:
OMX_ERRORTYPE OMXVideoEncoderMPEG4::BuildHandlerList(void) {
OMXVideoEncoderBase::BuildHandlerList();
AddHandler(OMX_IndexParamVideoMpeg4, GetParamVideoMpeg4, SetParamVideoMpeg4);
+ AddHandler(OMX_IndexParamVideoProfileLevelQuerySupported, GetParamVideoProfileLevelQuerySupported, SetParamVideoProfileLevelQuerySupported);
return OMX_ErrorNone;
}
+
+OMX_ERRORTYPE OMXVideoEncoderMPEG4::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_MPEG4ProfileSimple, OMX_VIDEO_MPEG4Level5},
+ };
+
+ 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 OMXVideoEncoderMPEG4::SetParamVideoProfileLevelQuerySupported(OMX_PTR pStructure) {
+ LOGW("SetParamVideoMpeg4ProfileLevel is not supported.");
+ return OMX_ErrorUnsupportedSetting;
+}
+
OMX_ERRORTYPE OMXVideoEncoderMPEG4::GetParamVideoMpeg4(OMX_PTR pStructure) {
OMX_ERRORTYPE ret;
OMX_VIDEO_PARAM_MPEG4TYPE *p = (OMX_VIDEO_PARAM_MPEG4TYPE *)pStructure;