1LOCAL_PATH := $(call my-dir) 2include $(CLEAR_VARS) 3 4# --------------------------------------------------------------------------------- 5# Common definitons 6# --------------------------------------------------------------------------------- 7 8libmm-venc-def := -g -O3 -Dlrintf=_ffix_r 9libmm-venc-def += -D__align=__alignx 10libmm-venc-def += -D__alignx\(x\)=__attribute__\(\(__aligned__\(x\)\)\) 11libmm-venc-def += -DT_ARM 12libmm-venc-def += -Dinline=__inline 13libmm-venc-def += -D_ANDROID_ 14libmm-venc-def += -UENABLE_DEBUG_LOW 15libmm-venc-def += -UENABLE_DEBUG_HIGH 16libmm-venc-def += -DENABLE_DEBUG_ERROR 17libmm-venc-def += -UINPUT_BUFFER_LOG 18libmm-venc-def += -UOUTPUT_BUFFER_LOG 19libmm-venc-def += -USINGLE_ENCODER_INSTANCE 20libmm-venc-def += -Werror 21libmm-venc-def += -D_ANDROID_ICS_ 22 23TARGETS_THAT_USE_FLAG_MSM8226 := msm8226 msm8916 msm8909 24TARGETS_THAT_NEED_SW_VENC_MPEG4 := msm8909 msm8937 sdm845 msmpeafowl sdm710 qcs605 25TARGETS_THAT_NEED_SW_VENC_HEVC := msm8992 26TARGETS_THAT_SUPPORT_UBWC := msm8996 msm8998 sdm845 msmpeafowl sdm710 qcs605 27TARGETS_THAT_SUPPORT_VQZIP := msm8996 msm8998 28TARGETS_THAT_SUPPORT_SW_VENC_ROTATION := sdm845 msmpeafowl sdm710 qcs605 29 30ifeq ($(TARGET_BOARD_PLATFORM),msm8610) 31libmm-venc-def += -D_MSM8610_ 32endif 33 34ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_UBWC)),true) 35libmm-venc-def += -D_UBWC_ 36endif 37 38ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_VQZIP)),true) 39libmm-venc-def += -D_VQZIP_ 40endif 41 42ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_USE_FLAG_MSM8226)),true) 43libmm-venc-def += -D_MSM8226_ 44endif 45 46ifeq ($(TARGET_USES_ION),true) 47libmm-venc-def += -DUSE_ION 48endif 49 50libmm-venc-def += -DUSE_NATIVE_HANDLE_SOURCE 51 52ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)),true) 53libmm-venc-def += -DMASTER_SIDE_CP 54endif 55 56libmm-venc-def += -DUSE_CAMERA_METABUFFER_UTILS 57 58# Common Includes 59libmm-venc-inc := $(LOCAL_PATH)/inc 60libmm-venc-inc += $(QCOM_MEDIA_ROOT)/mm-video-v4l2/vidc/common/inc 61libmm-venc-inc += $(QCOM_MEDIA_ROOT)/mm-core/inc 62libmm-venc-inc += $(QCOM_MEDIA_ROOT)/libstagefrighthw 63libmm-venc-inc += $(QCOM_MEDIA_ROOT)/libplatformconfig 64libmm-venc-inc += $(TARGET_OUT_HEADERS)/qcom/display 65libmm-venc-inc += $(TARGET_OUT_HEADERS)/adreno 66libmm-venc-inc += $(QCOM_MEDIA_ROOT)/libc2dcolorconvert 67libmm-venc-inc += $(TARGET_OUT_HEADERS)/libvqzip 68libmm-venc-inc += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 69 70ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_SW_VENC_ROTATION)),true) 71libmm-venc-inc += hardware/libhardware/include/hardware 72endif 73 74# Common Dependencies 75libmm-venc-add-dep := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 76 77# --------------------------------------------------------------------------------- 78# Make the Shared library (libOmxVenc) 79# --------------------------------------------------------------------------------- 80 81include $(CLEAR_VARS) 82 83LOCAL_MODULE := libOmxVenc 84LOCAL_MODULE_TAGS := optional 85LOCAL_VENDOR_MODULE := true 86LOCAL_CFLAGS := $(libmm-venc-def) 87 88LOCAL_HEADER_LIBRARIES := \ 89 media_plugin_headers \ 90 libnativebase_headers \ 91 libcutils_headers \ 92 libutils_headers \ 93 libhardware_headers \ 94 95LOCAL_C_INCLUDES := $(libmm-venc-inc) 96LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-venc-add-dep) 97 98LOCAL_PRELINK_MODULE := false 99LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libplatformconfig 100LOCAL_SHARED_LIBRARIES += libnativewindow 101 102# ifeq ($(BOARD_USES_ADRENO), true) 103LOCAL_SHARED_LIBRARIES += libc2dcolorconvert 104# endif # ($(BOARD_USES_ADRENO), true) 105LOCAL_SHARED_LIBRARIES += libqdMetaData 106LOCAL_STATIC_LIBRARIES := libOmxVidcCommon 107LOCAL_HEADER_LIBRARIES := media_plugin_headers 108LOCAL_HEADER_LIBRARIES += libhardware_headers 109 110LOCAL_SRC_FILES := src/omx_video_base.cpp 111LOCAL_SRC_FILES += src/omx_video_encoder.cpp 112LOCAL_SRC_FILES += src/video_encoder_device_v4l2.cpp 113 114# Suppress warnings until they are fixed in video_encoder_device_v4l2.cpp 115LOCAL_CFLAGS += -Wno-error=implicit-fallthrough 116 117include $(BUILD_SHARED_LIBRARY) 118 119ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_NEED_SW_VENC_MPEG4)),true) 120# --------------------------------------------------------------------------------- 121# Make the Shared library (libOmxSwVencMpeg4) 122# --------------------------------------------------------------------------------- 123 124include $(CLEAR_VARS) 125 126libmm-venc-inc += $(TARGET_OUT_HEADERS)/mm-video/swvenc 127 128LOCAL_MODULE := libOmxSwVencMpeg4 129 130LOCAL_MODULE_TAGS := optional 131LOCAL_VENDOR_MODULE := true 132LOCAL_CFLAGS := $(libmm-venc-def) 133 134LOCAL_HEADER_LIBRARIES := \ 135 media_plugin_headers \ 136 libnativebase_headers \ 137 libutils_headers \ 138 libhardware_headers \ 139 140LOCAL_C_INCLUDES := $(libmm-venc-inc) 141LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-venc-add-dep) 142 143LOCAL_PRELINK_MODULE := false 144LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libplatformconfig libMpeg4SwEncoder 145LOCAL_SHARED_LIBRARIES += libnativewindow 146LOCAL_SHARED_LIBRARIES += libqdMetaData 147 148ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_SW_VENC_ROTATION)),true) 149LOCAL_SHARED_LIBRARIES += libui 150LOCAL_SHARED_LIBRARIES += libutils 151endif 152 153LOCAL_HEADER_LIBRARIES := media_plugin_headers 154 155# ifeq ($(BOARD_USES_ADRENO), true) 156LOCAL_SHARED_LIBRARIES += libc2dcolorconvert 157# endif # ($(BOARD_USES_ADRENO), true) 158LOCAL_STATIC_LIBRARIES := libOmxVidcCommon 159 160LOCAL_SRC_FILES := src/omx_video_base.cpp 161LOCAL_SRC_FILES += src/omx_swvenc_mpeg4.cpp 162 163include $(BUILD_SHARED_LIBRARY) 164endif 165 166 167# --------------------------------------------------------------------------------- 168# END 169# --------------------------------------------------------------------------------- 170