diff options
author | SeungBeom Kim <sbcrux.kim@samsung.com> | 2011-08-18 14:31:44 +0900 |
---|---|---|
committer | James Dong <jdong@google.com> | 2011-08-19 14:41:13 -0700 |
commit | a611a69baacf9765acc26ec1452cca64dd46f1bd (patch) | |
tree | 307c672c258faa8854fe68cb706dab0499bdf9a5 /sec_mm | |
parent | 6a4e3eaae7232c607aa19c8fc376fb1e894eb413 (diff) | |
download | device_samsung_crespo-a611a69baacf9765acc26ec1452cca64dd46f1bd.zip device_samsung_crespo-a611a69baacf9765acc26ec1452cca64dd46f1bd.tar.gz device_samsung_crespo-a611a69baacf9765acc26ec1452cca64dd46f1bd.tar.bz2 |
move metadata buffer specific code handling to SEC_OMXVenc.c
Change-Id: I261277e5b1a3b8f80e13dd076c7570c6f97346a5
Signed-off-by: SeungBeom Kim <sbcrux.kim@samsung.com>
Diffstat (limited to 'sec_mm')
4 files changed, 30 insertions, 12 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 d151e52..170600a 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,13 +905,6 @@ 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_component/video/enc/SEC_OMX_Venc.c b/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.c index 2f8d5f2..87f5c3e 100644 --- a/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.c +++ b/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.c @@ -1138,6 +1138,31 @@ OMX_ERRORTYPE SEC_OMX_VideoEncodeGetParameter( ret = OMX_ErrorNone; } break; + case OMX_IndexParamPortDefinition: + { + OMX_PARAM_PORTDEFINITIONTYPE *portDefinition = (OMX_PARAM_PORTDEFINITIONTYPE *)ComponentParameterStructure; + OMX_U32 portIndex = portDefinition->nPortIndex; + SEC_OMX_BASEPORT *pSECPort; + + if (portIndex >= pSECComponent->portParam.nPorts) { + ret = OMX_ErrorBadPortIndex; + goto EXIT; + } + ret = SEC_OMX_Check_SizeVersion(portDefinition, sizeof(OMX_PARAM_PORTDEFINITIONTYPE)); + if (ret != OMX_ErrorNone) { + goto EXIT; + } + + 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; default: { ret = SEC_OMX_GetParameter(hComponent, nParamIndex, ComponentParameterStructure); diff --git a/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.h b/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.h index 93d2800..be439c8 100644 --- a/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.h +++ b/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.h @@ -47,6 +47,11 @@ #define INPUT_PORT_SUPPORTFORMAT_NUM_MAX 3 #define OUTPUT_PORT_SUPPORTFORMAT_NUM_MAX 1 +#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 struct { 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 0b792b5..cf154ff 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,11 +48,6 @@ #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 { |