}
switch (nIndex) {
+ case OMX_IndexVendorGetBufferFD:
+ {
+ EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
+ EXYNOS_OMX_VIDEO_CONFIG_BUFFERINFO *pBufferInfo = (EXYNOS_OMX_VIDEO_CONFIG_BUFFERINFO *)pComponentConfigStructure;
+
+ ret = Exynos_OMX_Check_SizeVersion(pBufferInfo, sizeof(EXYNOS_OMX_VIDEO_CONFIG_BUFFERINFO));
+ if (ret != OMX_ErrorNone)
+ goto EXIT;
+
+ pBufferInfo->fd = Exynos_OSAL_SharedMemory_VirtToION(pVideoDec->hSharedMemory, pBufferInfo->pVirAddr);
+ }
+ break;
default:
ret = Exynos_OMX_GetConfig(hComponent, nIndex, pComponentConfigStructure);
break;
*pIndexType = (OMX_INDEXTYPE) OMX_IndexVendorNeedContigMemory;
ret = OMX_ErrorNone;
goto EXIT;
+ } else if (Exynos_OSAL_Strcmp(cParameterName, EXYNOS_INDEX_CONFIG_GET_BUFFER_FD) == 0) {
+ *pIndexType = (OMX_INDEXTYPE) OMX_IndexVendorGetBufferFD;
+ ret = OMX_ErrorNone;
+ goto EXIT;
}
#ifdef USE_ANB
}
}
break;
+ case OMX_IndexVendorGetBufferFD:
+ {
+ EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
+ EXYNOS_OMX_VIDEO_CONFIG_BUFFERINFO *pBufferInfo = (EXYNOS_OMX_VIDEO_CONFIG_BUFFERINFO *)pComponentConfigStructure;
+
+ ret = Exynos_OMX_Check_SizeVersion(pBufferInfo, sizeof(EXYNOS_OMX_VIDEO_CONFIG_BUFFERINFO));
+ if (ret != OMX_ErrorNone)
+ goto EXIT;
+
+ pBufferInfo->fd = Exynos_OSAL_SharedMemory_VirtToION(pVideoEnc->hSharedMemory, pBufferInfo->pVirAddr);
+ }
+ break;
default:
{
ret = Exynos_OMX_GetConfig(hComponent, nParamIndex, pComponentConfigStructure);
*pIndexType = (OMX_INDEXTYPE) OMX_IndexVendorNeedContigMemory;
ret = OMX_ErrorNone;
goto EXIT;
+ } else if (Exynos_OSAL_Strcmp(szParamName, EXYNOS_INDEX_CONFIG_GET_BUFFER_FD) == 0) {
+ *pIndexType = (OMX_INDEXTYPE) OMX_IndexVendorGetBufferFD;
+ ret = OMX_ErrorNone;
+ goto EXIT;
}
#ifdef USE_STOREMETADATA
OMX_BOOL bNeedContigMem;
} EXYNOS_OMX_VIDEO_PARAM_PORTMEMTYPE;
+typedef struct _EXYNOS_OMX_VIDEO_CONFIG_BUFFERINFO {
+ OMX_U32 nSize;
+ OMX_VERSIONTYPE nVersion;
+ OMX_PTR OMX_IN pVirAddr;
+ OMX_S32 OMX_OUT fd;
+} EXYNOS_OMX_VIDEO_CONFIG_BUFFERINFO;
+
typedef enum _EXYNOS_OMX_INDEXTYPE
{
#define EXYNOS_INDEX_PARAM_ENABLE_THUMBNAIL "OMX.SEC.index.ThumbnailMode"
#endif
#define EXYNOS_INDEX_PARAM_NEED_CONTIG_MEMORY "OMX.SEC.index.NeedContigMemory"
OMX_IndexVendorNeedContigMemory = 0x7F000004,
+#define EXYNOS_INDEX_CONFIG_GET_BUFFER_FD "OMX.SEC.index.GetBufferFD"
+ OMX_IndexVendorGetBufferFD = 0x7F000005,
/* for Android Native Window */
#define EXYNOS_INDEX_PARAM_ENABLE_ANB "OMX.google.android.index.enableAndroidNativeBuffers"