From b042a8e6ffb16cbaecb39d4d9f03531c966d46b1 Mon Sep 17 00:00:00 2001 From: Hirokazu Honda <hiroh@google.com> Date: Mon, 28 May 2018 19:14:19 +0900 Subject: [PATCH] v4l2_codec2: Convert Android.mk for libv4l2_codec2_vda and libv4l2_code2_arcva_factory to Android.bp libv4l2_codec2_vda and libv4l2_code2_arcva_factory are required to be imported by device/google/cheets/codec2/allocators/Android.bp. The allocators is also required to be imported by device/google/cheets/codec2/vdastore/Android.bp. Because shared library built by Android.mk is not visible by Android.bp. There is a need to convert Android.mk buidling libv4l2_codec2_vda and libv4l2_codec2_arcva_factory to Android.bp. Bug: 32691050 Test: build Android image Change-Id: I245ef18bdd1cc7280df718a8df5f7a42580375a2 --- Android.bp | 32 ++++++++++++++++++++++++++++++ Android.mk | 30 ---------------------------- vda/Android.bp | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ vda/Android.mk | 50 ----------------------------------------------- 4 files changed, 85 insertions(+), 80 deletions(-) create mode 100644 Android.bp create mode 100644 vda/Android.bp delete mode 100644 vda/Android.mk 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) -- GitLab