diff --git a/libvideocodec/Android.mk b/libvideocodec/Android.mk index 894db0f..6a1b095 100644 --- a/libvideocodec/Android.mk +++ b/libvideocodec/Android.mk @@ -34,28 +34,8 @@ ifeq ($(BOARD_USE_HEVC_HWIP), true) LOCAL_CFLAGS += -DUSE_HEVC_HWIP endif -ifeq ($(TARGET_SOC), exynos5422) -LOCAL_CFLAGS += -DSOC_EXYNOS5430 -endif - -ifeq ($(TARGET_SOC), exynos5430) -LOCAL_CFLAGS += -DSOC_EXYNOS5430 -endif - -ifeq ($(TARGET_SOC), exynos5433) -LOCAL_CFLAGS += -DSOC_EXYNOS5430 -endif - -ifeq ($(TARGET_SOC), exynos7420) -LOCAL_CFLAGS += -DSOC_EXYNOS5430 -endif - -ifeq ($(TARGET_SOC), exynos7580) -LOCAL_CFLAGS += -DSOC_EXYNOS5430 -endif - -ifeq ($(TARGET_SOC), exynos8890) -LOCAL_CFLAGS += -DSOC_EXYNOS5430 +ifneq ($(filter exynos5422 exynos5430 exynos5433 exynos7420 exynos7580 exynos7880 exynos8890, $(TARGET_SOC)),) +LOCAL_CFLAGS += -DNEW_API endif LOCAL_MODULE := libExynosVideoApi diff --git a/libvideocodec/dec/ExynosVideoDecoder.c b/libvideocodec/dec/ExynosVideoDecoder.c index 3698cd7..d8edefe 100644 --- a/libvideocodec/dec/ExynosVideoDecoder.c +++ b/libvideocodec/dec/ExynosVideoDecoder.c @@ -1818,7 +1818,7 @@ static ExynosVideoErrorType MFC_Decoder_Enqueue_Inbuf( // FIXME: figure out why |pPrivate| may be NULL. if (pPrivate && (((OMX_BUFFERHEADERTYPE *)pPrivate)->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) { -#ifdef SOC_EXYNOS5430 +#ifdef NEW_API buf.reserved2 = LAST_FRAME; ALOGD("%s: OMX_BUFFERFLAG_EOS => LAST_FRAME: 0x%x", __func__, buf.reserved2); #else @@ -2376,7 +2376,7 @@ static ExynosVideoErrorType MFC_Decoder_ExtensionEnqueue_Inbuf( // FIXME: figure out why |pPrivate| may be NULL. if (pPrivate && (((OMX_BUFFERHEADERTYPE *)pPrivate)->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) { -#ifdef SOC_EXYNOS5430 +#ifdef NEW_API buf.reserved2 = LAST_FRAME; ALOGD("%s: OMX_BUFFERFLAG_EOS => LAST_FRAME: 0x%x", __func__, buf.reserved2); #else diff --git a/libvideocodec/enc/ExynosVideoEncoder.c b/libvideocodec/enc/ExynosVideoEncoder.c index eacc6aa..45e1fa2 100644 --- a/libvideocodec/enc/ExynosVideoEncoder.c +++ b/libvideocodec/enc/ExynosVideoEncoder.c @@ -544,7 +544,7 @@ static ExynosVideoErrorType MFC_Encoder_Set_EncParam ( ext_ctrl[47].id = V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0; ext_ctrl[47].value = 0; ext_ctrl[48].id = V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE; -#ifdef SOC_EXYNOS5430 +#ifdef NEW_API ext_ctrl[48].value = V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE; #else ext_ctrl[48].value = V4L2_MPEG_VIDEO_H264_SEI_FP_TYPE_SIDE_BY_SIDE; @@ -2158,7 +2158,7 @@ static ExynosVideoErrorType MFC_Encoder_Enqueue_Inbuf( } if ((((OMX_BUFFERHEADERTYPE *)pPrivate)->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) { -#ifdef SOC_EXYNOS5430 +#ifdef NEW_API buf.reserved2 = LAST_FRAME; ALOGD("%s: OMX_BUFFERFLAG_EOS => LAST_FRAME: 0x%x", __func__, buf.reserved); #else @@ -2595,7 +2595,7 @@ static ExynosVideoErrorType MFC_Encoder_ExtensionEnqueue_Inbuf( } if ((((OMX_BUFFERHEADERTYPE *)pPrivate)->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS) { -#ifdef SOC_EXYNOS5430 +#ifdef NEW_API buf.reserved2 = LAST_FRAME; ALOGD("%s: OMX_BUFFERFLAG_EOS => LAST_FRAME: 0x%x", __func__, buf.reserved2); #else