aboutsummaryrefslogtreecommitdiffstats
path: root/videocodec/OMXVideoDecoderAVC.cpp
diff options
context:
space:
mode:
authorWeian Chen <weian.chen@intel.com>2012-02-22 03:26:52 -0500
committerPatrick Tjin <pattjin@google.com>2014-07-21 22:02:46 -0700
commit747c717e9477b5b660f39a2b737de5e968fa7f9d (patch)
treeed7dc9f78715b71b401b1c296825687f454060e2 /videocodec/OMXVideoDecoderAVC.cpp
parent22b1d83d8fe1abd7b218049af9a577522aa5d49c (diff)
downloadandroid_hardware_intel_common_omx-components-747c717e9477b5b660f39a2b737de5e968fa7f9d.tar.gz
android_hardware_intel_common_omx-components-747c717e9477b5b660f39a2b737de5e968fa7f9d.tar.bz2
android_hardware_intel_common_omx-components-747c717e9477b5b660f39a2b737de5e968fa7f9d.zip
omx-components: code cleanup along with one Queue buffer management support
BZ: 24552 code cleanup along with one Queue buffer management support (from Andy) Signed-off-by: Weian Chen <weian.chen@intel.com> Change-Id: I75c7f9c6058602b0cd67e1edbc7d5300ca9e0c76 Reviewed-on: http://android.intel.com:8080/36139 Reviewed-by: Chen, Weian <weian.chen@intel.com> Reviewed-by: Qiu, Junhai <junhai.qiu@intel.com> 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/OMXVideoDecoderAVC.cpp')
-rw-r--r--videocodec/OMXVideoDecoderAVC.cpp29
1 files changed, 2 insertions, 27 deletions
diff --git a/videocodec/OMXVideoDecoderAVC.cpp b/videocodec/OMXVideoDecoderAVC.cpp
index 02d0c78..60a39e3 100644
--- a/videocodec/OMXVideoDecoderAVC.cpp
+++ b/videocodec/OMXVideoDecoderAVC.cpp
@@ -36,6 +36,8 @@ OMXVideoDecoderAVC::OMXVideoDecoderAVC()
if (!mVideoDecoder) {
LOGE("createVideoDecoder failed for \"%s\"", AVC_MIME_TYPE);
}
+ // Override default native buffer count defined in the base class
+ mNativeBufferCount = OUTPORT_NATIVE_BUFFER_COUNT;
BuildHandlerList();
}
@@ -223,7 +225,6 @@ OMX_ERRORTYPE OMXVideoDecoderAVC::BuildHandlerList(void) {
OMXVideoDecoderBase::BuildHandlerList();
AddHandler(OMX_IndexParamVideoAvc, GetParamVideoAvc, SetParamVideoAvc);
AddHandler((OMX_INDEXTYPE)OMX_IndexParamIntelAVCDecodeSettings, GetParamIntelAVCDecodeSettings, SetParamIntelAVCDecodeSettings);
- AddHandler(static_cast<OMX_INDEXTYPE>(OMX_IndexExtEnableNativeBuffer),GetNativeBufferMode,SetNativeBufferMode);
AddHandler(OMX_IndexParamVideoProfileLevelQuerySupported, GetParamVideoAVCProfileLevel, SetParamVideoAVCProfileLevel);
return OMX_ErrorNone;
}
@@ -275,32 +276,6 @@ OMX_ERRORTYPE OMXVideoDecoderAVC::SetParamIntelAVCDecodeSettings(OMX_PTR pStruct
return OMX_ErrorNone;
}
-OMX_ERRORTYPE OMXVideoDecoderAVC::GetNativeBufferMode(OMX_PTR pStructure) {
- OMX_ERRORTYPE ret;
- return OMX_ErrorNone; //would not be here
-}
-
-#define MAX_OUTPUT_BUFFER_COUNT_FOR_AVC 16+1+6
-OMX_ERRORTYPE OMXVideoDecoderAVC::SetNativeBufferMode(OMX_PTR pStructure) {
- OMX_ERRORTYPE ret;
-
- //CHECK_TYPE_HEADER(param);
- CHECK_SET_PARAM_STATE();
- mNativeBufferMode = true;
- PortVideo *port = NULL;
- port = static_cast<PortVideo *>(this->ports[OUTPORT_INDEX]);
-
- OMX_PARAM_PORTDEFINITIONTYPE port_def;
- memcpy(&port_def,port->GetPortDefinition(),sizeof(port_def));
- port_def.nBufferCountMin = 1;
- port_def.nBufferCountActual = MAX_OUTPUT_BUFFER_COUNT_FOR_AVC;
- port_def.format.video.cMIMEType = (OMX_STRING)VA_VED_RAW_MIME_TYPE;
- port_def.format.video.eColorFormat = static_cast<OMX_COLOR_FORMATTYPE>(VA_VED_COLOR_FORMAT);
- port->SetPortDefinition(&port_def,true);
-
- return OMX_ErrorNone;
-}
-
OMX_ERRORTYPE OMXVideoDecoderAVC::GetParamVideoAVCProfileLevel(OMX_PTR pStructure) {
OMX_ERRORTYPE ret;
OMX_VIDEO_PARAM_PROFILELEVELTYPE *p = (OMX_VIDEO_PARAM_PROFILELEVELTYPE *)pStructure;