aboutsummaryrefslogtreecommitdiffstats
path: root/videocodec/OMXVideoDecoderBase.cpp
diff options
context:
space:
mode:
authorTianmi Chen <tianmi.chen@intel.com>2014-04-02 16:30:22 +0800
committerPatrick Tjin <pattjin@google.com>2014-07-21 22:02:58 -0700
commit03118b9de04779e0aca0da6fe6fe5b0b0704a11c (patch)
treebd38e3b0aebcade6762d84313fd11a2762422c2c /videocodec/OMXVideoDecoderBase.cpp
parent41b0a4ad3d79b54a6899bec9603bb40537a2db5c (diff)
downloadandroid_hardware_intel_common_omx-components-03118b9de04779e0aca0da6fe6fe5b0b0704a11c.tar.gz
android_hardware_intel_common_omx-components-03118b9de04779e0aca0da6fe6fe5b0b0704a11c.tar.bz2
android_hardware_intel_common_omx-components-03118b9de04779e0aca0da6fe6fe5b0b0704a11c.zip
omx-component: set max buffer count in case of adaptive playback
BZ: 184541 set max buffer count in case of adaptive playback Change-Id: I7ee45256a9219458f11fda2981ab6ca532d9ff81 Signed-off-by: Tianmi Chen <tianmi.chen@intel.com>
Diffstat (limited to 'videocodec/OMXVideoDecoderBase.cpp')
-rw-r--r--videocodec/OMXVideoDecoderBase.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/videocodec/OMXVideoDecoderBase.cpp b/videocodec/OMXVideoDecoderBase.cpp
index c7eafbc..4815c3e 100644
--- a/videocodec/OMXVideoDecoderBase.cpp
+++ b/videocodec/OMXVideoDecoderBase.cpp
@@ -867,7 +867,11 @@ OMX_ERRORTYPE OMXVideoDecoderBase::SetNativeBufferMode(OMX_PTR pStructure) {
OMX_PARAM_PORTDEFINITIONTYPE port_def;
memcpy(&port_def,port->GetPortDefinition(),sizeof(port_def));
port_def.nBufferCountMin = 1;
- port_def.nBufferCountActual = mNativeBufferCount;
+ if (mEnableAdaptivePlayback) {
+ SetMaxOutputBufferCount(&port_def);
+ } else {
+ port_def.nBufferCountActual = mNativeBufferCount;
+ }
port_def.format.video.cMIMEType = (OMX_STRING)VA_VED_RAW_MIME_TYPE;
port_def.format.video.eColorFormat = OMX_INTEL_COLOR_FormatYUV420PackedSemiPlanar;
port_def.format.video.nFrameHeight = (port_def.format.video.nFrameHeight + 0x1f) & ~0x1f;
@@ -968,3 +972,7 @@ OMX_COLOR_FORMATTYPE OMXVideoDecoderBase::GetOutputColorFormat(int width, int he
}
#endif
}
+
+OMX_ERRORTYPE OMXVideoDecoderBase::SetMaxOutputBufferCount(OMX_PARAM_PORTDEFINITIONTYPE *p) {
+ return OMX_ErrorNone;
+}