1package {
2    // See: http://go/android-license-faq
3    // A large-scale-change added 'default_applicable_licenses' to import
4    // all of the 'license_kinds' from "frameworks_av_media_libstagefright_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Apache-2.0
7}
8
9cc_defaults {
10    name: "libstagefright_bufferqueue-defaults",
11    double_loadable: true,
12
13    srcs: [
14        ":libgui_frame_event_aidl",
15        "FrameDropper.cpp",
16        "GraphicBufferSource.cpp",
17    ],
18
19    export_include_dirs: [
20        "include",
21    ],
22
23    header_libs: [
24        "media_plugin_headers",
25    ],
26
27    export_header_lib_headers: [
28        "media_plugin_headers",
29    ],
30
31    shared_libs: [
32        "libbase",
33        "libcutils",
34        "libhidlbase",
35        "libhidlmemory",
36        "liblog",
37        "libstagefright_foundation",
38        "libui",
39        "libutils",
40
41        "android.hardware.graphics.bufferqueue@1.0",
42        "android.hardware.graphics.bufferqueue@2.0",
43    ],
44
45    export_shared_lib_headers: [
46        "libhidlmemory",
47        "libstagefright_foundation",
48        "android.hardware.graphics.bufferqueue@1.0",
49        "android.hardware.graphics.bufferqueue@2.0",
50    ],
51
52    cflags: [
53        "-Werror",
54        "-Wall",
55        "-Wno-unused-parameter",
56        "-Wno-documentation",
57    ],
58
59    sanitize: {
60        misc_undefined: [
61            "signed-integer-overflow",
62            "unsigned-integer-overflow",
63        ],
64        cfi: true,
65    },
66}
67
68cc_library_shared {
69    name: "libstagefright_bufferqueue_helper",
70    defaults: ["libstagefright_bufferqueue-defaults"],
71    vendor_available: true,
72    min_sdk_version: "29",
73
74    shared_libs: [ "libgui" ],
75    target: {
76        vendor: {
77            exclude_shared_libs: [
78                "libgui",
79            ],
80            static_libs: [
81                "libgui_bufferqueue_static",
82            ],
83            shared_libs: [
84                "android.hidl.token@1.0-utils",
85                "libEGL",
86                "libnativewindow",
87                "libvndksupport",
88            ],
89            cflags: [
90                "-DNO_BINDER",
91            ],
92        },
93    },
94}
95
96// This lib is needed on devices that doesn't use vndk,
97// on these devices we still don't want libgui to be pulled
98// in onto the apex build. It should only be used by
99// libcodec2_hidl@1.x, etc. from service side. It could
100// be removed if all builds are using vndk.
101cc_library_shared {
102    name: "libstagefright_bufferqueue_helper_novndk",
103    defaults: ["libstagefright_bufferqueue-defaults"],
104    apex_available: [
105        "com.android.media.swcodec",
106        "test_com.android.media.swcodec",
107        "//apex_available:platform",
108    ],
109    vendor_available: false,
110    min_sdk_version: "29",
111    static_libs: [
112        "libgui_bufferqueue_static",
113    ],
114    shared_libs: [
115        "android.hidl.token@1.0-utils",
116        "libEGL",
117        "libnativewindow",
118        "libvndksupport",
119    ],
120    cflags: [
121        "-DNO_BINDER",
122    ],
123}
124