1LOCAL_PATH := $(call my-dir)
2include $(CLEAR_VARS)
3
4ifeq ($(ENABLE_IMG_GRAPHICS),)
5LOCAL_CFLAGS += \
6    -DBX_RC \
7    -DOSCL_IMPORT_REF= \
8    -DOSCL_UNUSED_ARG= \
9    -DOSCL_EXPORT_REF=
10
11LOCAL_STATIC_LIBRARIES := \
12    libstagefright_m4vh263enc
13endif
14
15LOCAL_SRC_FILES := \
16    VideoEncoderBase.cpp \
17    VideoEncoderAVC.cpp \
18    VideoEncoderH263.cpp \
19    VideoEncoderMP4.cpp \
20    VideoEncoderVP8.cpp \
21    VideoEncoderUtils.cpp \
22    VideoEncoderHost.cpp
23
24# VideoEncoderAVC.cpp has extraneous parentheses and
25# uses va_enc_h264.h with empty union.
26LOCAL_CLANG_CFLAGS += \
27    -Wno-parentheses-equality \
28    -Wno-extern-c-compat
29
30ifeq ($(ENABLE_IMG_GRAPHICS),)
31    LOCAL_SRC_FILES += PVSoftMPEG4Encoder.cpp
32endif
33
34LOCAL_C_INCLUDES := \
35    $(TARGET_OUT_HEADERS)/libva \
36    $(call include-path-for, frameworks-native) \
37    $(TARGET_OUT_HEADERS)/pvr/hal
38
39ifeq ($(ENABLE_IMG_GRAPHICS),)
40LOCAL_C_INCLUDES += \
41    frameworks/av/media/libstagefright/codecs/m4v_h263/enc/include \
42    frameworks/av/media/libstagefright/codecs/m4v_h263/enc/src \
43    frameworks/av/media/libstagefright/codecs/common/include \
44    frameworks/native/include/media/openmax \
45    frameworks/native/include/media/hardware \
46    frameworks/av/media/libstagefright/include
47endif
48
49LOCAL_SHARED_LIBRARIES := \
50    liblog \
51    libcutils \
52    libion \
53    libutils \
54    libva \
55    libva-android \
56    libva-tpi \
57    libhardware \
58    libintelmetadatabuffer \
59    libsync
60
61LOCAL_COPY_HEADERS_TO  := libmix_videoencoder
62
63LOCAL_COPY_HEADERS := \
64    VideoEncoderHost.h \
65    VideoEncoderInterface.h \
66    VideoEncoderDef.h
67
68ifeq ($(VIDEO_ENC_LOG_ENABLE),true)
69LOCAL_CPPFLAGS += -DVIDEO_ENC_LOG_ENABLE
70endif
71
72ifeq ($(NO_BUFFER_SHARE),true)
73LOCAL_CPPFLAGS += -DNO_BUFFER_SHARE
74endif
75
76ifeq ($(VIDEO_ENC_STATISTICS_ENABLE),true)
77LOCAL_CPPFLAGS += -DVIDEO_ENC_STATISTICS_ENABLE
78endif
79
80ifeq ($(ENABLE_IMG_GRAPHICS),true)
81    LOCAL_CFLAGS += -DIMG_GFX
82
83    ifeq ($(ENABLE_MRFL_GRAPHICS),true)
84        LOCAL_CFLAGS += -DMRFLD_GFX
85    endif
86endif
87
88LOCAL_CFLAGS += -Werror
89LOCAL_MODULE_TAGS := optional
90LOCAL_MODULE := libva_videoencoder
91
92include $(BUILD_SHARED_LIBRARY)
93
94# For libintelmetadatabuffer
95# =====================================================
96
97include $(CLEAR_VARS)
98
99VIDEO_ENC_LOG_ENABLE := true
100
101LOCAL_SRC_FILES := \
102    IntelMetadataBuffer.cpp
103
104LOCAL_COPY_HEADERS_TO  := libmix_videoencoder
105
106LOCAL_COPY_HEADERS := \
107    IntelMetadataBuffer.h
108
109ifeq ($(INTEL_VIDEO_XPROC_SHARING),true)
110LOCAL_SHARED_LIBRARIES := liblog libutils libbinder libgui \
111                          libui libcutils libhardware
112endif
113LOCAL_CFLAGS += -Werror
114LOCAL_MODULE_TAGS := optional
115LOCAL_MODULE := libintelmetadatabuffer
116
117include $(BUILD_SHARED_LIBRARY)
118