#include "ExynosVideoApi.h"
#include "ExynosVideoDec.h"
-#include "exynos_v4l2.h"
/* #define LOG_NDEBUG 0 */
#define LOG_TAG "ExynosVideoDecoder"
/*
* [Decoder OPS] Init
*/
-static void *MFC_Decoder_Init(void)
+static void *MFC_Decoder_Init(int nMemoryType)
{
ExynosVideoDecContext *pCtx = NULL;
pthread_mutex_t *pMutex = NULL;
pCtx->bStreamonInbuf = VIDEO_FALSE;
pCtx->bStreamonOutbuf = VIDEO_FALSE;
- pCtx->nMemoryType = V4L2_MEMORY_DMABUF;
+ pCtx->nMemoryType = nMemoryType;
pMutex = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
if (pMutex == NULL) {
#include "ExynosVideoApi.h"
#include "ExynosVideoEnc.h"
-#include "exynos_v4l2.h"
/* #define LOG_NDEBUG 0 */
#define LOG_TAG "ExynosVideoEncoder"
/*
* [Encoder OPS] Init
*/
-static void *MFC_Encoder_Init(void)
+static void *MFC_Encoder_Init(int nMemoryType)
{
ExynosVideoEncContext *pCtx = NULL;
pthread_mutex_t *pMutex = NULL;
pCtx->bStreamonInbuf = VIDEO_FALSE;
pCtx->bStreamonOutbuf = VIDEO_FALSE;
- pCtx->nMemoryType = V4L2_MEMORY_DMABUF;
+ pCtx->nMemoryType = nMemoryType;
pMutex = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
if (pMutex == NULL) {
#ifndef _EXYNOS_VIDEO_API_H_
#define _EXYNOS_VIDEO_API_H_
+#include "exynos_v4l2.h"
+
/* Fixed */
#define VIDEO_BUFFER_MAX_PLANES 3
typedef struct _ExynosVideoDecOps {
unsigned int nSize;
- void * (*Init)(void);
+ void * (*Init)(int nMemoryType);
ExynosVideoErrorType (*Finalize)(void *pHandle);
/* Add new ops at the end of structure, no order change */
typedef struct _ExynosVideoEncOps {
unsigned int nSize;
- void * (*Init)(void);
+ void * (*Init)(int nMemoryType);
ExynosVideoErrorType (*Finalize)(void *pHandle);
/* Add new ops at the end of structure, no order change */
$(EXYNOS_OMX_TOP)/core \
$(EXYNOS_OMX_COMPONENT)/common \
$(EXYNOS_OMX_COMPONENT)/video/dec \
+ hardware/samsung_slsi/exynos5/include \
hardware/samsung_slsi/exynos5/libcsc \
hardware/samsung_slsi/exynos5/exynos_omx/codecs/exynos_codecs/video/exynos5/mfc_v4l2/include
}
/* alloc context, open, querycap */
- pH264Dec->hMFCH264Handle.hMFCHandle = pH264Dec->hMFCH264Handle.pDecOps->Init();
+ pH264Dec->hMFCH264Handle.hMFCHandle = pH264Dec->hMFCH264Handle.pDecOps->Init(V4L2_MEMORY_DMABUF);
if (pH264Dec->hMFCH264Handle.hMFCHandle == NULL) {
Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to allocate context buffer");
ret = OMX_ErrorInsufficientResources;
}
/* alloc context, open, querycap */
- pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.pDecOps->Init();
+ pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle = pMpeg4Dec->hMFCMpeg4Handle.pDecOps->Init(V4L2_MEMORY_DMABUF);
if (pMpeg4Dec->hMFCMpeg4Handle.hMFCHandle == NULL) {
Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to allocate context buffer");
ret = OMX_ErrorInsufficientResources;
}
/* alloc context, open, querycap */
- pVp8Dec->hMFCVp8Handle.hMFCHandle = pVp8Dec->hMFCVp8Handle.pDecOps->Init();
+ pVp8Dec->hMFCVp8Handle.hMFCHandle = pVp8Dec->hMFCVp8Handle.pDecOps->Init(V4L2_MEMORY_DMABUF);
if (pVp8Dec->hMFCVp8Handle.hMFCHandle == NULL) {
Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to allocate context buffer");
ret = OMX_ErrorInsufficientResources;
$(EXYNOS_OMX_TOP)/core \
$(EXYNOS_OMX_COMPONENT)/common \
$(EXYNOS_OMX_COMPONENT)/video/enc \
+ hardware/samsung_slsi/exynos5/include \
hardware/samsung_slsi/exynos5/libcsc \
hardware/samsung_slsi/exynos5/exynos_omx/codecs/exynos_codecs/video/exynos5/mfc_v4l2/include
$(EXYNOS_OMX_TOP)/core \
$(EXYNOS_OMX_COMPONENT)/common \
$(EXYNOS_OMX_COMPONENT)/video/enc \
+ hardware/samsung_slsi/exynos5/include \
hardware/samsung_slsi/exynos5/libcsc \
hardware/samsung_slsi/exynos5/exynos_omx/codecs/exynos_codecs/video/exynos5/mfc_v4l2/include
}
/* alloc context, open, querycap */
- pH264Enc->hMFCH264Handle.hMFCHandle = pH264Enc->hMFCH264Handle.pEncOps->Init();
+ pH264Enc->hMFCH264Handle.hMFCHandle = pH264Enc->hMFCH264Handle.pEncOps->Init(V4L2_MEMORY_DMABUF);
if (pH264Enc->hMFCH264Handle.hMFCHandle == NULL) {
Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to allocate context buffer");
ret = OMX_ErrorInsufficientResources;
$(EXYNOS_OMX_TOP)/core \
$(EXYNOS_OMX_COMPONENT)/common \
$(EXYNOS_OMX_COMPONENT)/video/enc \
- hardware/samsung_slsi/exynos5/exynos_omx/codecs/exynos_codecs/video/exynos5/mfc_v4l2/include \
- hardware/samsung_slsi/exynos5/libcsc
+ hardware/samsung_slsi/exynos5/include \
+ hardware/samsung_slsi/exynos5/libcsc \
+ hardware/samsung_slsi/exynos5/exynos_omx/codecs/exynos_codecs/video/exynos5/mfc_v4l2/include
include $(BUILD_SHARED_LIBRARY)
}
/* alloc context, open, querycap */
- pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.pEncOps->Init();
+ pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle = pMpeg4Enc->hMFCMpeg4Handle.pEncOps->Init(V4L2_MEMORY_DMABUF);
if (pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle == NULL) {
Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to allocate context buffer");
ret = OMX_ErrorInsufficientResources;