Move Codec2-related code from hardware/google/av
Test: None
Bug: 112362730
Change-Id: Ie2f8ff431d65c40333f267ab9877d47089adeea4
diff --git a/media/codec2/vndk/Android.bp b/media/codec2/vndk/Android.bp
new file mode 100644
index 0000000..cabe7ee
--- /dev/null
+++ b/media/codec2/vndk/Android.bp
@@ -0,0 +1,105 @@
+cc_library_headers {
+ name: "libstagefright_codec2_internal",
+
+ export_include_dirs: [
+ "internal",
+ ],
+
+ // TODO: Remove this when this module is moved back to frameworks/av.
+ vendor_available: true,
+}
+
+// !!!DO NOT DEPEND ON THIS SHARED LIBRARY DIRECTLY!!!
+// use libstagefright_codec2-impl-defaults instead
+cc_library_shared {
+ name: "libstagefright_codec2_vndk",
+ vendor_available: true,
+
+ srcs: [
+ "C2AllocatorIon.cpp",
+ "C2AllocatorGralloc.cpp",
+ "C2Buffer.cpp",
+ "C2Config.cpp",
+ "C2PlatformStorePluginLoader.cpp",
+ "C2Store.cpp",
+ "platform/C2BqBuffer.cpp",
+ "util/C2Debug.cpp",
+ "util/C2InterfaceHelper.cpp",
+ "util/C2InterfaceUtils.cpp",
+ "util/C2ParamUtils.cpp",
+ ],
+
+ export_include_dirs: [
+ "include",
+ ],
+
+ export_shared_lib_headers: [
+ "libbase",
+ "android.hardware.media.bufferpool@1.0",
+ ],
+
+ local_include_dirs: [
+ "internal",
+ ],
+
+ include_dirs: [
+ "frameworks/native/include/media/hardware",
+ "hardware/google/av/codec2/include",
+ ],
+
+ shared_libs: [
+ "android.hardware.graphics.allocator@2.0",
+ "android.hardware.graphics.bufferqueue@1.0",
+ "android.hardware.graphics.mapper@2.0",
+ "android.hardware.media.bufferpool@1.0",
+ "libbase",
+ "libbinder",
+ "libcutils",
+ "libdl",
+ "libhardware",
+ "libhidlbase",
+ "libion",
+ "libfmq",
+ "liblog",
+ "libstagefright_bufferqueue_helper",
+ "libstagefright_foundation",
+ "libstagefright_bufferpool@1.0",
+ "libui",
+ "libutils",
+ ],
+
+ cflags: [
+ "-Werror",
+ "-Wall",
+ ],
+}
+
+// public dependency for implementing Codec 2 components
+cc_defaults {
+ name: "libstagefright_codec2-impl-defaults",
+
+ shared_libs: [
+ "libbase", // for C2_LOG
+ "liblog", // for ALOG
+ "libstagefright_codec2",
+ "libstagefright_codec2_vndk",
+ "libutils",
+ ],
+}
+
+// public dependency for implementing Codec 2 framework utilities
+// THIS IS ONLY FOR FRAMEWORK USE ONLY
+cc_defaults {
+ name: "libstagefright_codec2-internal-defaults",
+ defaults: ["libstagefright_codec2-impl-defaults"],
+
+ shared_libs: [
+ "libcutils", // for properties
+ ],
+
+ // TODO: separate internal headers so they can be exposed here
+}
+
+subdirs = [
+ "bufferpool",
+]