diff options
Diffstat (limited to 'sec_mm')
-rw-r--r-- | sec_mm/sec_omx/sec_omx_component/video/dec/SEC_OMX_Vdec.c | 11 | ||||
-rw-r--r-- | sec_mm/sec_omx/sec_omx_component/video/dec/SEC_OMX_Vdec.h | 3 |
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 { |