diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000000000000000000000000000000000000..db4d39f80741d4d4d4e8dabfb0d28e9c8b156eef --- /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 0ba1e46bb6b211847bf2c3252d017b99bfca4404..bff44090e93e8e25e61e9437bbb8576885a1c421 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 0000000000000000000000000000000000000000..5f8453567a8822cd377f7947d8a980c2082e875c --- /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 12f0ea17624698c9fb07a23840a4df320e45b94f..0000000000000000000000000000000000000000 --- 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)