aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2018-05-30 07:16:28 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-05-30 07:16:28 +0000
commitf63913ffe26ef2b2b4c37de8a0dfe158e135bb12 (patch)
tree399a534146658f9a43bbac55a1ebcc55842061e2
parentcedbac6aefc10c31bafeb84f96c3f39119b53c7c (diff)
parentb042a8e6ffb16cbaecb39d4d9f03531c966d46b1 (diff)
downloadv4l2_codec2-pie-dev.tar.gz
Merge "v4l2_codec2: Convert Android.mk for libv4l2_codec2_vda and libv4l2_code2_arcva_factory to Android.bp" into pi-devpie-dev
-rw-r--r--Android.bp32
-rw-r--r--Android.mk30
-rw-r--r--vda/Android.bp53
-rw-r--r--vda/Android.mk50
4 files changed, 85 insertions, 80 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..db4d39f
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,32 @@
+cc_library_shared {
+ name: "libv4l2_codec2_arcva_factory",
+ vendor_available: true,
+ product_variables: {
+ arc: {
+ srcs: ["C2ArcVideoAcceleratorFactory.cpp"],
+
+ shared_libs: [
+ "libarcbridge",
+ "libarcbridgeservice",
+ "libarcvideobridge",
+ "libbinder",
+ "libchrome",
+ "liblog",
+ "libmojo",
+ "libutils",
+ ],
+
+ // -Wno-unused-parameter is needed for libchrome/base codes
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wno-unused-parameter",
+ "-std=c++14",
+ ],
+ },
+ },
+ clang: true,
+ export_include_dirs: [
+ "include",
+ ],
+}
diff --git a/Android.mk b/Android.mk
index 0ba1e46..bff4409 100644
--- a/Android.mk
+++ b/Android.mk
@@ -6,36 +6,6 @@ ifneq (,$(findstring device/google/cheets2/codec2,$(PRODUCT_SOONG_NAMESPACES)))
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-# Build C2ArcVideoAcceleratorFactory only in cheets build.
-ifneq (,$(findstring cheets_,$(TARGET_PRODUCT)))
-LOCAL_SRC_FILES:= \
- C2ArcVideoAcceleratorFactory.cpp \
-
-LOCAL_C_INCLUDES := \
- $(TOP)/external/gtest/include \
- $(TOP)/external/libchrome \
- $(TOP)/external/v4l2_codec2/include \
-
-LOCAL_MODULE:= libv4l2_codec2_arcva_factory
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SHARED_LIBRARIES += libarcbridge \
- libarcbridgeservice \
- libarcvideobridge \
- libbinder \
- libchrome \
- liblog \
- libmojo \
- libutils \
-
-# -Wno-unused-parameter is needed for libchrome/base codes
-LOCAL_CFLAGS := -Werror -Wall -Wno-unused-parameter -std=c++14
-LOCAL_CLANG := true
-
-include $(BUILD_SHARED_LIBRARY)
-include $(CLEAR_VARS)
-endif # ifneq (,$(findstring cheets_,$(TARGET_PRODUCT)))
-
LOCAL_SRC_FILES:= \
C2VDAComponent.cpp \
C2VDAAdaptor.cpp \
diff --git a/vda/Android.bp b/vda/Android.bp
new file mode 100644
index 0000000..5f84535
--- /dev/null
+++ b/vda/Android.bp
@@ -0,0 +1,53 @@
+cc_library_shared {
+ name: "libv4l2_codec2_vda",
+ srcs: [
+ "bit_reader.cc",
+ "bit_reader_core.cc",
+ "bitstream_buffer.cc",
+ "h264_bit_reader.cc",
+ "h264_decoder.cc",
+ "h264_dpb.cc",
+ "h264_parser.cc",
+ "native_pixmap_handle.cc",
+ "picture.cc",
+ "ranges.cc",
+ "shared_memory_region.cc",
+ "v4l2_device.cc",
+ "v4l2_slice_video_decode_accelerator.cc",
+ "v4l2_video_decode_accelerator.cc",
+ "video_codecs.cc",
+ "video_decode_accelerator.cc",
+ "vp8_bool_decoder.cc",
+ "vp8_decoder.cc",
+ "vp8_parser.cc",
+ "vp8_picture.cc",
+ "vp9_bool_decoder.cc",
+ "vp9_compressed_header_parser.cc",
+ "vp9_decoder.cc",
+ "vp9_parser.cc",
+ "vp9_picture.cc",
+ "vp9_raw_bits_reader.cc",
+ "vp9_uncompressed_header_parser.cc",
+ ],
+
+ shared_libs: ["libchrome"],
+ // -Wno-unused-parameter is needed for libchrome/base codes
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wno-unused-parameter",
+ ],
+ clang: true,
+ sanitize: {
+ misc_undefined: [
+ "unsigned-integer-overflow",
+ "signed-integer-overflow",
+ ],
+ },
+
+ ldflags: [
+ "-Wl",
+ "-Bsymbolic",
+ ],
+ export_include_dirs: ["."],
+}
diff --git a/vda/Android.mk b/vda/Android.mk
deleted file mode 100644
index 12f0ea1..0000000
--- a/vda/Android.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_CPP_EXTENSION:= .cc
-LOCAL_SRC_FILES:= \
- bit_reader.cc \
- bit_reader_core.cc \
- bitstream_buffer.cc \
- h264_bit_reader.cc \
- h264_decoder.cc \
- h264_dpb.cc \
- h264_parser.cc \
- native_pixmap_handle.cc \
- picture.cc \
- ranges.cc \
- shared_memory_region.cc \
- v4l2_device.cc \
- v4l2_slice_video_decode_accelerator.cc \
- v4l2_video_decode_accelerator.cc \
- video_codecs.cc \
- video_decode_accelerator.cc \
- vp8_bool_decoder.cc \
- vp8_decoder.cc \
- vp8_parser.cc \
- vp8_picture.cc \
- vp9_bool_decoder.cc \
- vp9_compressed_header_parser.cc \
- vp9_decoder.cc \
- vp9_parser.cc \
- vp9_picture.cc \
- vp9_raw_bits_reader.cc \
- vp9_uncompressed_header_parser.cc \
-
-# gtest/include is for included file from libchrome/base/gtest_prod_util.h
-LOCAL_C_INCLUDES += \
- $(TOP)/external/libchrome \
- $(TOP)/external/gtest/include \
-
-LOCAL_MODULE:= libv4l2_codec2_vda
-
-LOCAL_SHARED_LIBRARIES := libchrome \
-
-# -Wno-unused-parameter is needed for libchrome/base codes
-LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter
-LOCAL_CLANG := true
-LOCAL_SANITIZE := unsigned-integer-overflow signed-integer-overflow
-
-LOCAL_LDFLAGS := -Wl,-Bsymbolic
-
-include $(BUILD_SHARED_LIBRARY)