From 186cf3638a4f387568fe2590e81a1a8a23c054e4 Mon Sep 17 00:00:00 2001 From: liubolun Date: Wed, 22 Jan 2014 15:19:48 +0800 Subject: Refine setting config max frame size for VP8 in OMX IL. BZ: 166007 Modify the implementation of this interface in OMX IL. It only pass down the ratio not the real size to libmix. Fix buildbot -1 issue Change-Id: Ifeaf169e4d26e13f99910e8e4e6053b945f71c3f Signed-off-by: liubolun --- videocodec/OMXVideoEncoderVP8.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'videocodec/OMXVideoEncoderVP8.cpp') diff --git a/videocodec/OMXVideoEncoderVP8.cpp b/videocodec/OMXVideoEncoderVP8.cpp index 8786f6e..2ae6905 100644 --- a/videocodec/OMXVideoEncoderVP8.cpp +++ b/videocodec/OMXVideoEncoderVP8.cpp @@ -193,7 +193,7 @@ OMX_ERRORTYPE OMXVideoEncoderVP8::BuildHandlerList(void) { AddHandler((OMX_INDEXTYPE)OMX_IndexParamVideoVp8, GetParamVideoVp8, SetParamVideoVp8); AddHandler((OMX_INDEXTYPE)OMX_IndexConfigVideoVp8ReferenceFrame, GetConfigVideoVp8ReferenceFrame, SetConfigVideoVp8ReferenceFrame); AddHandler((OMX_INDEXTYPE)OMX_IndexExtVP8ForceKFrame, GetConfigVp8ForceKFrame, SetConfigVp8ForceKFrame); - AddHandler((OMX_INDEXTYPE)OMX_IndexExtVP8MaxFrameSize, GetConfigVp8MaxFrameSize, SetConfigVp8MaxFrameSize); + AddHandler((OMX_INDEXTYPE)OMX_IndexExtVP8MaxFrameSizeRatio, GetConfigVp8MaxFrameSizeRatio, SetConfigVp8MaxFrameSizeRatio); return OMX_ErrorNone; } @@ -280,26 +280,26 @@ OMX_ERRORTYPE OMXVideoEncoderVP8::SetConfigVp8ForceKFrame(OMX_PTR pStructure) { return OMX_ErrorNone; } -OMX_ERRORTYPE OMXVideoEncoderVP8::GetConfigVp8MaxFrameSize(OMX_PTR pStructure) { +OMX_ERRORTYPE OMXVideoEncoderVP8::GetConfigVp8MaxFrameSizeRatio(OMX_PTR pStructure) { return OMX_ErrorNone; } -OMX_ERRORTYPE OMXVideoEncoderVP8::SetConfigVp8MaxFrameSize(OMX_PTR pStructure) { +OMX_ERRORTYPE OMXVideoEncoderVP8::SetConfigVp8MaxFrameSizeRatio(OMX_PTR pStructure) { OMX_ERRORTYPE ret; Encode_Status retStatus = ENCODE_SUCCESS; - OMX_VIDEO_CONFIG_INTEL_VP8_MAX_FRAME_SIZE *p = (OMX_VIDEO_CONFIG_INTEL_VP8_MAX_FRAME_SIZE*)pStructure; + OMX_VIDEO_CONFIG_INTEL_VP8_MAX_FRAME_SIZE_RATIO *p = (OMX_VIDEO_CONFIG_INTEL_VP8_MAX_FRAME_SIZE_RATIO*)pStructure; CHECK_TYPE_HEADER(p); CHECK_PORT_INDEX(p, OUTPORT_INDEX); CHECK_SET_CONFIG_STATE(); - VideoConfigVP8MaxFrameSize configVP8MaxFrameSize; - configVP8MaxFrameSize.max_frame_size = p->nMaxFrameSize; + VideoConfigVP8MaxFrameSizeRatio configVP8MaxFrameSizeRatio; + configVP8MaxFrameSizeRatio.max_frame_size_ratio = p->nMaxFrameSizeRatio; - retStatus = mVideoEncoder->setConfig(&configVP8MaxFrameSize); + retStatus = mVideoEncoder->setConfig(&configVP8MaxFrameSizeRatio); if(retStatus != ENCODE_SUCCESS) { - LOGW("Failed to set vp8 max frame size"); + LOGW("Failed to set vp8 max frame size ratio"); } return OMX_ErrorNone; -- cgit v1.2.3