}
pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}
pTempBufferHdr->nInputPortIndex = INPUT_PORT_INDEX;
else
pTempBufferHdr->nOutputPortIndex = OUTPUT_PORT_INDEX;
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
if (nPortIndex == OUTPUT_PORT_INDEX && pVideoEnc->bSharedOutputFD == OMX_TRUE)
pExynosPort->extendBufferHeader[i].buf_fd[0] = (int)(pBuffer); /*IL Client provides only FD value*/
}
pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
+ Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "[%p][%s] invalid parameter(0x%x)", pExynosComponent, __FUNCTION__, nPortIndex);
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}
}
pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
+ Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "[%p][%s] invalid parameter(0x%x)", pExynosComponent, __FUNCTION__, nPortIndex);
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}
EXYNOS_OMX_BASEPORT *pOMXBasePort,
OMX_U32 nPortIndex)
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- OMX_BUFFERHEADERTYPE *pTempBufferHdr = NULL;
- OMX_U8 *pTempBuffer = NULL;
- OMX_U32 nBufferSize = 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 *pTempBufferHdr = NULL;
- OMX_U8 *pTempBuffer = NULL;
- OMX_U32 nBufferSize = 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(
pDataBuffer[1] = &(pExynosPort->way.port2WayDataBuffer.outputDataBuffer);
}
-EXIT:
FunctionOut();
return ret;
int i = 0;
FunctionIn();
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
Exynos_OSAL_Log(EXYNOS_LOG_WARNING, "flushPort idx:%d", nPortIndex);
#endif
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
EXYNOS_OMX_DATABUFFER *pDataBuffer[2] = {NULL, NULL};
- OMX_U32 i = 0;
FunctionIn();
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
Exynos_OSAL_Log(EXYNOS_LOG_WARNING, "bufferFlush idx:%d", nPortIndex);
#endif
Exynos_OSAL_MutexLock(pDataBuffer[1]->bufferMutex);
ret = Exynos_OMX_FlushPort(pOMXComponent, nPortIndex);
- if (ret != OMX_ErrorNone)
+ if (ret != OMX_ErrorNone) {
+ if (pDataBuffer[1] != NULL)
+ Exynos_OSAL_MutexUnlock(pDataBuffer[1]->bufferMutex);
+
+ Exynos_OSAL_MutexUnlock(pDataBuffer[0]->bufferMutex);
+
goto EXIT;
+ }
if (pExynosPort->bufferProcessType & BUFFER_COPY)
pVideoEnc->exynos_codec_enqueueAllBuffer(pOMXComponent, nPortIndex);
Exynos_OSAL_Free(pMessage);
-#ifndef SLP_PLATFORM
+#ifndef TIZEN_FEATURE_E3250
if (pDataBuffer->allocSize <= pDataBuffer->dataLen)
Exynos_OSAL_Log(EXYNOS_LOG_WARNING, "Input Buffer Full, Check input buffer size! allocSize:%d, dataLen:%d", pDataBuffer->allocSize, pDataBuffer->dataLen);
#endif
goto EXIT;
}
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}
goto EXIT;
}
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}
goto EXIT;
}
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
ret = OMX_ErrorBadPortIndex;
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;
}
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}
pPortFormat->xFramerate = pPortDef->format.video.xFramerate;
break;
case supportFormat_4:
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "can not support this format");
#else
pPortFormat->eCompressionFormat = OMX_VIDEO_CodingUnused;
{
OMX_VIDEO_PARAM_QUANTIZATIONTYPE *pVideoQuantization = (OMX_VIDEO_PARAM_QUANTIZATIONTYPE *)pComponentParameterStructure;
OMX_U32 nPortIndex = pVideoQuantization->nPortIndex;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
- OMX_PARAM_PORTDEFINITIONTYPE *pPortDef = NULL;
if (nPortIndex != OUTPUT_PORT_INDEX) {
ret = OMX_ErrorBadPortIndex;
ret = OMX_ErrorBadParameter;
goto EXIT;
}
- pExynosPort = &pExynosComponent->pExynosPort[nPortIndex];
- pPortDef = &pExynosPort->portDefinition;
pVideoQuantization->nQpI = pVideoEnc->quantization.nQpI;
pVideoQuantization->nQpP = pVideoEnc->quantization.nQpP;
OMX_U32 nPortIndex = pPortDef->nPortIndex;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
FunctionIn();
{
OMX_VIDEO_PARAM_PORTFORMATTYPE *pPortFormat = (OMX_VIDEO_PARAM_PORTFORMATTYPE *)pComponentParameterStructure;
OMX_U32 nPortIndex = pPortFormat->nPortIndex;
- OMX_U32 nIndex = pPortFormat->nIndex;
OMX_PARAM_PORTDEFINITIONTYPE *pPortDef = NULL;
- OMX_U32 nSupportFormat = 0;
ret = Exynos_OMX_Check_SizeVersion(pPortFormat, sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE));
if (ret != OMX_ErrorNone) {
goto EXIT;
}
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}
{
OMX_VIDEO_PARAM_BITRATETYPE *pVideoBitrate = (OMX_VIDEO_PARAM_BITRATETYPE *)pComponentParameterStructure;
OMX_U32 nPortIndex = pVideoBitrate->nPortIndex;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
OMX_PARAM_PORTDEFINITIONTYPE *pPortDef = NULL;
{
OMX_VIDEO_PARAM_QUANTIZATIONTYPE *pVideoQuantization = (OMX_VIDEO_PARAM_QUANTIZATIONTYPE *)pComponentParameterStructure;
OMX_U32 nPortIndex = pVideoQuantization->nPortIndex;
- EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
- OMX_PARAM_PORTDEFINITIONTYPE *pPortDef = NULL;
if (nPortIndex != OUTPUT_PORT_INDEX) {
ret = OMX_ErrorBadPortIndex;
ret = OMX_ErrorBadParameter;
goto EXIT;
}
- pExynosPort = &pExynosComponent->pExynosPort[nPortIndex];
- pPortDef = &pExynosPort->portDefinition;
pVideoEnc->quantization.nQpI = pVideoQuantization->nQpI;
pVideoEnc->quantization.nQpP = pVideoQuantization->nQpP;
OMX_PARAM_PORTDEFINITIONTYPE *pPortDef = (OMX_PARAM_PORTDEFINITIONTYPE *)pComponentParameterStructure;
OMX_U32 nPortIndex = pPortDef->nPortIndex;
EXYNOS_OMX_BASEPORT *pExynosPort = NULL;
- OMX_U32 width, height, size;
- if ((nPortIndex < 0) ||
- (nPortIndex >= pExynosComponent->portParam.nPorts)) {
+ if (nPortIndex >= pExynosComponent->portParam.nPorts) {
ret = OMX_ErrorBadPortIndex;
goto EXIT;
}