#include "Exynos_OSAL_Mutex.h"
#include "Exynos_OSAL_ETC.h"
#include "Exynos_OSAL_SharedMemory.h"
+#include "Exynos_OMX_Baseport.h"
#ifdef USE_PB
#include "Exynos_OSAL_Platform_Specific.h"
temp_bufferHeader->nInputPortIndex = INPUT_PORT_INDEX;
else
temp_bufferHeader->nOutputPortIndex = OUTPUT_PORT_INDEX;
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
if (nPortIndex == OUTPUT_PORT_INDEX) {
MMVideoBuffer * pSlpOutBuf = (MMVideoBuffer *)pBuffer;
Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "\nPlatformBuffer: buf %d pYUVBuf[0]:0x%x , pYUVBuf[1]:0x%x ",
i, pExynosPort->extendBufferHeader[i].pYUVBuf[0], pExynosPort->extendBufferHeader[i].pYUVBuf[1]);
} else if ((pVideoDec->bDRMPlayerMode == OMX_TRUE) && (nPortIndex == INPUT_PORT_INDEX)) {
- pExynosPort->extendBufferHeader[i].buf_fd[0] = pBuffer;
+ pExynosPort->extendBufferHeader[i].buf_fd[0] = (int)pBuffer;
} else if(nPortIndex == INPUT_PORT_INDEX){
MMVideoBuffer * pSlpOutBuf = (MMVideoBuffer *)pBuffer;
temp_bufferHeader->pBuffer = pSlpOutBuf->data[0];
pExynosPort->bufferStateAllocate[i] = (BUFFER_STATE_ALLOCATED | HEADER_STATE_ALLOCATED);
INIT_SET_SIZE_VERSION(temp_bufferHeader, OMX_BUFFERHEADERTYPE);
if (mem_type == SECURE_MEMORY)
- temp_bufferHeader->pBuffer = temp_buffer_fd;
+ temp_bufferHeader->pBuffer = (OMX_U8 *)temp_buffer_fd;
else
temp_bufferHeader->pBuffer = temp_buffer;
temp_bufferHeader->nAllocLen = nSizeBytes;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = NULL;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- OMX_BUFFERHEADERTYPE *temp_bufferHeader = NULL;
- OMX_U8 *temp_buffer = NULL;
OMX_U32 i = 0;
FunctionIn();
OMX_ERRORTYPE Exynos_OMX_AllocateTunnelBuffer(EXYNOS_OMX_BASEPORT *pOMXBasePort, OMX_U32 nPortIndex)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- OMX_BUFFERHEADERTYPE *temp_bufferHeader = NULL;
- OMX_U8 *temp_buffer = NULL;
- OMX_U32 bufferSize = 0;
- OMX_PARAM_PORTDEFINITIONTYPE portDefinition;
-
- ret = OMX_ErrorTunnelingUnsupported;
-EXIT:
- return ret;
+
+ return OMX_ErrorTunnelingUnsupported;
}
OMX_ERRORTYPE Exynos_OMX_FreeTunnelBuffer(EXYNOS_OMX_BASEPORT *pOMXBasePort, OMX_U32 nPortIndex)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
- EXYNOS_OMX_BASEPORT* pExynosPort = NULL;
- OMX_BUFFERHEADERTYPE* temp_bufferHeader = NULL;
- OMX_U8 *temp_buffer = NULL;
- OMX_U32 bufferSize = 0;
-
- ret = OMX_ErrorTunnelingUnsupported;
-EXIT:
- return ret;
+ return OMX_ErrorTunnelingUnsupported;
}
OMX_ERRORTYPE Exynos_OMX_ComponentTunnelRequest(
OMX_IN OMX_U32 nTunneledPort,
OMX_INOUT OMX_TUNNELSETUPTYPE *pTunnelSetup)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
-
- ret = OMX_ErrorTunnelingUnsupported;
-EXIT:
- return ret;
+ return OMX_ErrorTunnelingUnsupported;
}
OMX_ERRORTYPE Exynos_OMX_GetFlushBuffer(EXYNOS_OMX_BASEPORT *pExynosPort, EXYNOS_OMX_DATABUFFER *pDataBuffer[])
pDataBuffer[1] = &(pExynosPort->way.port2WayDataBuffer.outputDataBuffer);
}
-EXIT:
FunctionOut();
return ret;
OMX_BUFFERHEADERTYPE *bufferHeader = NULL;
EXYNOS_OMX_DATABUFFER *pDataPortBuffer[2] = {NULL, NULL};
EXYNOS_OMX_MESSAGE *message = NULL;
- OMX_U32 flushNum = 0;
OMX_S32 semValue = 0;
int i = 0, maxBufferNum = 0;
FunctionIn();
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
Exynos_OSAL_Log(EXYNOS_LOG_WARNING, "flushPort idx:%d", portIndex);
#endif
}
Exynos_OSAL_ResetQueue(&pExynosPort->bufferQ);
-EXIT:
FunctionOut();
return ret;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = NULL;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
EXYNOS_OMX_DATABUFFER *flushPortBuffer[2] = {NULL, NULL};
- OMX_U32 i = 0, cnt = 0;
+
FunctionIn();
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
Exynos_OSAL_Log(EXYNOS_LOG_WARNING, "bufferFlush idx:%d", nPortIndex);
#endif
/* reset dataBuffer */
Exynos_ResetDataBuffer(dataBuffer);
-EXIT:
FunctionOut();
return ret;
/* reset dataBuffer */
Exynos_ResetDataBuffer(dataBuffer);
-EXIT:
FunctionOut();
return ret;
Exynos_OSAL_Free(message);
-#ifndef SLP_PLATFORM
+#ifndef TIZEN_FEATURE_E3250
if (inputUseBuffer->allocSize <= inputUseBuffer->dataLen)
Exynos_OSAL_Log(EXYNOS_LOG_WARNING, "Input Buffer Full, Check input buffer size! allocSize:%d, dataLen:%d", inputUseBuffer->allocSize, inputUseBuffer->dataLen);
#endif
bufferHeader = dataBuffer->bufferHeader;
if (bufferHeader != NULL) {
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
bufferHeader->nFilledLen = sizeof(MMVideoBuffer);
#else
bufferHeader->nFilledLen = dataBuffer->remainDataLen;
/* reset dataBuffer */
Exynos_ResetDataBuffer(dataBuffer);
-EXIT:
FunctionOut();
return ret;
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_BASEPORT *exynosOMXOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
OMX_BUFFERHEADERTYPE *bufferHeader = NULL;
FunctionIn();
/* reset dataBuffer */
Exynos_ResetDataBuffer(dataBuffer);
-EXIT:
FunctionOut();
return ret;
goto EXIT;
}
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
if (pExynosPort == NULL) {
Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "%s : %d: pExynosPort is NULL", __FUNCTION__, __LINE__);
}
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- OMX_U32 tempData;
+ void *tempData;
FunctionIn();
pExynosPort = &pExynosComponent->pExynosPort[PortIndex];
Exynos_OSAL_SemaphoreWait(pExynosPort->codecSemID);
- tempData = (OMX_U32)Exynos_OSAL_Dequeue(&pExynosPort->codecBufferQ);
+ tempData = Exynos_OSAL_Dequeue(&pExynosPort->codecBufferQ);
if (tempData == NULL) {
*data = NULL;
ret = OMX_ErrorUndefined;
goto EXIT;
}
while (1) {
- int cnt = 0;
+ OMX_S32 cnt = 0;
Exynos_OSAL_Get_SemaphoreCount(pExynosPort->codecSemID, &cnt);
if (cnt > 0)
Exynos_OSAL_SemaphoreWait(pExynosPort->codecSemID);
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
FunctionIn();
goto EXIT;
}
- switch (nParamIndex) {
+ switch ((int)nParamIndex) {
case OMX_IndexParamVideoInit:
{
OMX_PORT_PARAM_TYPE *portParam = (OMX_PORT_PARAM_TYPE *)ComponentParameterStructure;
break;
case supportFormat_2:
portFormat->eCompressionFormat = OMX_VIDEO_CodingUnused;
- portFormat->eColorFormat = OMX_SEC_COLOR_FormatNV12Tiled;
+ portFormat->eColorFormat = OMX_SEC_COLOR_FormatNV12L_DmaBuf_Fd;
portFormat->xFramerate = portDefinition->format.video.xFramerate;
break;
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
case supportFormat_3:
portFormat->eCompressionFormat = OMX_VIDEO_CodingUnused;
portFormat->eColorFormat = OMX_SEC_COLOR_FormatNV12T_DmaBuf_Fd;
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
FunctionIn();
goto EXIT;
}
- switch (nIndex) {
+ switch ((int)nIndex) {
case OMX_IndexParamVideoPortFormat:
{
OMX_VIDEO_PARAM_PORTFORMATTYPE *portFormat = (OMX_VIDEO_PARAM_PORTFORMATTYPE *)ComponentParameterStructure;
OMX_U32 portIndex = portFormat->nPortIndex;
- OMX_U32 index = portFormat->nIndex;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
OMX_PARAM_PORTDEFINITIONTYPE *portDefinition = NULL;
- OMX_U32 supportFormatNum = 0;
ret = Exynos_OMX_Check_SizeVersion(portFormat, sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE));
if (ret != OMX_ErrorNone) {
}
break;
#ifdef USE_PB
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
case OMX_IndexParamEnablePlatformSpecificBuffers:
#else
case OMX_IndexParamEnableAndroidBuffers:
break;
#endif
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
case OMX_IndexParamEnableTimestampReorder:
{
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
goto EXIT;
}
- switch (nIndex) {
+ switch ((EXYNOS_OMX_INDEXTYPE)nIndex) {
case OMX_IndexVendorThumbnailMode:
{
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
}
#ifdef USE_PB
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
if (Exynos_OSAL_Strcmp(cParameterName, EXYNOS_INDEX_PARAM_ENABLE_PB) == 0)
*pIndexType = (OMX_INDEXTYPE) OMX_IndexParamEnablePlatformSpecificBuffers;
else if (Exynos_OSAL_Strcmp(cParameterName, EXYNOS_INDEX_PARAM_ENABLE_TS_REORDER) == 0)
}
/* this is for Fill This Buffer Done */
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
OMX_ERRORTYPE Exynos_Shared_DataToPlatformBuffer(EXYNOS_OMX_DATA *pData, EXYNOS_OMX_DATABUFFER *pUseBuffer, EXYNOS_OMX_BASEPORT *pExynosPort, EXYNOS_OMX_BASEPORT *pExynosInPort)
#else
OMX_ERRORTYPE Exynos_Shared_DataToPlatformBuffer(EXYNOS_OMX_DATA *pData, EXYNOS_OMX_DATABUFFER *pUseBuffer, EXYNOS_OMX_BASEPORT *pExynosPort)
pUseBuffer->bufferHeader = pData->bufferHeader;
pUseBuffer->allocSize = pData->allocSize;
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
pUseBuffer->dataLen = sizeof(MMVideoBuffer);
#else
pUseBuffer->dataLen = pData->dataLen;
}
if (pExynosPort->bIsPBEnabled == OMX_TRUE) {
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
Exynos_OSAL_UnlockPB(pUseBuffer->bufferHeader->pBuffer, pData, pExynosPort,pExynosInPort);
#else
Exynos_OSAL_UnlockPB(pUseBuffer->bufferHeader->pBuffer, pData);