//#include "ExynosVideoApi.h"
#include "Exynos_OSAL_SharedMemory.h"
#include "Exynos_OSAL_Event.h"
+#include "Exynos_OMX_VencControl.h"
/* To use CSC_METHOD_HW in EXYNOS OMX, gralloc should allocate physical memory using FIMC */
/* It means GRALLOC_USAGE_HW_FIMC1 should be set on Native Window usage */
pCommonParam->CbPadVal = 0;
pCommonParam->CrPadVal = 0;
- switch ((EXYNOS_OMX_COLOR_FORMATTYPE)pExynosInputPort->portDefinition.format.video.eColorFormat) {
+ switch ((int)pExynosInputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420SemiPlanar:
case OMX_COLOR_FormatYUV420Planar: /* Converted to NV12 in Exynos_Preprocessor_InputData */
#ifdef TIZEN_FEATURE_E3250
pCommonParam->CbPadVal = 0;
pCommonParam->CrPadVal = 0;
- switch ((EXYNOS_OMX_COLOR_FORMATTYPE)pExynosInputPort->portDefinition.format.video.eColorFormat) {
+ switch ((int)pExynosInputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420SemiPlanar:
case OMX_COLOR_FormatYUV420Planar: /* Converted to NV12 in Exynos_Preprocessor_InputData */
#ifdef TIZEN_FEATURE_E3250
OMX_ERRORTYPE GetCodecInputPrivateData(OMX_PTR codecBuffer, OMX_PTR addr[], OMX_U32 size[])
{
- OMX_ERRORTYPE ret = OMX_ErrorNone;
-
-EXIT:
- return ret;
+ return OMX_ErrorNone;
}
OMX_ERRORTYPE GetCodecOutputPrivateData(OMX_PTR codecBuffer, OMX_PTR *pVirtAddr, OMX_U32 *dataSize)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
void *hMFCHandle = NULL;
- ExynosVideoEncOps *pEncOps = NULL;
ExynosVideoEncBufferOps *pInbufOps = NULL;
ExynosVideoEncBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
}
hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
- pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
void *hMFCHandle = NULL;
- ExynosVideoEncOps *pEncOps = NULL;
ExynosVideoEncBufferOps *pInbufOps = NULL;
ExynosVideoEncBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
}
hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
- pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
EXYNOS_MFC_MPEG4ENC_HANDLE *pMFCMpeg4Handle = &pMpeg4Enc->hMFCMpeg4Handle;
void *hMFCHandle = pMFCMpeg4Handle->hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
+
ExynosVideoEncOps *pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
ExynosVideoEncBufferOps *pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
- ExynosVideoEncBufferOps *pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
+
ExynosVideoEncParam *pEncParam = NULL;
ExynosVideoGeometry bufferConf;
OMX_U32 inputBufferNumber = 0;
- int i, nOutbufs;
+ int i;
FunctionIn();
OMX_ERRORTYPE Mpeg4CodecOutputBufferProcessRun(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex)
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
- void *hMFCHandle = NULL;
- ExynosVideoEncOps *pEncOps = NULL;
- ExynosVideoEncBufferOps *pInbufOps = NULL;
- ExynosVideoEncBufferOps *pOutbufOps = NULL;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = NULL;
goto EXIT;
}
- hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
- pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
- pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
- pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
-
if (nPortIndex == INPUT_PORT_INDEX) {
if (pMpeg4Enc->bSourceStart == OMX_FALSE) {
Exynos_OSAL_SignalSet(pMpeg4Enc->hSourceStartEvent);
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
- int i, nOutbufs;
+ int i;
- ExynosVideoEncOps *pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
ExynosVideoEncBufferOps *pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
ExynosVideoEncBufferOps *pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
pInbufOps->Clear_Queue(hMFCHandle);
} else if ((nPortIndex == OUTPUT_PORT_INDEX) &&
(pMpeg4Enc->bDestinationStart == OMX_TRUE)) {
- OMX_U32 dataLen[2] = {0, 0};
ExynosVideoBuffer *pBuffer = NULL;
Exynos_CodecBufferReset(pExynosComponent, OUTPUT_PORT_INDEX);
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
- EXYNOS_MFC_MPEG4ENC_HANDLE *pMFCMpeg4Handle = &pMpeg4Enc->hMFCMpeg4Handle;
- void *hMFCHandle = pMFCMpeg4Handle->hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
OMX_U32 oneFrameSize = pSrcInputData->dataLen;
- ExynosVideoEncOps *pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
- ExynosVideoEncBufferOps *pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
- ExynosVideoEncBufferOps *pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
- ExynosVideoEncParam *pEncParam = NULL;
-
- ExynosVideoGeometry bufferConf;
- OMX_U32 inputBufferNumber = 0;
- int i, nOutbufs;
-
FunctionIn();
if ((oneFrameSize <= 0) && (pSrcInputData->nFlags & OMX_BUFFERFLAG_EOS)) {
OMXBuffer->nTimeStamp = pSrcInputData->timeStamp;
OMXBuffer->nFlags = pSrcInputData->nFlags;
- Exynos_OMX_OutputBufferReturn(pOMXComponent, OMXBuffer);
-
- ret = OMX_ErrorNone;
+ ret = Exynos_OMX_OutputBufferReturn(pOMXComponent, OMXBuffer);
+ if (ret != OMX_ErrorNone) {
+ goto EXIT;
+ }
goto EXIT;
}
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
EXYNOS_MFC_MPEG4ENC_HANDLE *pMFCMpeg4Handle = &pMpeg4Enc->hMFCMpeg4Handle;
void *hMFCHandle = pMFCMpeg4Handle->hMFCHandle;
- EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
- ExynosVideoEncOps *pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
- ExynosVideoEncBufferOps *pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
ExynosVideoEncBufferOps *pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
ExynosVideoGeometry bufferConf;
- int i, nOutbufs, nPlanes, OutBufferSize;
+ int i, nPlanes, OutBufferSize;
FunctionIn();
for (i = 0; i < MFC_OUTPUT_BUFFER_NUM_MAX; i++) {
ExynosVideoPlane plane;
pVideoEnc->pMFCEncOutputBuffer[i] = (CODEC_ENC_BUFFER *)Exynos_OSAL_Malloc(sizeof(CODEC_ENC_BUFFER));
+
+ if (pVideoEnc->pMFCEncOutputBuffer[i] == NULL) {
+ Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to Alloc output buffer");
+ ret = OMX_ErrorInsufficientResources;
+ goto EXIT;
+ }
pVideoEnc->pMFCEncOutputBuffer[i]->pVirAddr[0] =
(void *)Exynos_OSAL_SharedMemory_Alloc(pVideoEnc->hSharedMemory, OutBufferSize, NORMAL_MEMORY);
+
if (pVideoEnc->pMFCEncOutputBuffer[i]->pVirAddr[0] == NULL) {
Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to Alloc output buffer");
ret = OMX_ErrorInsufficientResources;
pVideoEnc->pMFCEncOutputBuffer[i] = (CODEC_ENC_BUFFER *)Exynos_OSAL_Malloc(sizeof(CODEC_ENC_BUFFER));
+ if (!pVideoEnc->pMFCEncOutputBuffer[i]) {
+ ret = OMX_ErrorInsufficientResources;
+ goto ALLOC_FAILED;
+ }
+
if (pOutbufOps->Get_Buffer) {
if (pOutbufOps->Get_Buffer(pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle, i, &pBuffer) != VIDEO_ERROR_NONE) {
Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to get Output buffer info");
FunctionOut();
return ret;
+
+ALLOC_FAILED:
+ for (i = 0; i < MFC_OUTPUT_BUFFER_NUM_MAX; i++) {
+ if (pVideoEnc->pMFCEncOutputBuffer[i])
+ Exynos_OSAL_Free(pVideoEnc->pMFCEncOutputBuffer[i]);
+ }
+ Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to allocate buffers");
+
+ FunctionOut();
+ return ret;
}
OMX_ERRORTYPE Exynos_Mpeg4Enc_GetParameter(
pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)pVideoEnc->hCodecHandle;
- switch (nIndex) {
+ switch ((EXYNOS_OMX_INDEXTYPE)nIndex) {
case OMX_IndexConfigVideoIntraPeriod:
{
OMX_U32 nPFrames = (*((OMX_U32 *)pComponentConfigStructure)) - 1;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;;
- EXYNOS_MFC_MPEG4ENC_HANDLE *pMFCMpeg4Handle = &pMpeg4Enc->hMFCMpeg4Handle;
- OMX_PTR hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
OMX_COLOR_FORMATTYPE eColorFormat;
- ExynosVideoEncOps *pEncOps = NULL;
- ExynosVideoEncBufferOps *pInbufOps = NULL;
- ExynosVideoEncBufferOps *pOutbufOps = NULL;
CSC_METHOD csc_method = CSC_METHOD_SW;
+
int i = 0;
FunctionIn();
}
#endif
} else {
- if (eColorFormat == OMX_SEC_COLOR_FormatNV12L_DmaBuf_Fd ||
- eColorFormat == OMX_SEC_COLOR_FormatNV12T_DmaBuf_Fd) {
+ if (eColorFormat == (OMX_COLOR_FORMATTYPE)OMX_SEC_COLOR_FormatNV12L_DmaBuf_Fd ||
+ eColorFormat == (OMX_COLOR_FORMATTYPE)OMX_SEC_COLOR_FormatNV12T_DmaBuf_Fd) {
pExynosInputPort->bufferProcessType = BUFFER_SHARE;
} else {
pExynosInputPort->bufferProcessType = BUFFER_COPY;
goto EXIT;
}
- pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
- pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
- pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
-
if (pExynosInputPort->bufferProcessType & BUFFER_COPY) {
Exynos_OSAL_SemaphoreCreate(&pExynosInputPort->codecSemID);
Exynos_OSAL_QueueCreate(&pExynosInputPort->codecBufferQ, MAX_QUEUE_ELEMENTS);
if (pMpeg4Enc->hMFCMpeg4Handle.bShareableBuf == OMX_TRUE) {
for (i = 0; i < MFC_INPUT_BUFFER_NUM_MAX; i++) {
pVideoEnc->pMFCEncInputBuffer[i] = Exynos_OSAL_Malloc(sizeof(CODEC_ENC_BUFFER));
+ if (pVideoEnc->pMFCEncInputBuffer[i] == NULL) {
+ Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to Alloc input buffer");
+ ret = OMX_ErrorInsufficientResources;
+ goto EXIT;
+ }
/* Use ION Allocator */
/*Alloc Y-Buffer */
pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[0] = (void *)Exynos_OSAL_SharedMemory_Alloc(pVideoEnc->hSharedMemory, DEFAULT_MFC_INPUT_YBUFFER_SIZE, NORMAL_MEMORY);
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
- OMX_PTR hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
-
- ExynosVideoEncOps *pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
- ExynosVideoEncBufferOps *pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
- ExynosVideoEncBufferOps *pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
- int i = 0, plane = 0;
+ int i = 0;
FunctionIn();
for (i = 0; i < MFC_INPUT_BUFFER_NUM_MAX; i++) {
if (pVideoEnc->pMFCEncInputBuffer[i] != NULL) {
#ifndef TIZEN_FEATURE_E3250 /* do not use ion */
- for (plane = 0; plane < MFC_INPUT_BUFFER_PLANE; plane++) {
+ for (int plane = 0; plane < MFC_INPUT_BUFFER_PLANE; plane++) {
if (pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[plane] != NULL)
Exynos_OSAL_SharedMemory_Free(pVideoEnc->hSharedMemory, pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[plane]);
}
for (i = 0; i < MFC_INPUT_BUFFER_NUM_MAX; i++) {
if (pVideoEnc->pMFCEncInputBuffer[i] != NULL) {
#ifndef TIZEN_FEATURE_E3250 /* do not use ion */
- for (plane = 0; plane < MFC_INPUT_BUFFER_PLANE; plane++) {
+ for (int plane = 0; plane < MFC_INPUT_BUFFER_PLANE; plane++) {
if (pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[plane] != NULL)
Exynos_OSAL_SharedMemory_Free(pVideoEnc->hSharedMemory, pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[plane]);
}
}
Mpeg4CodecClose(pMpeg4Enc);
-EXIT:
FunctionOut();
return ret;
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
OMX_U32 oneFrameSize = pSrcInputData->dataLen;
ExynosVideoEncOps *pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
ExynosVideoEncBufferOps *pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
- ExynosVideoEncBufferOps *pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
ExynosVideoErrorType codecReturn = VIDEO_ERROR_NONE;
- int i;
FunctionIn();
}
- if ((pSrcInputData->dataLen >= 0) ||
- ((pSrcInputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS)) {
- OMX_U32 pMFCYUVDataSize[MFC_INPUT_BUFFER_PLANE] = {NULL, NULL};
+ if ((pSrcInputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) {
+ OMX_U32 pMFCYUVDataSize[MFC_INPUT_BUFFER_PLANE] = {0, };
ExynosVideoPlane planes[MFC_INPUT_BUFFER_PLANE];
int plane;
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
- ExynosVideoEncOps *pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
ExynosVideoEncBufferOps *pInbufOps = pMpeg4Enc->hMFCMpeg4Handle.pInbufOps;
ExynosVideoBuffer *pVideoBuffer;
if (pExynosInputPort->bufferProcessType & BUFFER_COPY) {
int i = 0;
while (pSrcOutputData->buffer.multiPlaneBuffer.dataBuffer[0] != pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[0]) {
+ i++;
if (i >= MFC_INPUT_BUFFER_NUM_MAX) {
Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "%s: %d: Failed - Lost buffer", __FUNCTION__, __LINE__);
ret = (OMX_ERRORTYPE)OMX_ErrorCodecEncode;
goto EXIT;
}
- i++;
}
pVideoEnc->pMFCEncInputBuffer[i]->dataSize = 0;
pSrcOutputData->pPrivate = pVideoEnc->pMFCEncInputBuffer[i];
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
void *hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
- ExynosVideoEncOps *pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
ExynosVideoEncBufferOps *pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
OMX_U32 dataLen = 0;
ExynosVideoErrorType codecReturn = VIDEO_ERROR_NONE;
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
- EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
+ EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)pVideoEnc->hCodecHandle;
void *hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle;
ExynosVideoEncOps *pEncOps = pMpeg4Enc->hMFCMpeg4Handle.pEncOps;
ExynosVideoEncBufferOps *pOutbufOps = pMpeg4Enc->hMFCMpeg4Handle.pOutbufOps;
ExynosVideoBuffer *pVideoBuffer;
ExynosVideoFrameStatusType displayStatus = VIDEO_FRAME_STATUS_UNKNOWN;
- ExynosVideoGeometry bufferGeometry;
OMX_S32 indexTimestamp = 0;
FunctionIn();
pDstOutputData->bufferHeader = (OMX_BUFFERHEADERTYPE *)pVideoBuffer->pPrivate;
if (pVideoEnc->bFirstOutput == OMX_FALSE) {
- OMX_U8 *p = NULL;
pDstOutputData->timeStamp = 0;
pDstOutputData->nFlags |= OMX_BUFFERFLAG_CODECCONFIG;
{
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = (EXYNOS_MPEG4ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
FunctionIn();
OMX_ERRORTYPE ret = OMX_ErrorNone;
OMX_COMPONENTTYPE *pOMXComponent = NULL;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
- EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
EXYNOS_MPEG4ENC_HANDLE *pMpeg4Enc = NULL;
+#ifndef TIZEN_FEATURE_E3250 /* do not use ion */
+ EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = NULL;
+ pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
+#endif
FunctionIn();
if (hComponent == NULL) {
}
pOMXComponent = (OMX_COMPONENTTYPE *)hComponent;
pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
- pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
#ifndef TIZEN_FEATURE_E3250 /* do not use ion */
Exynos_OSAL_SharedMemory_Close(pVideoEnc->hSharedMemory);
#endif