From 9e964f98a366c756b96a97809b31579fdcc43e97 Mon Sep 17 00:00:00 2001 From: Lakshman Gowda Date: Tue, 23 Aug 2011 20:58:25 -0700 Subject: DOMX : provide extension index support for gralloc buffer usage flags query The Stagefright queries DOMX in order to allocate buffers from gralloc with correct usage flags. Change-Id: I85dc7bd6bf6b3008a12470bb797df0cce8a370e0 Signed-off-by: Lakshman Gowda Signed-off-by: Iliyan Malchev --- domx/omx_core/inc/OMX_TI_IVCommon.h | 15 +++++++++++++++ domx/omx_core/inc/OMX_TI_Index.h | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'domx/omx_core/inc') diff --git a/domx/omx_core/inc/OMX_TI_IVCommon.h b/domx/omx_core/inc/OMX_TI_IVCommon.h index d16120e..ebd5b2f 100755 --- a/domx/omx_core/inc/OMX_TI_IVCommon.h +++ b/domx/omx_core/inc/OMX_TI_IVCommon.h @@ -2541,6 +2541,21 @@ typedef struct OMX_TI_PARAMUSENATIVEBUFFER { OMX_BOOL bEnable; } OMX_TI_PARAMUSENATIVEBUFFER; +/** +* A pointer to this struct is passed to OMX_GetParameter when the extension +* index for the 'OMX.google.android.index.getAndroidNativeBufferUsage' +* extension is given. +* The corresponding extension Index is OMX_TI_IndexAndroidNativeBufferUsage. +* The usage bits returned from this query will be used to allocate the Gralloc +* buffers that get passed to the useAndroidNativeBuffer command. +*/ +typedef struct OMX_TI_PARAMNATIVEBUFFERUSAGE { + OMX_U32 nSize; + OMX_VERSIONTYPE nVersion; + OMX_U32 nPortIndex; + OMX_U32 nUsage; +} OMX_TI_PARAMNATIVEBUFFERUSAGE; + /*==========================================================================*/ /*! @brief OMX_TI_PARAM_ENHANCEDPORTRECONFIG : Suport added to new port reconfig usage diff --git a/domx/omx_core/inc/OMX_TI_Index.h b/domx/omx_core/inc/OMX_TI_Index.h index 3cc5a92..5aec517 100755 --- a/domx/omx_core/inc/OMX_TI_Index.h +++ b/domx/omx_core/inc/OMX_TI_Index.h @@ -223,7 +223,8 @@ typedef enum OMX_TI_INDEXTYPE { OMX_TI_IndexParamZslHistoryLen, /**< reference: OMX_TI_PARAM_ZSLHISTORYLENTYPE */ OMX_TI_IndexConfigZslDelay, /**< reference: OMX_TI_CONFIG_ZSLDELAYTYPE */ OMX_TI_IndexParamMetaDataBufferInfo, /***< reference: OMX_TI_PARAM_METADATABUFFERINFO */ - OMX_TI_IndexConfigZslFrameSelectMethod /**< reference: OMX_TI_CONFIG_ZSLFRAMESELECTMETHODTYPE */ + OMX_TI_IndexConfigZslFrameSelectMethod, /**< reference: OMX_TI_CONFIG_ZSLFRAMESELECTMETHODTYPE */ + OMX_TI_IndexAndroidNativeBufferUsage /**< reference: OMX_TI_IndexAndroidNativeBufferUsage */ } OMX_TI_INDEXTYPE; -- cgit v1.2.3