summaryrefslogtreecommitdiffstats
path: root/sec_mm
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2011-08-08 16:06:41 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-08 16:06:41 -0700
commitc97c6029afa0d6c4783d6f62767852a9d962cf43 (patch)
tree8f397f622b9aaefbca5365779a9dea61a52193a2 /sec_mm
parent454a891e495400bde08d5d5c9bdb4b8e8b9c41d6 (diff)
parentc40b6cc54765030d29acb54bd957c38f633cd5ea (diff)
downloaddevice_samsung_crespo-c97c6029afa0d6c4783d6f62767852a9d962cf43.zip
device_samsung_crespo-c97c6029afa0d6c4783d6f62767852a9d962cf43.tar.gz
device_samsung_crespo-c97c6029afa0d6c4783d6f62767852a9d962cf43.tar.bz2
Merge "Reduce buffer count in Android native buffer mode"
Diffstat (limited to 'sec_mm')
-rw-r--r--sec_mm/sec_omx/sec_omx_component/video/dec/SEC_OMX_Vdec.c11
-rw-r--r--sec_mm/sec_omx/sec_omx_component/video/dec/SEC_OMX_Vdec.h3
2 files changed, 14 insertions, 0 deletions
diff --git a/sec_mm/sec_omx/sec_omx_component/video/dec/SEC_OMX_Vdec.c b/sec_mm/sec_omx/sec_omx_component/video/dec/SEC_OMX_Vdec.c
index 6dd72a1..30a1acb 100644
--- a/sec_mm/sec_omx/sec_omx_component/video/dec/SEC_OMX_Vdec.c
+++ b/sec_mm/sec_omx/sec_omx_component/video/dec/SEC_OMX_Vdec.c
@@ -1208,6 +1208,17 @@ OMX_ERRORTYPE SEC_OMX_VideoDecodeSetParameter(
}
ret = enableAndroidNativeBuffer(hComponent, ComponentParameterStructure);
+ if (ret == OMX_ErrorNone) {
+ SEC_OMX_BASECOMPONENT *pOMXComponent = (OMX_COMPONENTTYPE *)hComponent;
+ SEC_OMX_BASEPORT *pSECPort = &pSECComponent->pSECPort[OUTPUT_PORT_INDEX];
+ if (pSECPort->bUseAndroidNativeBuffer) {
+ pSECPort->portDefinition.nBufferCountActual = ANDROID_MAX_VIDEO_OUTPUTBUFFER_NUM;
+ pSECPort->portDefinition.nBufferCountMin = ANDROID_MAX_VIDEO_OUTPUTBUFFER_NUM;
+ } else {
+ pSECPort->portDefinition.nBufferCountActual = MAX_VIDEO_OUTPUTBUFFER_NUM;
+ pSECPort->portDefinition.nBufferCountMin = MAX_VIDEO_OUTPUTBUFFER_NUM;
+ }
+ }
}
break;
case OMX_IndexParamUseAndroidNativeBuffer:
diff --git a/sec_mm/sec_omx/sec_omx_component/video/dec/SEC_OMX_Vdec.h b/sec_mm/sec_omx/sec_omx_component/video/dec/SEC_OMX_Vdec.h
index b7f71da..d9e9d9e 100644
--- a/sec_mm/sec_omx/sec_omx_component/video/dec/SEC_OMX_Vdec.h
+++ b/sec_mm/sec_omx/sec_omx_component/video/dec/SEC_OMX_Vdec.h
@@ -48,6 +48,9 @@
#define INPUT_PORT_SUPPORTFORMAT_NUM_MAX 1
#define OUTPUT_PORT_SUPPORTFORMAT_NUM_MAX 3
+#ifdef USE_ANDROID_EXTENSION
+#define ANDROID_MAX_VIDEO_OUTPUTBUFFER_NUM 1
+#endif
typedef struct
{