summaryrefslogtreecommitdiffstats
path: root/sec_mm
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-08-14 15:16:27 -0700
committerJames Dong <jdong@google.com>2011-08-15 18:04:48 -0700
commit4017773461651adeedef4b0c697ffeb83174a635 (patch)
tree45b84bf865a89817fb7e6f0faf2ba12e7d909b33 /sec_mm
parent5a3b88bce08e8ac1b2a7dd01daa5149ff781584a (diff)
downloaddevice_samsung_crespo-4017773461651adeedef4b0c697ffeb83174a635.zip
device_samsung_crespo-4017773461651adeedef4b0c697ffeb83174a635.tar.gz
device_samsung_crespo-4017773461651adeedef4b0c697ffeb83174a635.tar.bz2
Advertise smaller input buffer size when metadata buffer mode is used for video encoding
related-to-bug: 5161131 Change-Id: I891ea6d79fdaeab1b4e3e95e73326ebe6faacc3e
Diffstat (limited to 'sec_mm')
-rw-r--r--sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Basecomponent.c7
-rw-r--r--sec_mm/sec_omx/sec_omx_include/sec/SEC_OMX_Def.h6
2 files changed, 13 insertions, 0 deletions
diff --git a/sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Basecomponent.c b/sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Basecomponent.c
index 170600a..d151e52 100644
--- a/sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Basecomponent.c
+++ b/sec_mm/sec_omx/sec_omx_component/common/SEC_OMX_Basecomponent.c
@@ -905,6 +905,13 @@ OMX_ERRORTYPE SEC_OMX_GetParameter(
pSECPort = &pSECComponent->pSECPort[portIndex];
SEC_OSAL_Memcpy(portDefinition, &pSECPort->portDefinition, portDefinition->nSize);
+
+#ifdef USE_ANDROID_EXTENSION
+ if (portIndex == 0 && pSECPort->bStoreMetaDataInBuffer == OMX_TRUE) {
+ portDefinition->nBufferSize = MAX_INPUT_METADATA_BUFFER_SIZE;
+ }
+#endif
+
}
break;
case OMX_IndexParamPriorityMgmt:
diff --git a/sec_mm/sec_omx/sec_omx_include/sec/SEC_OMX_Def.h b/sec_mm/sec_omx/sec_omx_include/sec/SEC_OMX_Def.h
index d25cde4..0b792b5 100644
--- a/sec_mm/sec_omx/sec_omx_include/sec/SEC_OMX_Def.h
+++ b/sec_mm/sec_omx/sec_omx_include/sec/SEC_OMX_Def.h
@@ -48,6 +48,12 @@
#define USE_ANDROID_EXTENSION
+#ifdef USE_ANDROID_EXTENSION
+// The largest metadata buffer size advertised
+// when metadata buffer mode is used for video encoding
+#define MAX_INPUT_METADATA_BUFFER_SIZE (64)
+#endif
+
typedef enum _SEC_CODEC_TYPE
{
SW_CODEC,