aboutsummaryrefslogtreecommitdiffstats
path: root/videocodec/OMXVideoDecoderBase.cpp
diff options
context:
space:
mode:
authorfxiao4X <fengx.xiao@intel.com>2012-05-30 13:27:20 +0800
committerPatrick Tjin <pattjin@google.com>2014-07-21 22:02:47 -0700
commitd6c7520eb91e7e825cf9a9e669e51fda5e037525 (patch)
tree7acd4f5b5d2da38c5286cbb0cbe874fe1799bba9 /videocodec/OMXVideoDecoderBase.cpp
parentbc7b7fbfa1007b823a7e09c43d71bbee57f1f1ae (diff)
downloadandroid_hardware_intel_common_omx-components-d6c7520eb91e7e825cf9a9e669e51fda5e037525.tar.gz
android_hardware_intel_common_omx-components-d6c7520eb91e7e825cf9a9e669e51fda5e037525.tar.bz2
android_hardware_intel_common_omx-components-d6c7520eb91e7e825cf9a9e669e51fda5e037525.zip
[PORT FROM R3]Add native buffer mode param checking
BZ: 38732 If param->enable is false, the component won't enable native buffer mode Change-Id: Icba5ae45ab40aff16b0b390ca2a3269406333eca Signed-off-by: fxiao4X <fengx.xiao@intel.com> Reviewed-on: http://android.intel.com:8080/50597 Reviewed-by: Ding, Haitao <haitao.ding@intel.com> Tested-by: Ding, Haitao <haitao.ding@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
Diffstat (limited to 'videocodec/OMXVideoDecoderBase.cpp')
-rwxr-xr-xvideocodec/OMXVideoDecoderBase.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/videocodec/OMXVideoDecoderBase.cpp b/videocodec/OMXVideoDecoderBase.cpp
index f82fa05..6b66421 100755
--- a/videocodec/OMXVideoDecoderBase.cpp
+++ b/videocodec/OMXVideoDecoderBase.cpp
@@ -277,12 +277,13 @@ OMX_ERRORTYPE OMXVideoDecoderBase::ProcessorPreFreeBuffer(OMX_U32 nPortIndex, OM
if (mNativeBufferMode && buffer->nOutputPortIndex == OUTPORT_INDEX){
Decode_Status status;
if(mVideoDecoder == NULL){
- LOGE("PreProcessBuffer: Video decoder is not created");
+ LOGW("ProcessorPreFillBuffer: Video decoder is not created");
return OMX_ErrorDynamicResourcesUnavailable;
}
status = mVideoDecoder->signalRenderDone(buffer->pBuffer);
if (status != DECODE_SUCCESS) {
+ LOGW("ProcessorPreFillBuffer:: signalRenderDone return error");
return TranslateDecodeStatus(status);
}
} else if (buffer->pPlatformPrivate && buffer->nOutputPortIndex == OUTPORT_INDEX){
@@ -746,7 +747,16 @@ OMX_ERRORTYPE OMXVideoDecoderBase::GetNativeBufferMode(OMX_PTR pStructure) {
OMX_ERRORTYPE OMXVideoDecoderBase::SetNativeBufferMode(OMX_PTR pStructure) {
OMX_ERRORTYPE ret;
+ EnableAndroidNativeBuffersParams *param = (EnableAndroidNativeBuffersParams*)pStructure;
+
+ CHECK_TYPE_HEADER(param);
+ CHECK_PORT_INDEX_RANGE(param);
CHECK_SET_PARAM_STATE();
+
+ if (!param->enable) {
+ mNativeBufferMode = false;
+ return OMX_ErrorNone;
+ }
mNativeBufferMode = true;
PortVideo *port = NULL;
port = static_cast<PortVideo *>(this->ports[OUTPORT_INDEX]);