1package {
2    default_applicable_licenses: ["frameworks_base_media_jni_license"],
3}
4
5// Added automatically by a large-scale-change
6// See: http://go/android-license-faq
7license {
8    name: "frameworks_base_media_jni_license",
9    visibility: [":__subpackages__"],
10    license_kinds: [
11        "SPDX-license-identifier-Apache-2.0",
12    ],
13    license_text: [
14        "NOTICE",
15    ],
16}
17
18cc_library_shared {
19    name: "libmedia_jni",
20
21    defaults: [
22        "aconfig_lib_cc_static_link.defaults",
23        "libcodec2-internal-defaults",
24    ],
25    min_sdk_version: "",
26
27    srcs: [
28        "android_media_ImageWriter.cpp",
29        "android_media_ImageReader.cpp",
30        "android_media_JetPlayer.cpp",
31        "android_media_MediaCrypto.cpp",
32        "android_media_MediaCodec.cpp",
33        "android_media_MediaCodecList.cpp",
34        "android_media_MediaDataSource.cpp",
35        "android_media_MediaDescrambler.cpp",
36        "android_media_MediaDrm.cpp",
37        "android_media_MediaExtractor.cpp",
38        "android_media_MediaHTTPConnection.cpp",
39        "android_media_MediaMetadataRetriever.cpp",
40        "android_media_MediaMuxer.cpp",
41        "android_media_MediaPlayer.cpp",
42        "android_media_MediaProfiles.cpp",
43        "android_media_MediaRecorder.cpp",
44        "android_media_MediaSync.cpp",
45        "android_media_PublicFormatUtils.cpp",
46        "android_media_ResampleInputStream.cpp",
47        "android_media_Streams.cpp",
48        "android_media_SyncParams.cpp",
49        "android_mtp_MtpDatabase.cpp",
50        "android_mtp_MtpDevice.cpp",
51        "android_mtp_MtpServer.cpp",
52        "JetPlayer.cpp",
53    ],
54
55    shared_libs: [
56        "audioclient-types-aidl-cpp",
57        "av-types-aidl-cpp",
58        "framework-permission-aidl-cpp",
59        "libandroid_runtime",
60        "libaudioclient",
61        "libnativehelper",
62        "libnativewindow",
63        "libutils",
64        "libbinder",
65        "libmedia",
66        "libmedia_codeclist",
67        "libmedia_jni_utils",
68        "libmedia_omx",
69        "libmediametrics",
70        "libmediadrm",
71        "libmediadrmmetrics_consumer",
72        "libhwui",
73        "libui",
74        "liblog",
75        "libcutils",
76        "libgui",
77        "libstagefright",
78        "libstagefright_foundation",
79        "libcamera_client",
80        "libmtp",
81        "libpiex",
82        "libprocessgroup",
83        "libandroidfw",
84        "libhidlallocatorutils",
85        "libhidlbase",
86        "libsonivox",
87        "server_configurable_flags",
88        "android.companion.virtual.virtualdevice_aidl-cpp",
89        "android.hardware.cas@1.0",
90        "android.hardware.cas.native@1.0",
91        "android.hardware.drm@1.3",
92        "android.hardware.drm@1.4",
93        "android.hidl.memory@1.0",
94        "android.hidl.token@1.0-utils",
95        "android.hardware.drm-V1-ndk",
96        "android.hardware.tv.tuner-V2-ndk",
97    ],
98
99    header_libs: [
100        "libhardware_headers",
101        "libmediadrm_headers",
102    ],
103
104    static_libs: [
105        "libgrallocusage",
106        "libmedia_midiiowrapper",
107        "android.companion.virtualdevice.flags-aconfig-cc",
108        "android.media.playback.flags-aconfig-cc",
109    ],
110
111    include_dirs: [
112        "frameworks/base/core/jni",
113        "frameworks/native/include/media/openmax",
114        "system/media/camera/include",
115    ],
116
117    export_include_dirs: ["."],
118
119    export_shared_lib_headers: [
120        "libpiex",
121    ],
122
123    cflags: [
124        "-Wall",
125        "-Werror",
126        "-Wno-error=deprecated-declarations",
127        "-Wunused",
128        "-Wunreachable-code",
129    ],
130
131    // TODO(b/330503129) Workaround build breakage.
132    lto_O0: true,
133}
134
135cc_library_shared {
136    name: "libmedia_jni_utils",
137    srcs: [
138        ":libgui_frame_event_aidl",
139        "android_media_Utils.cpp",
140    ],
141
142    header_libs: [
143        "libgui_headers",
144    ],
145
146    shared_libs: [
147        "liblog",
148        "libui",
149        "libutils",
150    ],
151
152    include_dirs: [
153        "system/media/camera/include",
154    ],
155
156    export_include_dirs: ["."],
157
158    cflags: [
159        "-Wall",
160        "-Werror",
161        "-Wno-error=deprecated-declarations",
162        "-Wunused",
163        "-Wunreachable-code",
164    ],
165}
166
167cc_library_shared {
168    name: "libmedia_tv_tuner",
169    min_sdk_version: "",
170    srcs: [
171        "android_media_tv_Tuner.cpp",
172        "tuner/DemuxClient.cpp",
173        "tuner/DescramblerClient.cpp",
174        "tuner/DvrClient.cpp",
175        "tuner/FilterClient.cpp",
176        "tuner/FrontendClient.cpp",
177        "tuner/LnbClient.cpp",
178        "tuner/TimeFilterClient.cpp",
179        "tuner/TunerClient.cpp",
180    ],
181
182    shared_libs: [
183        "android.hardware.graphics.bufferqueue@2.0",
184        "android.hardware.tv.tuner-V2-ndk",
185        "libbinder_ndk",
186        "libandroid_runtime",
187        "libcutils",
188        "libfmq",
189        "libhidlbase",
190        "liblog",
191        "libmedia",
192        "libnativehelper",
193        "libutils",
194        "tv_tuner_aidl_interface-ndk",
195    ],
196
197    static_libs: [
198        "libaidlcommonsupport",
199    ],
200
201    defaults: [
202        "libcodec2-impl-defaults",
203    ],
204
205    header_libs: [
206        "libcodec2_internal",
207        "libstagefright_foundation_headers",
208    ],
209
210    // TunerService is a system service required for Tuner feature.
211    // TunerJNI is a client of TunerService so we build the dependency here.
212    required: ["mediatuner"],
213
214    export_include_dirs: ["."],
215
216    cflags: [
217        "-Wall",
218        "-Werror",
219        "-Wno-error=deprecated-declarations",
220        "-Wunused",
221        "-Wunreachable-code",
222    ],
223}
224