xref: /aosp_15_r20/external/webrtc/sdk/android/BUILD.gn (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1*d9f75844SAndroid Build Coastguard Worker# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
2*d9f75844SAndroid Build Coastguard Worker#
3*d9f75844SAndroid Build Coastguard Worker# Use of this source code is governed by a BSD-style license
4*d9f75844SAndroid Build Coastguard Worker# that can be found in the LICENSE file in the root of the source
5*d9f75844SAndroid Build Coastguard Worker# tree. An additional intellectual property rights grant can be found
6*d9f75844SAndroid Build Coastguard Worker# in the file PATENTS.  All contributing project authors may
7*d9f75844SAndroid Build Coastguard Worker# be found in the AUTHORS file in the root of the source tree.
8*d9f75844SAndroid Build Coastguard Worker
9*d9f75844SAndroid Build Coastguard Workerif (is_android) {
10*d9f75844SAndroid Build Coastguard Worker  import("//build/config/android/config.gni")
11*d9f75844SAndroid Build Coastguard Worker  import("//build/config/android/rules.gni")
12*d9f75844SAndroid Build Coastguard Worker  import("../../webrtc.gni")
13*d9f75844SAndroid Build Coastguard Worker
14*d9f75844SAndroid Build Coastguard Worker  group("android") {
15*d9f75844SAndroid Build Coastguard Worker    if (!build_with_chromium && is_android) {
16*d9f75844SAndroid Build Coastguard Worker      public_deps = [
17*d9f75844SAndroid Build Coastguard Worker        ":libjingle_peerconnection_jni",
18*d9f75844SAndroid Build Coastguard Worker        ":libjingle_peerconnection_so",
19*d9f75844SAndroid Build Coastguard Worker        ":libwebrtc",
20*d9f75844SAndroid Build Coastguard Worker        ":native_api",
21*d9f75844SAndroid Build Coastguard Worker      ]
22*d9f75844SAndroid Build Coastguard Worker    }
23*d9f75844SAndroid Build Coastguard Worker  }
24*d9f75844SAndroid Build Coastguard Worker
25*d9f75844SAndroid Build Coastguard Worker  #####################
26*d9f75844SAndroid Build Coastguard Worker  # Aggregate targets #
27*d9f75844SAndroid Build Coastguard Worker  #####################
28*d9f75844SAndroid Build Coastguard Worker
29*d9f75844SAndroid Build Coastguard Worker  dist_jar("libwebrtc") {
30*d9f75844SAndroid Build Coastguard Worker    _target_dir_name = get_label_info(":$target_name", "dir")
31*d9f75844SAndroid Build Coastguard Worker    output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar"
32*d9f75844SAndroid Build Coastguard Worker    direct_deps_only = true
33*d9f75844SAndroid Build Coastguard Worker    use_unprocessed_jars = true
34*d9f75844SAndroid Build Coastguard Worker    requires_android = true
35*d9f75844SAndroid Build Coastguard Worker    no_build_hooks = true
36*d9f75844SAndroid Build Coastguard Worker
37*d9f75844SAndroid Build Coastguard Worker    deps = [
38*d9f75844SAndroid Build Coastguard Worker      ":audio_api_java",
39*d9f75844SAndroid Build Coastguard Worker      ":base_java",
40*d9f75844SAndroid Build Coastguard Worker      ":builtin_audio_codecs_java",
41*d9f75844SAndroid Build Coastguard Worker      ":camera_java",
42*d9f75844SAndroid Build Coastguard Worker      ":default_video_codec_factory_java",
43*d9f75844SAndroid Build Coastguard Worker      ":filevideo_java",
44*d9f75844SAndroid Build Coastguard Worker      ":hwcodecs_java",
45*d9f75844SAndroid Build Coastguard Worker      ":java_audio_device_module_java",
46*d9f75844SAndroid Build Coastguard Worker      ":libaom_av1_encoder_java",
47*d9f75844SAndroid Build Coastguard Worker      ":libjingle_peerconnection_java",
48*d9f75844SAndroid Build Coastguard Worker      ":libjingle_peerconnection_metrics_default_java",
49*d9f75844SAndroid Build Coastguard Worker      ":libvpx_vp8_java",
50*d9f75844SAndroid Build Coastguard Worker      ":libvpx_vp9_java",
51*d9f75844SAndroid Build Coastguard Worker      ":logging_java",
52*d9f75844SAndroid Build Coastguard Worker      ":peerconnection_java",
53*d9f75844SAndroid Build Coastguard Worker      ":screencapturer_java",
54*d9f75844SAndroid Build Coastguard Worker      ":surfaceviewrenderer_java",
55*d9f75844SAndroid Build Coastguard Worker      ":swcodecs_java",
56*d9f75844SAndroid Build Coastguard Worker      ":video_api_java",
57*d9f75844SAndroid Build Coastguard Worker      ":video_java",
58*d9f75844SAndroid Build Coastguard Worker      "../../modules/audio_device:audio_device_java",
59*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:base_java",
60*d9f75844SAndroid Build Coastguard Worker    ]
61*d9f75844SAndroid Build Coastguard Worker  }
62*d9f75844SAndroid Build Coastguard Worker
63*d9f75844SAndroid Build Coastguard Worker  # The native API is currently experimental and may change without notice.
64*d9f75844SAndroid Build Coastguard Worker  group("native_api") {
65*d9f75844SAndroid Build Coastguard Worker    deps = [
66*d9f75844SAndroid Build Coastguard Worker      ":native_api_audio_device_module",
67*d9f75844SAndroid Build Coastguard Worker      ":native_api_base",
68*d9f75844SAndroid Build Coastguard Worker      ":native_api_codecs",
69*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
70*d9f75844SAndroid Build Coastguard Worker      ":native_api_network_monitor",
71*d9f75844SAndroid Build Coastguard Worker      ":native_api_peerconnection",
72*d9f75844SAndroid Build Coastguard Worker      ":native_api_stacktrace",
73*d9f75844SAndroid Build Coastguard Worker      ":native_api_video",
74*d9f75844SAndroid Build Coastguard Worker    ]
75*d9f75844SAndroid Build Coastguard Worker  }
76*d9f75844SAndroid Build Coastguard Worker
77*d9f75844SAndroid Build Coastguard Worker  # Old target that pulls in everything. This will be going away in the future,
78*d9f75844SAndroid Build Coastguard Worker  # clients should depend on individual video_java etc. targets instead.
79*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("libjingle_peerconnection_java") {
80*d9f75844SAndroid Build Coastguard Worker    sources = [ "src/java/org/webrtc/Empty.java" ]
81*d9f75844SAndroid Build Coastguard Worker
82*d9f75844SAndroid Build Coastguard Worker    deps = [
83*d9f75844SAndroid Build Coastguard Worker      ":audio_api_java",
84*d9f75844SAndroid Build Coastguard Worker      ":base_java",
85*d9f75844SAndroid Build Coastguard Worker      ":camera_java",
86*d9f75844SAndroid Build Coastguard Worker      ":filevideo_java",
87*d9f75844SAndroid Build Coastguard Worker      ":hwcodecs_java",
88*d9f75844SAndroid Build Coastguard Worker      ":java_audio_device_module_java",
89*d9f75844SAndroid Build Coastguard Worker      ":peerconnection_java",
90*d9f75844SAndroid Build Coastguard Worker      ":screencapturer_java",
91*d9f75844SAndroid Build Coastguard Worker      ":surfaceviewrenderer_java",
92*d9f75844SAndroid Build Coastguard Worker      ":video_api_java",
93*d9f75844SAndroid Build Coastguard Worker      ":video_java",
94*d9f75844SAndroid Build Coastguard Worker      "//modules/audio_device:audio_device_java",
95*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:base_java",
96*d9f75844SAndroid Build Coastguard Worker    ]
97*d9f75844SAndroid Build Coastguard Worker  }
98*d9f75844SAndroid Build Coastguard Worker
99*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("libjingle_peerconnection_metrics_default_java") {
100*d9f75844SAndroid Build Coastguard Worker    sources = [ "api/org/webrtc/Metrics.java" ]
101*d9f75844SAndroid Build Coastguard Worker
102*d9f75844SAndroid Build Coastguard Worker    deps = [
103*d9f75844SAndroid Build Coastguard Worker      ":base_java",
104*d9f75844SAndroid Build Coastguard Worker      ":libjingle_peerconnection_java",
105*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:base_java",
106*d9f75844SAndroid Build Coastguard Worker    ]
107*d9f75844SAndroid Build Coastguard Worker  }
108*d9f75844SAndroid Build Coastguard Worker
109*d9f75844SAndroid Build Coastguard Worker  rtc_library("libjingle_peerconnection_jni") {
110*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
111*d9f75844SAndroid Build Coastguard Worker    allow_poison = [
112*d9f75844SAndroid Build Coastguard Worker      "audio_codecs",  # TODO(bugs.webrtc.org/8396): Remove.
113*d9f75844SAndroid Build Coastguard Worker      "software_video_codecs",  # TODO(bugs.webrtc.org/7925): Remove.
114*d9f75844SAndroid Build Coastguard Worker    ]
115*d9f75844SAndroid Build Coastguard Worker    public_deps = [  # no-presubmit-check TODO(webrtc:8603)
116*d9f75844SAndroid Build Coastguard Worker      ":audio_jni",
117*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
118*d9f75844SAndroid Build Coastguard Worker      ":builtin_audio_codecs_jni",
119*d9f75844SAndroid Build Coastguard Worker      ":default_video_codec_factory_jni",
120*d9f75844SAndroid Build Coastguard Worker      ":java_audio_device_module_jni",
121*d9f75844SAndroid Build Coastguard Worker      ":peerconnection_jni",
122*d9f75844SAndroid Build Coastguard Worker      ":video_jni",
123*d9f75844SAndroid Build Coastguard Worker      "../../api:create_peerconnection_factory",
124*d9f75844SAndroid Build Coastguard Worker    ]
125*d9f75844SAndroid Build Coastguard Worker  }
126*d9f75844SAndroid Build Coastguard Worker
127*d9f75844SAndroid Build Coastguard Worker  rtc_shared_library("libjingle_peerconnection_so") {
128*d9f75844SAndroid Build Coastguard Worker    sources = [ "src/jni/jni_onload.cc" ]
129*d9f75844SAndroid Build Coastguard Worker
130*d9f75844SAndroid Build Coastguard Worker    suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
131*d9f75844SAndroid Build Coastguard Worker    configs += [ "//build/config/android:hide_all_but_jni" ]
132*d9f75844SAndroid Build Coastguard Worker    ldflags = [
133*d9f75844SAndroid Build Coastguard Worker      "-lEGL",
134*d9f75844SAndroid Build Coastguard Worker      "-Wl,--build-id",
135*d9f75844SAndroid Build Coastguard Worker    ]
136*d9f75844SAndroid Build Coastguard Worker
137*d9f75844SAndroid Build Coastguard Worker    deps = [
138*d9f75844SAndroid Build Coastguard Worker      ":libjingle_peerconnection_jni",
139*d9f75844SAndroid Build Coastguard Worker      ":libjingle_peerconnection_metrics_default_jni",
140*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
141*d9f75844SAndroid Build Coastguard Worker      ":video_egl_jni",
142*d9f75844SAndroid Build Coastguard Worker      "../../pc:libjingle_peerconnection",
143*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base",
144*d9f75844SAndroid Build Coastguard Worker    ]
145*d9f75844SAndroid Build Coastguard Worker    output_extension = "so"
146*d9f75844SAndroid Build Coastguard Worker  }
147*d9f75844SAndroid Build Coastguard Worker
148*d9f75844SAndroid Build Coastguard Worker  #######################
149*d9f75844SAndroid Build Coastguard Worker  # Public Java modules #
150*d9f75844SAndroid Build Coastguard Worker  #######################
151*d9f75844SAndroid Build Coastguard Worker
152*d9f75844SAndroid Build Coastguard Worker  # Core targets.
153*d9f75844SAndroid Build Coastguard Worker
154*d9f75844SAndroid Build Coastguard Worker  # TODO(sakal): Extract files from this target to releveant subtargets, video, audio etc.
155*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("base_java") {
156*d9f75844SAndroid Build Coastguard Worker    sources = [
157*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/Predicate.java",
158*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RefCounted.java",
159*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/CalledByNative.java",
160*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/CalledByNativeUnchecked.java",
161*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/Histogram.java",
162*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/JniCommon.java",
163*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/JniHelper.java",
164*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/RefCountDelegate.java",
165*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/WebRtcClassLoader.java",
166*d9f75844SAndroid Build Coastguard Worker    ]
167*d9f75844SAndroid Build Coastguard Worker
168*d9f75844SAndroid Build Coastguard Worker    deps = [ "//third_party/androidx:androidx_annotation_annotation_java" ]
169*d9f75844SAndroid Build Coastguard Worker  }
170*d9f75844SAndroid Build Coastguard Worker
171*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("audio_api_java") {
172*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
173*d9f75844SAndroid Build Coastguard Worker    sources = [
174*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/AudioDecoderFactoryFactory.java",
175*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/AudioEncoderFactoryFactory.java",
176*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/audio/AudioDeviceModule.java",
177*d9f75844SAndroid Build Coastguard Worker    ]
178*d9f75844SAndroid Build Coastguard Worker
179*d9f75844SAndroid Build Coastguard Worker    deps = [
180*d9f75844SAndroid Build Coastguard Worker      ":base_java",
181*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:base_java",
182*d9f75844SAndroid Build Coastguard Worker    ]
183*d9f75844SAndroid Build Coastguard Worker  }
184*d9f75844SAndroid Build Coastguard Worker
185*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("video_api_java") {
186*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
187*d9f75844SAndroid Build Coastguard Worker    sources = [
188*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/CapturerObserver.java",
189*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/EncodedImage.java",
190*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoCodecInfo.java",
191*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoCodecStatus.java",
192*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoDecoder.java",
193*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoDecoderFactory.java",
194*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoEncoder.java",
195*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoEncoderFactory.java",
196*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoFrame.java",
197*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoSink.java",
198*d9f75844SAndroid Build Coastguard Worker    ]
199*d9f75844SAndroid Build Coastguard Worker
200*d9f75844SAndroid Build Coastguard Worker    deps = [
201*d9f75844SAndroid Build Coastguard Worker      ":base_java",
202*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:base_java",
203*d9f75844SAndroid Build Coastguard Worker      "//third_party/androidx:androidx_annotation_annotation_java",
204*d9f75844SAndroid Build Coastguard Worker    ]
205*d9f75844SAndroid Build Coastguard Worker    srcjar_deps = [ "//api/video:video_frame_enums" ]
206*d9f75844SAndroid Build Coastguard Worker  }
207*d9f75844SAndroid Build Coastguard Worker
208*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("video_java") {
209*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
210*d9f75844SAndroid Build Coastguard Worker    sources = [
211*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/EglBase.java",
212*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/EglBase10.java",
213*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/EglBase14.java",
214*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/EglRenderer.java",
215*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/GlRectDrawer.java",
216*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/GlShader.java",
217*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/GlTextureFrameBuffer.java",
218*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/GlUtil.java",
219*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/JavaI420Buffer.java",
220*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RendererCommon.java",
221*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/SurfaceTextureHelper.java",
222*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/TextureBufferImpl.java",
223*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/TimestampAligner.java",
224*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoCapturer.java",
225*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoDecoderFallback.java",
226*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoEncoderFallback.java",
227*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoFrameDrawer.java",
228*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/WrappedNativeVideoDecoder.java",
229*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/WrappedNativeVideoEncoder.java",
230*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/YuvConverter.java",
231*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/YuvHelper.java",
232*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/EglBase10Impl.java",
233*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/EglBase14Impl.java",
234*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/GlGenericDrawer.java",
235*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/H264Utils.java",
236*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/NV21Buffer.java",
237*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/VideoCodecMimeType.java",
238*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/VideoDecoderWrapper.java",
239*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/VideoEncoderWrapper.java",
240*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/WrappedNativeI420Buffer.java",
241*d9f75844SAndroid Build Coastguard Worker    ]
242*d9f75844SAndroid Build Coastguard Worker
243*d9f75844SAndroid Build Coastguard Worker    deps = [
244*d9f75844SAndroid Build Coastguard Worker      ":base_java",
245*d9f75844SAndroid Build Coastguard Worker      ":video_api_java",
246*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:base_java",
247*d9f75844SAndroid Build Coastguard Worker      "//third_party/androidx:androidx_annotation_annotation_java",
248*d9f75844SAndroid Build Coastguard Worker    ]
249*d9f75844SAndroid Build Coastguard Worker  }
250*d9f75844SAndroid Build Coastguard Worker
251*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("peerconnection_java") {
252*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
253*d9f75844SAndroid Build Coastguard Worker    sources = [
254*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/AddIceObserver.java",
255*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/AudioProcessingFactory.java",
256*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/AudioSource.java",
257*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/AudioTrack.java",
258*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/CallSessionFileRotatingLogSink.java",
259*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/CandidatePairChangeEvent.java",
260*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/CryptoOptions.java",
261*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/DataChannel.java",
262*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/DtmfSender.java",
263*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/FecControllerFactoryFactoryInterface.java",
264*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/FrameDecryptor.java",
265*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/FrameEncryptor.java",
266*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/IceCandidate.java",
267*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/IceCandidateErrorEvent.java",
268*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/MediaConstraints.java",
269*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/MediaSource.java",
270*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/MediaStream.java",
271*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/MediaStreamTrack.java",
272*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/NativeLibraryLoader.java",
273*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/NativePeerConnectionFactory.java",
274*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/NetEqFactoryFactory.java",
275*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/NetworkChangeDetector.java",
276*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/NetworkChangeDetectorFactory.java",
277*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/NetworkControllerFactoryFactory.java",
278*d9f75844SAndroid Build Coastguard Worker
279*d9f75844SAndroid Build Coastguard Worker      # TODO(sakal): Break dependencies and move to base_java.
280*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/NetworkMonitor.java",
281*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/NetworkMonitorAutoDetect.java",
282*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/NetworkStatePredictorFactoryFactory.java",
283*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/PeerConnection.java",
284*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/PeerConnectionDependencies.java",
285*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/PeerConnectionFactory.java",
286*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RTCStats.java",
287*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RTCStatsCollectorCallback.java",
288*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RTCStatsReport.java",
289*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RtcCertificatePem.java",
290*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RtpParameters.java",
291*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RtpReceiver.java",
292*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RtpSender.java",
293*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RtpTransceiver.java",
294*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/SSLCertificateVerifier.java",
295*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/SdpObserver.java",
296*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/SessionDescription.java",
297*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/StatsObserver.java",
298*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/StatsReport.java",
299*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/TurnCustomizer.java",
300*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoProcessor.java",
301*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoSource.java",
302*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoTrack.java",
303*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/NativeAndroidVideoTrackSource.java",
304*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/NativeCapturerObserver.java",
305*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/NativeLibrary.java",
306*d9f75844SAndroid Build Coastguard Worker    ]
307*d9f75844SAndroid Build Coastguard Worker
308*d9f75844SAndroid Build Coastguard Worker    deps = [
309*d9f75844SAndroid Build Coastguard Worker      ":audio_api_java",
310*d9f75844SAndroid Build Coastguard Worker      ":base_java",
311*d9f75844SAndroid Build Coastguard Worker      ":builtin_audio_codecs_java",
312*d9f75844SAndroid Build Coastguard Worker      ":default_video_codec_factory_java",
313*d9f75844SAndroid Build Coastguard Worker
314*d9f75844SAndroid Build Coastguard Worker      #TODO(bugs.webrtc.org/7452): Make injection mandatory and remove this dep.
315*d9f75844SAndroid Build Coastguard Worker      ":java_audio_device_module_java",
316*d9f75844SAndroid Build Coastguard Worker      ":logging_java",
317*d9f75844SAndroid Build Coastguard Worker      ":swcodecs_java",
318*d9f75844SAndroid Build Coastguard Worker      ":video_api_java",
319*d9f75844SAndroid Build Coastguard Worker      ":video_java",
320*d9f75844SAndroid Build Coastguard Worker      "//modules/audio_device:audio_device_java",
321*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:base_java",
322*d9f75844SAndroid Build Coastguard Worker      "//third_party/androidx:androidx_annotation_annotation_java",
323*d9f75844SAndroid Build Coastguard Worker    ]
324*d9f75844SAndroid Build Coastguard Worker    srcjar_deps = [
325*d9f75844SAndroid Build Coastguard Worker      "//api:priority_enums",
326*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:network_monitor_enums",
327*d9f75844SAndroid Build Coastguard Worker    ]
328*d9f75844SAndroid Build Coastguard Worker  }
329*d9f75844SAndroid Build Coastguard Worker
330*d9f75844SAndroid Build Coastguard Worker  # Modules, in alphabetical order.
331*d9f75844SAndroid Build Coastguard Worker
332*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("camera_java") {
333*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
334*d9f75844SAndroid Build Coastguard Worker    sources = [
335*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/Camera1Capturer.java",
336*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/Camera1Enumerator.java",
337*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/Camera2Capturer.java",
338*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/Camera2Enumerator.java",
339*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/CameraEnumerationAndroid.java",
340*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/CameraEnumerator.java",
341*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/CameraVideoCapturer.java",
342*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/Camera1Session.java",
343*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/Camera2Session.java",
344*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/CameraCapturer.java",
345*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/CameraSession.java",
346*d9f75844SAndroid Build Coastguard Worker    ]
347*d9f75844SAndroid Build Coastguard Worker
348*d9f75844SAndroid Build Coastguard Worker    deps = [
349*d9f75844SAndroid Build Coastguard Worker      ":base_java",
350*d9f75844SAndroid Build Coastguard Worker      ":video_api_java",
351*d9f75844SAndroid Build Coastguard Worker      ":video_java",
352*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:base_java",
353*d9f75844SAndroid Build Coastguard Worker      "//third_party/androidx:androidx_annotation_annotation_java",
354*d9f75844SAndroid Build Coastguard Worker    ]
355*d9f75844SAndroid Build Coastguard Worker  }
356*d9f75844SAndroid Build Coastguard Worker
357*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("default_video_codec_factory_java") {
358*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
359*d9f75844SAndroid Build Coastguard Worker    sources = [
360*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/DefaultVideoDecoderFactory.java",
361*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/DefaultVideoEncoderFactory.java",
362*d9f75844SAndroid Build Coastguard Worker    ]
363*d9f75844SAndroid Build Coastguard Worker
364*d9f75844SAndroid Build Coastguard Worker    deps = [
365*d9f75844SAndroid Build Coastguard Worker      ":hwcodecs_java",
366*d9f75844SAndroid Build Coastguard Worker      ":swcodecs_java",
367*d9f75844SAndroid Build Coastguard Worker      ":video_api_java",
368*d9f75844SAndroid Build Coastguard Worker      ":video_java",
369*d9f75844SAndroid Build Coastguard Worker      "//third_party/androidx:androidx_annotation_annotation_java",
370*d9f75844SAndroid Build Coastguard Worker    ]
371*d9f75844SAndroid Build Coastguard Worker  }
372*d9f75844SAndroid Build Coastguard Worker
373*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("filevideo_java") {
374*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
375*d9f75844SAndroid Build Coastguard Worker    sources = [
376*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/FileVideoCapturer.java",
377*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoFileRenderer.java",
378*d9f75844SAndroid Build Coastguard Worker    ]
379*d9f75844SAndroid Build Coastguard Worker
380*d9f75844SAndroid Build Coastguard Worker    deps = [
381*d9f75844SAndroid Build Coastguard Worker      ":base_java",
382*d9f75844SAndroid Build Coastguard Worker      ":video_api_java",
383*d9f75844SAndroid Build Coastguard Worker      ":video_java",
384*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:base_java",
385*d9f75844SAndroid Build Coastguard Worker    ]
386*d9f75844SAndroid Build Coastguard Worker  }
387*d9f75844SAndroid Build Coastguard Worker
388*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("hwcodecs_java") {
389*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
390*d9f75844SAndroid Build Coastguard Worker    sources = [
391*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/HardwareVideoDecoderFactory.java",
392*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/HardwareVideoEncoderFactory.java",
393*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/PlatformSoftwareVideoDecoderFactory.java",
394*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/AndroidVideoDecoder.java",
395*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/BaseBitrateAdjuster.java",
396*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/BitrateAdjuster.java",
397*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/DynamicBitrateAdjuster.java",
398*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/FramerateBitrateAdjuster.java",
399*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/HardwareVideoEncoder.java",
400*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/MediaCodecUtils.java",
401*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/MediaCodecVideoDecoderFactory.java",
402*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/MediaCodecWrapper.java",
403*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/MediaCodecWrapperFactory.java",
404*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/MediaCodecWrapperFactoryImpl.java",
405*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/NV12Buffer.java",
406*d9f75844SAndroid Build Coastguard Worker    ]
407*d9f75844SAndroid Build Coastguard Worker
408*d9f75844SAndroid Build Coastguard Worker    deps = [
409*d9f75844SAndroid Build Coastguard Worker      ":base_java",
410*d9f75844SAndroid Build Coastguard Worker      ":video_api_java",
411*d9f75844SAndroid Build Coastguard Worker      ":video_java",
412*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:base_java",
413*d9f75844SAndroid Build Coastguard Worker      "//third_party/androidx:androidx_annotation_annotation_java",
414*d9f75844SAndroid Build Coastguard Worker    ]
415*d9f75844SAndroid Build Coastguard Worker  }
416*d9f75844SAndroid Build Coastguard Worker
417*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("java_audio_device_module_java") {
418*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
419*d9f75844SAndroid Build Coastguard Worker    sources = [
420*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/audio/JavaAudioDeviceModule.java",
421*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/audio/LowLatencyAudioBufferManager.java",
422*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/audio/VolumeLogger.java",
423*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/audio/WebRtcAudioEffects.java",
424*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/audio/WebRtcAudioManager.java",
425*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/audio/WebRtcAudioRecord.java",
426*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/audio/WebRtcAudioTrack.java",
427*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/audio/WebRtcAudioUtils.java",
428*d9f75844SAndroid Build Coastguard Worker    ]
429*d9f75844SAndroid Build Coastguard Worker
430*d9f75844SAndroid Build Coastguard Worker    deps = [
431*d9f75844SAndroid Build Coastguard Worker      ":audio_api_java",
432*d9f75844SAndroid Build Coastguard Worker      ":base_java",
433*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:base_java",
434*d9f75844SAndroid Build Coastguard Worker      "//third_party/androidx:androidx_annotation_annotation_java",
435*d9f75844SAndroid Build Coastguard Worker    ]
436*d9f75844SAndroid Build Coastguard Worker  }
437*d9f75844SAndroid Build Coastguard Worker
438*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("builtin_audio_codecs_java") {
439*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
440*d9f75844SAndroid Build Coastguard Worker    sources = [
441*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/BuiltinAudioDecoderFactoryFactory.java",
442*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/BuiltinAudioEncoderFactoryFactory.java",
443*d9f75844SAndroid Build Coastguard Worker    ]
444*d9f75844SAndroid Build Coastguard Worker
445*d9f75844SAndroid Build Coastguard Worker    deps = [ ":audio_api_java" ]
446*d9f75844SAndroid Build Coastguard Worker  }
447*d9f75844SAndroid Build Coastguard Worker
448*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("screencapturer_java") {
449*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
450*d9f75844SAndroid Build Coastguard Worker    sources = [ "api/org/webrtc/ScreenCapturerAndroid.java" ]
451*d9f75844SAndroid Build Coastguard Worker
452*d9f75844SAndroid Build Coastguard Worker    deps = [
453*d9f75844SAndroid Build Coastguard Worker      ":video_api_java",
454*d9f75844SAndroid Build Coastguard Worker      ":video_java",
455*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:base_java",
456*d9f75844SAndroid Build Coastguard Worker      "//third_party/androidx:androidx_annotation_annotation_java",
457*d9f75844SAndroid Build Coastguard Worker    ]
458*d9f75844SAndroid Build Coastguard Worker  }
459*d9f75844SAndroid Build Coastguard Worker
460*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("surfaceviewrenderer_java") {
461*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
462*d9f75844SAndroid Build Coastguard Worker    sources = [
463*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/SurfaceEglRenderer.java",
464*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/SurfaceViewRenderer.java",
465*d9f75844SAndroid Build Coastguard Worker    ]
466*d9f75844SAndroid Build Coastguard Worker
467*d9f75844SAndroid Build Coastguard Worker    deps = [
468*d9f75844SAndroid Build Coastguard Worker      ":base_java",
469*d9f75844SAndroid Build Coastguard Worker      ":video_api_java",
470*d9f75844SAndroid Build Coastguard Worker      ":video_java",
471*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:base_java",
472*d9f75844SAndroid Build Coastguard Worker    ]
473*d9f75844SAndroid Build Coastguard Worker  }
474*d9f75844SAndroid Build Coastguard Worker
475*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("libvpx_vp8_java") {
476*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
477*d9f75844SAndroid Build Coastguard Worker    sources = [
478*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/LibvpxVp8Decoder.java",
479*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/LibvpxVp8Encoder.java",
480*d9f75844SAndroid Build Coastguard Worker    ]
481*d9f75844SAndroid Build Coastguard Worker    deps = [
482*d9f75844SAndroid Build Coastguard Worker      ":base_java",
483*d9f75844SAndroid Build Coastguard Worker      ":video_api_java",
484*d9f75844SAndroid Build Coastguard Worker      ":video_java",
485*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:base_java",
486*d9f75844SAndroid Build Coastguard Worker    ]
487*d9f75844SAndroid Build Coastguard Worker  }
488*d9f75844SAndroid Build Coastguard Worker
489*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("libvpx_vp9_java") {
490*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
491*d9f75844SAndroid Build Coastguard Worker    sources = [
492*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/LibvpxVp9Decoder.java",
493*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/LibvpxVp9Encoder.java",
494*d9f75844SAndroid Build Coastguard Worker    ]
495*d9f75844SAndroid Build Coastguard Worker    deps = [
496*d9f75844SAndroid Build Coastguard Worker      ":base_java",
497*d9f75844SAndroid Build Coastguard Worker      ":video_api_java",
498*d9f75844SAndroid Build Coastguard Worker      ":video_java",
499*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:base_java",
500*d9f75844SAndroid Build Coastguard Worker    ]
501*d9f75844SAndroid Build Coastguard Worker  }
502*d9f75844SAndroid Build Coastguard Worker
503*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("libaom_av1_encoder_java") {
504*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
505*d9f75844SAndroid Build Coastguard Worker    sources = [ "api/org/webrtc/LibaomAv1Encoder.java" ]
506*d9f75844SAndroid Build Coastguard Worker    deps = [
507*d9f75844SAndroid Build Coastguard Worker      ":base_java",
508*d9f75844SAndroid Build Coastguard Worker      ":video_api_java",
509*d9f75844SAndroid Build Coastguard Worker      ":video_java",
510*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:base_java",
511*d9f75844SAndroid Build Coastguard Worker    ]
512*d9f75844SAndroid Build Coastguard Worker  }
513*d9f75844SAndroid Build Coastguard Worker
514*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("dav1d_java") {
515*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
516*d9f75844SAndroid Build Coastguard Worker    sources = [ "api/org/webrtc/Dav1dDecoder.java" ]
517*d9f75844SAndroid Build Coastguard Worker    deps = [ ":video_java" ]
518*d9f75844SAndroid Build Coastguard Worker  }
519*d9f75844SAndroid Build Coastguard Worker
520*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("swcodecs_java") {
521*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
522*d9f75844SAndroid Build Coastguard Worker    sources = [
523*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/SoftwareVideoDecoderFactory.java",
524*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/SoftwareVideoEncoderFactory.java",
525*d9f75844SAndroid Build Coastguard Worker    ]
526*d9f75844SAndroid Build Coastguard Worker
527*d9f75844SAndroid Build Coastguard Worker    deps = [
528*d9f75844SAndroid Build Coastguard Worker      ":base_java",
529*d9f75844SAndroid Build Coastguard Worker      ":dav1d_java",
530*d9f75844SAndroid Build Coastguard Worker      ":libvpx_vp8_java",
531*d9f75844SAndroid Build Coastguard Worker      ":libvpx_vp9_java",
532*d9f75844SAndroid Build Coastguard Worker      ":video_api_java",
533*d9f75844SAndroid Build Coastguard Worker      ":video_java",
534*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:base_java",
535*d9f75844SAndroid Build Coastguard Worker      "//third_party/androidx:androidx_annotation_annotation_java",
536*d9f75844SAndroid Build Coastguard Worker    ]
537*d9f75844SAndroid Build Coastguard Worker  }
538*d9f75844SAndroid Build Coastguard Worker}
539*d9f75844SAndroid Build Coastguard Worker
540*d9f75844SAndroid Build Coastguard Workerif (current_os == "linux" || is_android) {
541*d9f75844SAndroid Build Coastguard Worker  ################################
542*d9f75844SAndroid Build Coastguard Worker  # JNI targets for Java modules #
543*d9f75844SAndroid Build Coastguard Worker  ################################
544*d9f75844SAndroid Build Coastguard Worker
545*d9f75844SAndroid Build Coastguard Worker  # Mirrors the order of targets in the section above.
546*d9f75844SAndroid Build Coastguard Worker
547*d9f75844SAndroid Build Coastguard Worker  rtc_library("base_jni") {
548*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
549*d9f75844SAndroid Build Coastguard Worker    sources = [
550*d9f75844SAndroid Build Coastguard Worker      "src/jni/android_histogram.cc",
551*d9f75844SAndroid Build Coastguard Worker      "src/jni/android_network_monitor.cc",
552*d9f75844SAndroid Build Coastguard Worker      "src/jni/android_network_monitor.h",
553*d9f75844SAndroid Build Coastguard Worker      "src/jni/jni_common.cc",
554*d9f75844SAndroid Build Coastguard Worker      "src/jni/jni_helpers.cc",
555*d9f75844SAndroid Build Coastguard Worker      "src/jni/jni_helpers.h",
556*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/audio.h",
557*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/logging.cc",
558*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/video.h",
559*d9f75844SAndroid Build Coastguard Worker      "src/jni/scoped_java_ref_counted.cc",
560*d9f75844SAndroid Build Coastguard Worker      "src/jni/scoped_java_ref_counted.h",
561*d9f75844SAndroid Build Coastguard Worker    ]
562*d9f75844SAndroid Build Coastguard Worker
563*d9f75844SAndroid Build Coastguard Worker    deps = [
564*d9f75844SAndroid Build Coastguard Worker      ":generated_base_jni",
565*d9f75844SAndroid Build Coastguard Worker      ":internal_jni",
566*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
567*d9f75844SAndroid Build Coastguard Worker      "../../api:field_trials_view",
568*d9f75844SAndroid Build Coastguard Worker      "../../api:libjingle_peerconnection_api",
569*d9f75844SAndroid Build Coastguard Worker      "../../api:scoped_refptr",
570*d9f75844SAndroid Build Coastguard Worker      "../../api:sequence_checker",
571*d9f75844SAndroid Build Coastguard Worker      "../../api/task_queue:pending_task_safety_flag",
572*d9f75844SAndroid Build Coastguard Worker      "../../modules/audio_processing:api",
573*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base",
574*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:checks",
575*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:ip_address",
576*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:logging",
577*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:macromagic",
578*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:refcount",
579*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:stringutils",
580*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:threading",
581*d9f75844SAndroid Build Coastguard Worker      "../../system_wrappers:field_trial",
582*d9f75844SAndroid Build Coastguard Worker      "../../system_wrappers:metrics",
583*d9f75844SAndroid Build Coastguard Worker    ]
584*d9f75844SAndroid Build Coastguard Worker    absl_deps = [
585*d9f75844SAndroid Build Coastguard Worker      "//third_party/abseil-cpp/absl/strings",
586*d9f75844SAndroid Build Coastguard Worker      "//third_party/abseil-cpp/absl/types:optional",
587*d9f75844SAndroid Build Coastguard Worker    ]
588*d9f75844SAndroid Build Coastguard Worker  }
589*d9f75844SAndroid Build Coastguard Worker
590*d9f75844SAndroid Build Coastguard Worker  rtc_library("audio_jni") {
591*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
592*d9f75844SAndroid Build Coastguard Worker    allow_poison = [ "audio_codecs" ]
593*d9f75844SAndroid Build Coastguard Worker    sources = [ "src/jni/pc/audio.cc" ]
594*d9f75844SAndroid Build Coastguard Worker
595*d9f75844SAndroid Build Coastguard Worker    deps = [
596*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
597*d9f75844SAndroid Build Coastguard Worker      "../../modules/audio_processing",
598*d9f75844SAndroid Build Coastguard Worker      "../../modules/audio_processing:api",
599*d9f75844SAndroid Build Coastguard Worker    ]
600*d9f75844SAndroid Build Coastguard Worker  }
601*d9f75844SAndroid Build Coastguard Worker
602*d9f75844SAndroid Build Coastguard Worker  rtc_library("builtin_audio_codecs_jni") {
603*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
604*d9f75844SAndroid Build Coastguard Worker    allow_poison = [ "audio_codecs" ]
605*d9f75844SAndroid Build Coastguard Worker    sources = [
606*d9f75844SAndroid Build Coastguard Worker      "src/jni/builtin_audio_decoder_factory_factory.cc",
607*d9f75844SAndroid Build Coastguard Worker      "src/jni/builtin_audio_encoder_factory_factory.cc",
608*d9f75844SAndroid Build Coastguard Worker    ]
609*d9f75844SAndroid Build Coastguard Worker
610*d9f75844SAndroid Build Coastguard Worker    deps = [
611*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
612*d9f75844SAndroid Build Coastguard Worker      ":generated_builtin_audio_codecs_jni",
613*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
614*d9f75844SAndroid Build Coastguard Worker      "../../api/audio_codecs:builtin_audio_decoder_factory",
615*d9f75844SAndroid Build Coastguard Worker      "../../api/audio_codecs:builtin_audio_encoder_factory",
616*d9f75844SAndroid Build Coastguard Worker    ]
617*d9f75844SAndroid Build Coastguard Worker  }
618*d9f75844SAndroid Build Coastguard Worker
619*d9f75844SAndroid Build Coastguard Worker  rtc_library("video_jni") {
620*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
621*d9f75844SAndroid Build Coastguard Worker    sources = [
622*d9f75844SAndroid Build Coastguard Worker      "src/jni/android_video_track_source.cc",
623*d9f75844SAndroid Build Coastguard Worker      "src/jni/android_video_track_source.h",
624*d9f75844SAndroid Build Coastguard Worker      "src/jni/encoded_image.cc",
625*d9f75844SAndroid Build Coastguard Worker      "src/jni/encoded_image.h",
626*d9f75844SAndroid Build Coastguard Worker      "src/jni/h264_utils.cc",
627*d9f75844SAndroid Build Coastguard Worker      "src/jni/java_i420_buffer.cc",
628*d9f75844SAndroid Build Coastguard Worker      "src/jni/native_capturer_observer.cc",
629*d9f75844SAndroid Build Coastguard Worker      "src/jni/native_capturer_observer.h",
630*d9f75844SAndroid Build Coastguard Worker      "src/jni/nv12_buffer.cc",
631*d9f75844SAndroid Build Coastguard Worker      "src/jni/nv21_buffer.cc",
632*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/video.cc",
633*d9f75844SAndroid Build Coastguard Worker      "src/jni/timestamp_aligner.cc",
634*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_codec_info.cc",
635*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_codec_info.h",
636*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_codec_status.cc",
637*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_codec_status.h",
638*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_decoder_factory_wrapper.cc",
639*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_decoder_factory_wrapper.h",
640*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_decoder_fallback.cc",
641*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_decoder_wrapper.cc",
642*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_decoder_wrapper.h",
643*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_encoder_factory_wrapper.cc",
644*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_encoder_factory_wrapper.h",
645*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_encoder_fallback.cc",
646*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_encoder_wrapper.cc",
647*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_encoder_wrapper.h",
648*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_sink.cc",
649*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_sink.h",
650*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_track.cc",
651*d9f75844SAndroid Build Coastguard Worker      "src/jni/yuv_helper.cc",
652*d9f75844SAndroid Build Coastguard Worker    ]
653*d9f75844SAndroid Build Coastguard Worker
654*d9f75844SAndroid Build Coastguard Worker    deps = [
655*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
656*d9f75844SAndroid Build Coastguard Worker      ":generated_video_jni",
657*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
658*d9f75844SAndroid Build Coastguard Worker      ":videoframe_jni",
659*d9f75844SAndroid Build Coastguard Worker      "../../api:libjingle_peerconnection_api",
660*d9f75844SAndroid Build Coastguard Worker      "../../api:media_stream_interface",
661*d9f75844SAndroid Build Coastguard Worker      "../../api:sequence_checker",
662*d9f75844SAndroid Build Coastguard Worker      "../../api/task_queue",
663*d9f75844SAndroid Build Coastguard Worker      "../../api/video:encoded_image",
664*d9f75844SAndroid Build Coastguard Worker      "../../api/video:render_resolution",
665*d9f75844SAndroid Build Coastguard Worker      "../../api/video:video_frame",
666*d9f75844SAndroid Build Coastguard Worker      "../../api/video:video_frame_type",
667*d9f75844SAndroid Build Coastguard Worker      "../../api/video:video_rtp_headers",
668*d9f75844SAndroid Build Coastguard Worker      "../../api/video_codecs:rtc_software_fallback_wrappers",
669*d9f75844SAndroid Build Coastguard Worker      "../../api/video_codecs:video_codecs_api",
670*d9f75844SAndroid Build Coastguard Worker      "../../common_video",
671*d9f75844SAndroid Build Coastguard Worker      "../../media:rtc_media_base",
672*d9f75844SAndroid Build Coastguard Worker      "../../modules/video_coding:codec_globals_headers",
673*d9f75844SAndroid Build Coastguard Worker      "../../modules/video_coding:video_codec_interface",
674*d9f75844SAndroid Build Coastguard Worker      "../../modules/video_coding:video_coding_utility",
675*d9f75844SAndroid Build Coastguard Worker      "../../modules/video_coding/svc:scalable_video_controller",
676*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base",
677*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:checks",
678*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:logging",
679*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:race_checker",
680*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:refcount",
681*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:rtc_task_queue",
682*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:safe_conversions",
683*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:threading",
684*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:timestamp_aligner",
685*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:timeutils",
686*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base/synchronization:mutex",
687*d9f75844SAndroid Build Coastguard Worker      "//third_party/libyuv",
688*d9f75844SAndroid Build Coastguard Worker    ]
689*d9f75844SAndroid Build Coastguard Worker    absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
690*d9f75844SAndroid Build Coastguard Worker  }
691*d9f75844SAndroid Build Coastguard Worker
692*d9f75844SAndroid Build Coastguard Worker  # Sources here require -lEGL linker flag. It is separated from video_jni
693*d9f75844SAndroid Build Coastguard Worker  # target for backwards compatibility.
694*d9f75844SAndroid Build Coastguard Worker  rtc_library("video_egl_jni") {
695*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
696*d9f75844SAndroid Build Coastguard Worker    sources = [ "src/jni/egl_base_10_impl.cc" ]
697*d9f75844SAndroid Build Coastguard Worker    deps = [
698*d9f75844SAndroid Build Coastguard Worker      ":generated_video_egl_jni",
699*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
700*d9f75844SAndroid Build Coastguard Worker    ]
701*d9f75844SAndroid Build Coastguard Worker  }
702*d9f75844SAndroid Build Coastguard Worker
703*d9f75844SAndroid Build Coastguard Worker  rtc_library("peerconnection_jni") {
704*d9f75844SAndroid Build Coastguard Worker    # Do not depend on this target externally unless you absolute have to. It is
705*d9f75844SAndroid Build Coastguard Worker    # made public because we don't have a proper NDK yet. Header APIs here are not
706*d9f75844SAndroid Build Coastguard Worker    # considered public and are subject to change.
707*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
708*d9f75844SAndroid Build Coastguard Worker
709*d9f75844SAndroid Build Coastguard Worker    sources = [
710*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/add_ice_candidate_observer.cc",
711*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/add_ice_candidate_observer.h",
712*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/android_network_monitor.h",
713*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/audio_track.cc",
714*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/call_session_file_rotating_log_sink.cc",
715*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/crypto_options.cc",
716*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/crypto_options.h",
717*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/data_channel.cc",
718*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/data_channel.h",
719*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/dtmf_sender.cc",
720*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/ice_candidate.cc",
721*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/ice_candidate.h",
722*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/media_constraints.cc",
723*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/media_constraints.h",
724*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/media_source.cc",
725*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/media_stream.cc",
726*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/media_stream.h",
727*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/media_stream_track.cc",
728*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/media_stream_track.h",
729*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/owned_factory_and_threads.cc",
730*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/owned_factory_and_threads.h",
731*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/peer_connection.cc",
732*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/peer_connection.h",
733*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/peer_connection_factory.cc",
734*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/peer_connection_factory.h",
735*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/rtc_certificate.cc",
736*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/rtc_certificate.h",
737*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/rtc_stats_collector_callback_wrapper.cc",
738*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/rtc_stats_collector_callback_wrapper.h",
739*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/rtp_parameters.cc",
740*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/rtp_parameters.h",
741*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/rtp_receiver.cc",
742*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/rtp_receiver.h",
743*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/rtp_sender.cc",
744*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/rtp_sender.h",
745*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/rtp_transceiver.cc",
746*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/rtp_transceiver.h",
747*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/sdp_observer.cc",
748*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/sdp_observer.h",
749*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/session_description.cc",
750*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/session_description.h",
751*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/ssl_certificate_verifier_wrapper.cc",
752*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/ssl_certificate_verifier_wrapper.h",
753*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/stats_observer.cc",
754*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/stats_observer.h",
755*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/turn_customizer.cc",
756*d9f75844SAndroid Build Coastguard Worker      "src/jni/pc/turn_customizer.h",
757*d9f75844SAndroid Build Coastguard Worker    ]
758*d9f75844SAndroid Build Coastguard Worker
759*d9f75844SAndroid Build Coastguard Worker    deps = [
760*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
761*d9f75844SAndroid Build Coastguard Worker      ":generated_external_classes_jni",
762*d9f75844SAndroid Build Coastguard Worker      ":generated_peerconnection_jni",
763*d9f75844SAndroid Build Coastguard Worker      ":logging_jni",
764*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
765*d9f75844SAndroid Build Coastguard Worker      ":native_api_stacktrace",
766*d9f75844SAndroid Build Coastguard Worker      "..:media_constraints",
767*d9f75844SAndroid Build Coastguard Worker      "../../api:callfactory_api",
768*d9f75844SAndroid Build Coastguard Worker      "../../api:dtmf_sender_interface",
769*d9f75844SAndroid Build Coastguard Worker      "../../api:libjingle_peerconnection_api",
770*d9f75844SAndroid Build Coastguard Worker      "../../api:media_stream_interface",
771*d9f75844SAndroid Build Coastguard Worker      "../../api:rtc_event_log_output_file",
772*d9f75844SAndroid Build Coastguard Worker      "../../api:rtp_parameters",
773*d9f75844SAndroid Build Coastguard Worker      "../../api:rtp_sender_interface",
774*d9f75844SAndroid Build Coastguard Worker      "../../api:turn_customizer",
775*d9f75844SAndroid Build Coastguard Worker      "../../api/crypto:options",
776*d9f75844SAndroid Build Coastguard Worker      "../../api/rtc_event_log:rtc_event_log_factory",
777*d9f75844SAndroid Build Coastguard Worker      "../../api/task_queue:default_task_queue_factory",
778*d9f75844SAndroid Build Coastguard Worker      "../../api/video_codecs:video_codecs_api",
779*d9f75844SAndroid Build Coastguard Worker      "../../call:call_interfaces",
780*d9f75844SAndroid Build Coastguard Worker      "../../media:rtc_audio_video",
781*d9f75844SAndroid Build Coastguard Worker      "../../media:rtc_media_base",
782*d9f75844SAndroid Build Coastguard Worker      "../../modules/audio_device",
783*d9f75844SAndroid Build Coastguard Worker      "../../modules/audio_processing:api",
784*d9f75844SAndroid Build Coastguard Worker      "../../modules/utility",
785*d9f75844SAndroid Build Coastguard Worker      "../../pc:media_stream_observer",
786*d9f75844SAndroid Build Coastguard Worker      "../../pc:webrtc_sdp",
787*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base",
788*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:checks",
789*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:event_tracer",
790*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:logging",
791*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:refcount",
792*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:rtc_task_queue",
793*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:safe_conversions",
794*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:stringutils",
795*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:threading",
796*d9f75844SAndroid Build Coastguard Worker      "../../system_wrappers:field_trial",
797*d9f75844SAndroid Build Coastguard Worker    ]
798*d9f75844SAndroid Build Coastguard Worker    absl_deps = [
799*d9f75844SAndroid Build Coastguard Worker      "//third_party/abseil-cpp/absl/memory",
800*d9f75844SAndroid Build Coastguard Worker      "//third_party/abseil-cpp/absl/types:optional",
801*d9f75844SAndroid Build Coastguard Worker    ]
802*d9f75844SAndroid Build Coastguard Worker  }
803*d9f75844SAndroid Build Coastguard Worker
804*d9f75844SAndroid Build Coastguard Worker  # JNI target for java_audio_device_module_java
805*d9f75844SAndroid Build Coastguard Worker  rtc_library("java_audio_device_module_jni") {
806*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
807*d9f75844SAndroid Build Coastguard Worker    sources = [ "src/jni/audio_device/java_audio_device_module.cc" ]
808*d9f75844SAndroid Build Coastguard Worker
809*d9f75844SAndroid Build Coastguard Worker    deps = [
810*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
811*d9f75844SAndroid Build Coastguard Worker      ":generated_java_audio_jni",
812*d9f75844SAndroid Build Coastguard Worker      ":java_audio_device_module",
813*d9f75844SAndroid Build Coastguard Worker    ]
814*d9f75844SAndroid Build Coastguard Worker  }
815*d9f75844SAndroid Build Coastguard Worker
816*d9f75844SAndroid Build Coastguard Worker  rtc_library("libjingle_peerconnection_metrics_default_jni") {
817*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
818*d9f75844SAndroid Build Coastguard Worker    sources = [ "src/jni/android_metrics.cc" ]
819*d9f75844SAndroid Build Coastguard Worker    deps = [
820*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
821*d9f75844SAndroid Build Coastguard Worker      ":generated_metrics_jni",
822*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
823*d9f75844SAndroid Build Coastguard Worker      ":peerconnection_jni",
824*d9f75844SAndroid Build Coastguard Worker      "../../pc:peerconnection",
825*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:stringutils",
826*d9f75844SAndroid Build Coastguard Worker      "../../system_wrappers:metrics",
827*d9f75844SAndroid Build Coastguard Worker    ]
828*d9f75844SAndroid Build Coastguard Worker  }
829*d9f75844SAndroid Build Coastguard Worker
830*d9f75844SAndroid Build Coastguard Worker  rtc_library("default_video_codec_factory_jni") {
831*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
832*d9f75844SAndroid Build Coastguard Worker    allow_poison = [ "software_video_codecs" ]
833*d9f75844SAndroid Build Coastguard Worker    deps = [
834*d9f75844SAndroid Build Coastguard Worker      ":swcodecs_jni",
835*d9f75844SAndroid Build Coastguard Worker      ":video_jni",
836*d9f75844SAndroid Build Coastguard Worker    ]
837*d9f75844SAndroid Build Coastguard Worker  }
838*d9f75844SAndroid Build Coastguard Worker
839*d9f75844SAndroid Build Coastguard Worker  rtc_library("libvpx_vp8_jni") {
840*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
841*d9f75844SAndroid Build Coastguard Worker    allow_poison = [ "software_video_codecs" ]
842*d9f75844SAndroid Build Coastguard Worker    sources = [ "src/jni/vp8_codec.cc" ]
843*d9f75844SAndroid Build Coastguard Worker    deps = [
844*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
845*d9f75844SAndroid Build Coastguard Worker      ":generated_libvpx_vp8_jni",
846*d9f75844SAndroid Build Coastguard Worker      ":video_jni",
847*d9f75844SAndroid Build Coastguard Worker      "../../modules/video_coding:webrtc_vp8",
848*d9f75844SAndroid Build Coastguard Worker    ]
849*d9f75844SAndroid Build Coastguard Worker  }
850*d9f75844SAndroid Build Coastguard Worker
851*d9f75844SAndroid Build Coastguard Worker  rtc_library("libvpx_vp9_jni") {
852*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
853*d9f75844SAndroid Build Coastguard Worker    allow_poison = [ "software_video_codecs" ]
854*d9f75844SAndroid Build Coastguard Worker    sources = [ "src/jni/vp9_codec.cc" ]
855*d9f75844SAndroid Build Coastguard Worker    deps = [
856*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
857*d9f75844SAndroid Build Coastguard Worker      ":generated_libvpx_vp9_jni",
858*d9f75844SAndroid Build Coastguard Worker      ":video_jni",
859*d9f75844SAndroid Build Coastguard Worker      "../../modules/video_coding:webrtc_vp9",
860*d9f75844SAndroid Build Coastguard Worker    ]
861*d9f75844SAndroid Build Coastguard Worker  }
862*d9f75844SAndroid Build Coastguard Worker
863*d9f75844SAndroid Build Coastguard Worker  rtc_library("libaom_av1_encoder_jni") {
864*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
865*d9f75844SAndroid Build Coastguard Worker    allow_poison = [ "software_video_codecs" ]
866*d9f75844SAndroid Build Coastguard Worker    sources = [ "src/jni/libaom_av1_encoder.cc" ]
867*d9f75844SAndroid Build Coastguard Worker    deps = [
868*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
869*d9f75844SAndroid Build Coastguard Worker      ":generated_libaom_av1_encoder_jni",
870*d9f75844SAndroid Build Coastguard Worker      ":video_jni",
871*d9f75844SAndroid Build Coastguard Worker      "../../modules/video_coding/codecs/av1:libaom_av1_encoder",
872*d9f75844SAndroid Build Coastguard Worker    ]
873*d9f75844SAndroid Build Coastguard Worker  }
874*d9f75844SAndroid Build Coastguard Worker
875*d9f75844SAndroid Build Coastguard Worker  rtc_library("dav1d_av1_jni") {
876*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
877*d9f75844SAndroid Build Coastguard Worker    allow_poison = [ "software_video_codecs" ]
878*d9f75844SAndroid Build Coastguard Worker    sources = [ "src/jni/dav1d_codec.cc" ]
879*d9f75844SAndroid Build Coastguard Worker    deps = [
880*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
881*d9f75844SAndroid Build Coastguard Worker      ":generated_dav1d_jni",
882*d9f75844SAndroid Build Coastguard Worker      ":video_jni",
883*d9f75844SAndroid Build Coastguard Worker      "../../modules/video_coding/codecs/av1:dav1d_decoder",
884*d9f75844SAndroid Build Coastguard Worker    ]
885*d9f75844SAndroid Build Coastguard Worker  }
886*d9f75844SAndroid Build Coastguard Worker
887*d9f75844SAndroid Build Coastguard Worker  rtc_library("swcodecs_jni") {
888*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
889*d9f75844SAndroid Build Coastguard Worker    allow_poison = [ "software_video_codecs" ]
890*d9f75844SAndroid Build Coastguard Worker    sources = [
891*d9f75844SAndroid Build Coastguard Worker      "src/jni/software_video_decoder_factory.cc",
892*d9f75844SAndroid Build Coastguard Worker      "src/jni/software_video_encoder_factory.cc",
893*d9f75844SAndroid Build Coastguard Worker    ]
894*d9f75844SAndroid Build Coastguard Worker    deps = [
895*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
896*d9f75844SAndroid Build Coastguard Worker      ":generated_swcodecs_jni",
897*d9f75844SAndroid Build Coastguard Worker      ":libvpx_vp8_jni",
898*d9f75844SAndroid Build Coastguard Worker      ":libvpx_vp9_jni",
899*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
900*d9f75844SAndroid Build Coastguard Worker      ":video_jni",
901*d9f75844SAndroid Build Coastguard Worker      "../../api/video_codecs:builtin_video_decoder_factory",
902*d9f75844SAndroid Build Coastguard Worker      "../../api/video_codecs:builtin_video_encoder_factory",
903*d9f75844SAndroid Build Coastguard Worker      "../../api/video_codecs:video_codecs_api",
904*d9f75844SAndroid Build Coastguard Worker    ]
905*d9f75844SAndroid Build Coastguard Worker  }
906*d9f75844SAndroid Build Coastguard Worker
907*d9f75844SAndroid Build Coastguard Worker  ######################
908*d9f75844SAndroid Build Coastguard Worker  # Native API targets #
909*d9f75844SAndroid Build Coastguard Worker  ######################
910*d9f75844SAndroid Build Coastguard Worker
911*d9f75844SAndroid Build Coastguard Worker  # Core targets.
912*d9f75844SAndroid Build Coastguard Worker
913*d9f75844SAndroid Build Coastguard Worker  # JNI helpers that are also needed from internal JNI code. Cannot depend on any
914*d9f75844SAndroid Build Coastguard Worker  # other JNI targets than internal_jni.
915*d9f75844SAndroid Build Coastguard Worker  rtc_library("native_api_jni") {
916*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
917*d9f75844SAndroid Build Coastguard Worker    sources = [
918*d9f75844SAndroid Build Coastguard Worker      "native_api/jni/class_loader.cc",
919*d9f75844SAndroid Build Coastguard Worker      "native_api/jni/java_types.cc",
920*d9f75844SAndroid Build Coastguard Worker      "native_api/jni/jvm.cc",
921*d9f75844SAndroid Build Coastguard Worker      "src/jni/jni_generator_helper.cc",
922*d9f75844SAndroid Build Coastguard Worker      "src/jni/jni_generator_helper.h",
923*d9f75844SAndroid Build Coastguard Worker    ]
924*d9f75844SAndroid Build Coastguard Worker
925*d9f75844SAndroid Build Coastguard Worker    public = [
926*d9f75844SAndroid Build Coastguard Worker      "native_api/jni/class_loader.h",
927*d9f75844SAndroid Build Coastguard Worker      "native_api/jni/java_types.h",
928*d9f75844SAndroid Build Coastguard Worker      "native_api/jni/jni_int_wrapper.h",
929*d9f75844SAndroid Build Coastguard Worker      "native_api/jni/jvm.h",
930*d9f75844SAndroid Build Coastguard Worker      "native_api/jni/scoped_java_ref.h",
931*d9f75844SAndroid Build Coastguard Worker    ]
932*d9f75844SAndroid Build Coastguard Worker
933*d9f75844SAndroid Build Coastguard Worker    deps = [
934*d9f75844SAndroid Build Coastguard Worker      ":generated_external_classes_jni",
935*d9f75844SAndroid Build Coastguard Worker      ":generated_native_api_jni",
936*d9f75844SAndroid Build Coastguard Worker      ":internal_jni",
937*d9f75844SAndroid Build Coastguard Worker      "../../api:sequence_checker",
938*d9f75844SAndroid Build Coastguard Worker      "//api:array_view",
939*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:checks",
940*d9f75844SAndroid Build Coastguard Worker    ]
941*d9f75844SAndroid Build Coastguard Worker    absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
942*d9f75844SAndroid Build Coastguard Worker  }
943*d9f75844SAndroid Build Coastguard Worker
944*d9f75844SAndroid Build Coastguard Worker  rtc_library("native_api_base") {
945*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
946*d9f75844SAndroid Build Coastguard Worker    sources = [
947*d9f75844SAndroid Build Coastguard Worker      "native_api/base/init.cc",
948*d9f75844SAndroid Build Coastguard Worker      "native_api/base/init.h",
949*d9f75844SAndroid Build Coastguard Worker    ]
950*d9f75844SAndroid Build Coastguard Worker
951*d9f75844SAndroid Build Coastguard Worker    deps = [
952*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
953*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
954*d9f75844SAndroid Build Coastguard Worker      "//rtc_base",
955*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:checks",
956*d9f75844SAndroid Build Coastguard Worker    ]
957*d9f75844SAndroid Build Coastguard Worker  }
958*d9f75844SAndroid Build Coastguard Worker
959*d9f75844SAndroid Build Coastguard Worker  # Modules, in alphabetical order.
960*d9f75844SAndroid Build Coastguard Worker
961*d9f75844SAndroid Build Coastguard Worker  rtc_library("native_api_audio_device_module") {
962*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
963*d9f75844SAndroid Build Coastguard Worker
964*d9f75844SAndroid Build Coastguard Worker    sources = [
965*d9f75844SAndroid Build Coastguard Worker      "native_api/audio_device_module/audio_device_android.cc",
966*d9f75844SAndroid Build Coastguard Worker      "native_api/audio_device_module/audio_device_android.h",
967*d9f75844SAndroid Build Coastguard Worker    ]
968*d9f75844SAndroid Build Coastguard Worker
969*d9f75844SAndroid Build Coastguard Worker    deps = [
970*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
971*d9f75844SAndroid Build Coastguard Worker      ":java_audio_device_module",
972*d9f75844SAndroid Build Coastguard Worker      ":opensles_audio_device_module",
973*d9f75844SAndroid Build Coastguard Worker      "../../api:scoped_refptr",
974*d9f75844SAndroid Build Coastguard Worker      "../../modules/audio_device",
975*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:checks",
976*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:logging",
977*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:refcount",
978*d9f75844SAndroid Build Coastguard Worker      "../../system_wrappers",
979*d9f75844SAndroid Build Coastguard Worker      "../../system_wrappers:metrics",
980*d9f75844SAndroid Build Coastguard Worker    ]
981*d9f75844SAndroid Build Coastguard Worker    if (rtc_enable_android_aaudio) {
982*d9f75844SAndroid Build Coastguard Worker      deps += [ ":aaudio_audio_device_module" ]
983*d9f75844SAndroid Build Coastguard Worker    }
984*d9f75844SAndroid Build Coastguard Worker  }
985*d9f75844SAndroid Build Coastguard Worker
986*d9f75844SAndroid Build Coastguard Worker  # API for wrapping Java VideoDecoderFactory/VideoEncoderFactory classes to C++
987*d9f75844SAndroid Build Coastguard Worker  # objects.
988*d9f75844SAndroid Build Coastguard Worker  rtc_library("native_api_codecs") {
989*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
990*d9f75844SAndroid Build Coastguard Worker    allow_poison = [ "audio_codecs" ]  # TODO(bugs.webrtc.org/8396): Remove.
991*d9f75844SAndroid Build Coastguard Worker    sources = [
992*d9f75844SAndroid Build Coastguard Worker      "native_api/codecs/wrapper.cc",
993*d9f75844SAndroid Build Coastguard Worker      "native_api/codecs/wrapper.h",
994*d9f75844SAndroid Build Coastguard Worker    ]
995*d9f75844SAndroid Build Coastguard Worker
996*d9f75844SAndroid Build Coastguard Worker    deps = [
997*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
998*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
999*d9f75844SAndroid Build Coastguard Worker      ":video_jni",
1000*d9f75844SAndroid Build Coastguard Worker      "//api/video_codecs:video_codecs_api",
1001*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:checks",
1002*d9f75844SAndroid Build Coastguard Worker    ]
1003*d9f75844SAndroid Build Coastguard Worker  }
1004*d9f75844SAndroid Build Coastguard Worker
1005*d9f75844SAndroid Build Coastguard Worker  rtc_library("native_api_network_monitor") {
1006*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
1007*d9f75844SAndroid Build Coastguard Worker    sources = [
1008*d9f75844SAndroid Build Coastguard Worker      "native_api/network_monitor/network_monitor.cc",
1009*d9f75844SAndroid Build Coastguard Worker      "native_api/network_monitor/network_monitor.h",
1010*d9f75844SAndroid Build Coastguard Worker    ]
1011*d9f75844SAndroid Build Coastguard Worker
1012*d9f75844SAndroid Build Coastguard Worker    deps = [
1013*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
1014*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:threading",
1015*d9f75844SAndroid Build Coastguard Worker      "//rtc_base",
1016*d9f75844SAndroid Build Coastguard Worker    ]
1017*d9f75844SAndroid Build Coastguard Worker  }
1018*d9f75844SAndroid Build Coastguard Worker
1019*d9f75844SAndroid Build Coastguard Worker  # API for creating Java PeerConnectionFactory from C++ equivalents.
1020*d9f75844SAndroid Build Coastguard Worker  rtc_library("native_api_peerconnection") {
1021*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
1022*d9f75844SAndroid Build Coastguard Worker    sources = [
1023*d9f75844SAndroid Build Coastguard Worker      "native_api/peerconnection/peer_connection_factory.cc",
1024*d9f75844SAndroid Build Coastguard Worker      "native_api/peerconnection/peer_connection_factory.h",
1025*d9f75844SAndroid Build Coastguard Worker    ]
1026*d9f75844SAndroid Build Coastguard Worker    deps = [
1027*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
1028*d9f75844SAndroid Build Coastguard Worker      ":peerconnection_jni",
1029*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:threading",
1030*d9f75844SAndroid Build Coastguard Worker      "//api:libjingle_peerconnection_api",
1031*d9f75844SAndroid Build Coastguard Worker      "//api/video_codecs:video_codecs_api",
1032*d9f75844SAndroid Build Coastguard Worker      "//rtc_base",
1033*d9f75844SAndroid Build Coastguard Worker    ]
1034*d9f75844SAndroid Build Coastguard Worker  }
1035*d9f75844SAndroid Build Coastguard Worker
1036*d9f75844SAndroid Build Coastguard Worker  # API for capturing and printing native stacktraces.
1037*d9f75844SAndroid Build Coastguard Worker  rtc_library("native_api_stacktrace") {
1038*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
1039*d9f75844SAndroid Build Coastguard Worker    sources = [
1040*d9f75844SAndroid Build Coastguard Worker      "native_api/stacktrace/stacktrace.cc",
1041*d9f75844SAndroid Build Coastguard Worker      "native_api/stacktrace/stacktrace.h",
1042*d9f75844SAndroid Build Coastguard Worker    ]
1043*d9f75844SAndroid Build Coastguard Worker
1044*d9f75844SAndroid Build Coastguard Worker    deps = [
1045*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:criticalsection",
1046*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:logging",
1047*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:stringutils",
1048*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base/synchronization:mutex",
1049*d9f75844SAndroid Build Coastguard Worker    ]
1050*d9f75844SAndroid Build Coastguard Worker    absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ]
1051*d9f75844SAndroid Build Coastguard Worker  }
1052*d9f75844SAndroid Build Coastguard Worker
1053*d9f75844SAndroid Build Coastguard Worker  # API for creating C++ wrapper implementations of api/mediastreaminterface.h
1054*d9f75844SAndroid Build Coastguard Worker  # video interfaces from their Java equivalents.
1055*d9f75844SAndroid Build Coastguard Worker  rtc_library("native_api_video") {
1056*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
1057*d9f75844SAndroid Build Coastguard Worker    allow_poison = [ "audio_codecs" ]  # TODO(bugs.webrtc.org/8396): Remove.
1058*d9f75844SAndroid Build Coastguard Worker    sources = [
1059*d9f75844SAndroid Build Coastguard Worker      "native_api/video/video_source.cc",
1060*d9f75844SAndroid Build Coastguard Worker      "native_api/video/video_source.h",
1061*d9f75844SAndroid Build Coastguard Worker      "native_api/video/wrapper.cc",
1062*d9f75844SAndroid Build Coastguard Worker      "native_api/video/wrapper.h",
1063*d9f75844SAndroid Build Coastguard Worker    ]
1064*d9f75844SAndroid Build Coastguard Worker    deps = [
1065*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
1066*d9f75844SAndroid Build Coastguard Worker      ":video_jni",
1067*d9f75844SAndroid Build Coastguard Worker      ":videoframe_jni",
1068*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:refcount",
1069*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:threading",
1070*d9f75844SAndroid Build Coastguard Worker      "//api:libjingle_peerconnection_api",
1071*d9f75844SAndroid Build Coastguard Worker      "//api:media_stream_interface",
1072*d9f75844SAndroid Build Coastguard Worker      "//api/video:video_frame",
1073*d9f75844SAndroid Build Coastguard Worker      "//api/video:video_rtp_headers",
1074*d9f75844SAndroid Build Coastguard Worker      "//rtc_base",
1075*d9f75844SAndroid Build Coastguard Worker    ]
1076*d9f75844SAndroid Build Coastguard Worker  }
1077*d9f75844SAndroid Build Coastguard Worker
1078*d9f75844SAndroid Build Coastguard Worker  ####################
1079*d9f75844SAndroid Build Coastguard Worker  # Internal targets #
1080*d9f75844SAndroid Build Coastguard Worker  ####################
1081*d9f75844SAndroid Build Coastguard Worker
1082*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("logging_java") {
1083*d9f75844SAndroid Build Coastguard Worker    sources = [ "src/java/org/webrtc/JNILogging.java" ]
1084*d9f75844SAndroid Build Coastguard Worker
1085*d9f75844SAndroid Build Coastguard Worker    deps = [
1086*d9f75844SAndroid Build Coastguard Worker      ":base_java",
1087*d9f75844SAndroid Build Coastguard Worker      "//rtc_base:base_java",
1088*d9f75844SAndroid Build Coastguard Worker    ]
1089*d9f75844SAndroid Build Coastguard Worker  }
1090*d9f75844SAndroid Build Coastguard Worker
1091*d9f75844SAndroid Build Coastguard Worker  # Internal code that is needed by native_api_jni. The code cannot be placed in
1092*d9f75844SAndroid Build Coastguard Worker  # base_jni because native_api_jni depends on the code (and base_jni depends on
1093*d9f75844SAndroid Build Coastguard Worker  # native_api_jni).
1094*d9f75844SAndroid Build Coastguard Worker  rtc_library("internal_jni") {
1095*d9f75844SAndroid Build Coastguard Worker    sources = [
1096*d9f75844SAndroid Build Coastguard Worker      "src/jni/jvm.cc",
1097*d9f75844SAndroid Build Coastguard Worker      "src/jni/jvm.h",
1098*d9f75844SAndroid Build Coastguard Worker    ]
1099*d9f75844SAndroid Build Coastguard Worker
1100*d9f75844SAndroid Build Coastguard Worker    deps = [ "../../rtc_base:checks" ]
1101*d9f75844SAndroid Build Coastguard Worker  }
1102*d9f75844SAndroid Build Coastguard Worker
1103*d9f75844SAndroid Build Coastguard Worker  rtc_library("videoframe_jni") {
1104*d9f75844SAndroid Build Coastguard Worker    sources = [
1105*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_frame.cc",
1106*d9f75844SAndroid Build Coastguard Worker      "src/jni/video_frame.h",
1107*d9f75844SAndroid Build Coastguard Worker      "src/jni/wrapped_native_i420_buffer.cc",
1108*d9f75844SAndroid Build Coastguard Worker      "src/jni/wrapped_native_i420_buffer.h",
1109*d9f75844SAndroid Build Coastguard Worker    ]
1110*d9f75844SAndroid Build Coastguard Worker
1111*d9f75844SAndroid Build Coastguard Worker    deps = [
1112*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
1113*d9f75844SAndroid Build Coastguard Worker      ":generated_video_jni",
1114*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
1115*d9f75844SAndroid Build Coastguard Worker      "../../api:scoped_refptr",
1116*d9f75844SAndroid Build Coastguard Worker      "../../api/video:video_frame",
1117*d9f75844SAndroid Build Coastguard Worker      "../../api/video:video_rtp_headers",
1118*d9f75844SAndroid Build Coastguard Worker      "../../common_video",
1119*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base",
1120*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:checks",
1121*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:refcount",
1122*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:timeutils",
1123*d9f75844SAndroid Build Coastguard Worker    ]
1124*d9f75844SAndroid Build Coastguard Worker  }
1125*d9f75844SAndroid Build Coastguard Worker
1126*d9f75844SAndroid Build Coastguard Worker  rtc_library("logging_jni") {
1127*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
1128*d9f75844SAndroid Build Coastguard Worker    sources = [
1129*d9f75844SAndroid Build Coastguard Worker      "src/jni/logging/log_sink.cc",
1130*d9f75844SAndroid Build Coastguard Worker      "src/jni/logging/log_sink.h",
1131*d9f75844SAndroid Build Coastguard Worker    ]
1132*d9f75844SAndroid Build Coastguard Worker
1133*d9f75844SAndroid Build Coastguard Worker    deps = [
1134*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
1135*d9f75844SAndroid Build Coastguard Worker      ":generated_logging_jni",
1136*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
1137*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base",
1138*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:logging",
1139*d9f75844SAndroid Build Coastguard Worker    ]
1140*d9f75844SAndroid Build Coastguard Worker
1141*d9f75844SAndroid Build Coastguard Worker    absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
1142*d9f75844SAndroid Build Coastguard Worker  }
1143*d9f75844SAndroid Build Coastguard Worker
1144*d9f75844SAndroid Build Coastguard Worker  rtc_library("audio_device_module_base") {
1145*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
1146*d9f75844SAndroid Build Coastguard Worker
1147*d9f75844SAndroid Build Coastguard Worker    sources = [
1148*d9f75844SAndroid Build Coastguard Worker      "src/jni/audio_device/audio_common.h",
1149*d9f75844SAndroid Build Coastguard Worker      "src/jni/audio_device/audio_device_module.cc",
1150*d9f75844SAndroid Build Coastguard Worker      "src/jni/audio_device/audio_device_module.h",
1151*d9f75844SAndroid Build Coastguard Worker    ]
1152*d9f75844SAndroid Build Coastguard Worker
1153*d9f75844SAndroid Build Coastguard Worker    deps = [
1154*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
1155*d9f75844SAndroid Build Coastguard Worker      ":generated_audio_device_module_base_jni",
1156*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
1157*d9f75844SAndroid Build Coastguard Worker      "../../api:make_ref_counted",
1158*d9f75844SAndroid Build Coastguard Worker      "../../api:sequence_checker",
1159*d9f75844SAndroid Build Coastguard Worker      "../../api/task_queue",
1160*d9f75844SAndroid Build Coastguard Worker      "../../api/task_queue:default_task_queue_factory",
1161*d9f75844SAndroid Build Coastguard Worker      "../../modules/audio_device:audio_device_api",
1162*d9f75844SAndroid Build Coastguard Worker      "../../modules/audio_device:audio_device_buffer",
1163*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:checks",
1164*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:logging",
1165*d9f75844SAndroid Build Coastguard Worker      "../../system_wrappers:metrics",
1166*d9f75844SAndroid Build Coastguard Worker    ]
1167*d9f75844SAndroid Build Coastguard Worker    absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
1168*d9f75844SAndroid Build Coastguard Worker  }
1169*d9f75844SAndroid Build Coastguard Worker
1170*d9f75844SAndroid Build Coastguard Worker  rtc_library("java_audio_device_module") {
1171*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
1172*d9f75844SAndroid Build Coastguard Worker
1173*d9f75844SAndroid Build Coastguard Worker    sources = [
1174*d9f75844SAndroid Build Coastguard Worker      "src/jni/audio_device/audio_record_jni.cc",
1175*d9f75844SAndroid Build Coastguard Worker      "src/jni/audio_device/audio_record_jni.h",
1176*d9f75844SAndroid Build Coastguard Worker      "src/jni/audio_device/audio_track_jni.cc",
1177*d9f75844SAndroid Build Coastguard Worker      "src/jni/audio_device/audio_track_jni.h",
1178*d9f75844SAndroid Build Coastguard Worker    ]
1179*d9f75844SAndroid Build Coastguard Worker    deps = [
1180*d9f75844SAndroid Build Coastguard Worker      ":audio_device_module_base",
1181*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
1182*d9f75844SAndroid Build Coastguard Worker      ":generated_java_audio_device_module_native_jni",
1183*d9f75844SAndroid Build Coastguard Worker      "../../api:sequence_checker",
1184*d9f75844SAndroid Build Coastguard Worker      "../../modules/audio_device",
1185*d9f75844SAndroid Build Coastguard Worker      "../../modules/audio_device:audio_device_buffer",
1186*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:checks",
1187*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:logging",
1188*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:macromagic",
1189*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:platform_thread",
1190*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:timeutils",
1191*d9f75844SAndroid Build Coastguard Worker      "../../system_wrappers:field_trial",
1192*d9f75844SAndroid Build Coastguard Worker      "../../system_wrappers:metrics",
1193*d9f75844SAndroid Build Coastguard Worker    ]
1194*d9f75844SAndroid Build Coastguard Worker    absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
1195*d9f75844SAndroid Build Coastguard Worker  }
1196*d9f75844SAndroid Build Coastguard Worker
1197*d9f75844SAndroid Build Coastguard Worker  if (rtc_enable_android_aaudio) {
1198*d9f75844SAndroid Build Coastguard Worker    rtc_library("aaudio_audio_device_module") {
1199*d9f75844SAndroid Build Coastguard Worker      visibility = [ "*" ]
1200*d9f75844SAndroid Build Coastguard Worker      defines = [ "WEBRTC_AUDIO_DEVICE_INCLUDE_ANDROID_AAUDIO" ]
1201*d9f75844SAndroid Build Coastguard Worker      sources = [
1202*d9f75844SAndroid Build Coastguard Worker        "src/jni/audio_device/aaudio_player.cc",
1203*d9f75844SAndroid Build Coastguard Worker        "src/jni/audio_device/aaudio_player.h",
1204*d9f75844SAndroid Build Coastguard Worker        "src/jni/audio_device/aaudio_recorder.cc",
1205*d9f75844SAndroid Build Coastguard Worker        "src/jni/audio_device/aaudio_recorder.h",
1206*d9f75844SAndroid Build Coastguard Worker        "src/jni/audio_device/aaudio_wrapper.cc",
1207*d9f75844SAndroid Build Coastguard Worker        "src/jni/audio_device/aaudio_wrapper.h",
1208*d9f75844SAndroid Build Coastguard Worker      ]
1209*d9f75844SAndroid Build Coastguard Worker      libs = [ "aaudio" ]
1210*d9f75844SAndroid Build Coastguard Worker      deps = [
1211*d9f75844SAndroid Build Coastguard Worker        ":audio_device_module_base",
1212*d9f75844SAndroid Build Coastguard Worker        ":base_jni",
1213*d9f75844SAndroid Build Coastguard Worker        "../../api:array_view",
1214*d9f75844SAndroid Build Coastguard Worker        "../../api:sequence_checker",
1215*d9f75844SAndroid Build Coastguard Worker        "../../api/task_queue",
1216*d9f75844SAndroid Build Coastguard Worker        "../../modules/audio_device",
1217*d9f75844SAndroid Build Coastguard Worker        "../../modules/audio_device:audio_device_buffer",
1218*d9f75844SAndroid Build Coastguard Worker        "../../rtc_base:checks",
1219*d9f75844SAndroid Build Coastguard Worker        "../../rtc_base:logging",
1220*d9f75844SAndroid Build Coastguard Worker        "../../rtc_base:macromagic",
1221*d9f75844SAndroid Build Coastguard Worker        "../../rtc_base:stringutils",
1222*d9f75844SAndroid Build Coastguard Worker        "../../rtc_base:timeutils",
1223*d9f75844SAndroid Build Coastguard Worker        "../../system_wrappers",
1224*d9f75844SAndroid Build Coastguard Worker      ]
1225*d9f75844SAndroid Build Coastguard Worker      absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
1226*d9f75844SAndroid Build Coastguard Worker    }
1227*d9f75844SAndroid Build Coastguard Worker  }
1228*d9f75844SAndroid Build Coastguard Worker
1229*d9f75844SAndroid Build Coastguard Worker  rtc_library("opensles_audio_device_module") {
1230*d9f75844SAndroid Build Coastguard Worker    visibility = [ "*" ]
1231*d9f75844SAndroid Build Coastguard Worker    sources = [
1232*d9f75844SAndroid Build Coastguard Worker      "src/jni/audio_device/opensles_common.cc",
1233*d9f75844SAndroid Build Coastguard Worker      "src/jni/audio_device/opensles_common.h",
1234*d9f75844SAndroid Build Coastguard Worker      "src/jni/audio_device/opensles_player.cc",
1235*d9f75844SAndroid Build Coastguard Worker      "src/jni/audio_device/opensles_player.h",
1236*d9f75844SAndroid Build Coastguard Worker      "src/jni/audio_device/opensles_recorder.cc",
1237*d9f75844SAndroid Build Coastguard Worker      "src/jni/audio_device/opensles_recorder.h",
1238*d9f75844SAndroid Build Coastguard Worker    ]
1239*d9f75844SAndroid Build Coastguard Worker    libs = [ "OpenSLES" ]
1240*d9f75844SAndroid Build Coastguard Worker    deps = [
1241*d9f75844SAndroid Build Coastguard Worker      ":audio_device_module_base",
1242*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
1243*d9f75844SAndroid Build Coastguard Worker      "../../api:array_view",
1244*d9f75844SAndroid Build Coastguard Worker      "../../api:refcountedbase",
1245*d9f75844SAndroid Build Coastguard Worker      "../../api:scoped_refptr",
1246*d9f75844SAndroid Build Coastguard Worker      "../../api:sequence_checker",
1247*d9f75844SAndroid Build Coastguard Worker      "../../modules/audio_device",
1248*d9f75844SAndroid Build Coastguard Worker      "../../modules/audio_device:audio_device_buffer",
1249*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:checks",
1250*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:logging",
1251*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:macromagic",
1252*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:platform_thread",
1253*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:timeutils",
1254*d9f75844SAndroid Build Coastguard Worker    ]
1255*d9f75844SAndroid Build Coastguard Worker    absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
1256*d9f75844SAndroid Build Coastguard Worker  }
1257*d9f75844SAndroid Build Coastguard Worker
1258*d9f75844SAndroid Build Coastguard Worker  #########################
1259*d9f75844SAndroid Build Coastguard Worker  # Generated JNI targets #
1260*d9f75844SAndroid Build Coastguard Worker  #########################
1261*d9f75844SAndroid Build Coastguard Worker
1262*d9f75844SAndroid Build Coastguard Worker  generate_jar_jni("generated_external_classes_jni") {
1263*d9f75844SAndroid Build Coastguard Worker    classes = [
1264*d9f75844SAndroid Build Coastguard Worker      "java/lang/Integer.class",
1265*d9f75844SAndroid Build Coastguard Worker      "java/lang/Double.class",
1266*d9f75844SAndroid Build Coastguard Worker      "java/lang/Long.class",
1267*d9f75844SAndroid Build Coastguard Worker      "java/lang/Iterable.class",
1268*d9f75844SAndroid Build Coastguard Worker      "java/util/Iterator.class",
1269*d9f75844SAndroid Build Coastguard Worker      "java/lang/Boolean.class",
1270*d9f75844SAndroid Build Coastguard Worker      "java/math/BigInteger.class",
1271*d9f75844SAndroid Build Coastguard Worker      "java/util/Map.class",
1272*d9f75844SAndroid Build Coastguard Worker      "java/util/LinkedHashMap.class",
1273*d9f75844SAndroid Build Coastguard Worker      "java/util/ArrayList.class",
1274*d9f75844SAndroid Build Coastguard Worker      "java/lang/Enum.class",
1275*d9f75844SAndroid Build Coastguard Worker    ]
1276*d9f75844SAndroid Build Coastguard Worker    jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
1277*d9f75844SAndroid Build Coastguard Worker  }
1278*d9f75844SAndroid Build Coastguard Worker
1279*d9f75844SAndroid Build Coastguard Worker  generate_jni("generated_metrics_jni") {
1280*d9f75844SAndroid Build Coastguard Worker    sources = [ "api/org/webrtc/Metrics.java" ]
1281*d9f75844SAndroid Build Coastguard Worker    namespace = "webrtc::jni"
1282*d9f75844SAndroid Build Coastguard Worker    jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
1283*d9f75844SAndroid Build Coastguard Worker  }
1284*d9f75844SAndroid Build Coastguard Worker
1285*d9f75844SAndroid Build Coastguard Worker  # Generated JNI for public JNI targets, matching order of targets
1286*d9f75844SAndroid Build Coastguard Worker
1287*d9f75844SAndroid Build Coastguard Worker  generate_jni("generated_base_jni") {
1288*d9f75844SAndroid Build Coastguard Worker    sources = [
1289*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/NetworkChangeDetector.java",
1290*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/NetworkMonitor.java",
1291*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RefCounted.java",
1292*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/Histogram.java",
1293*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/JniCommon.java",
1294*d9f75844SAndroid Build Coastguard Worker    ]
1295*d9f75844SAndroid Build Coastguard Worker    namespace = "webrtc::jni"
1296*d9f75844SAndroid Build Coastguard Worker    jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
1297*d9f75844SAndroid Build Coastguard Worker  }
1298*d9f75844SAndroid Build Coastguard Worker
1299*d9f75844SAndroid Build Coastguard Worker  generate_jni("generated_video_jni") {
1300*d9f75844SAndroid Build Coastguard Worker    sources = [
1301*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/EncodedImage.java",
1302*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/JavaI420Buffer.java",
1303*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/TimestampAligner.java",
1304*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoCodecInfo.java",
1305*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoCodecStatus.java",
1306*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoDecoder.java",
1307*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoDecoderFactory.java",
1308*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoDecoderFallback.java",
1309*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoEncoder.java",
1310*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoEncoderFactory.java",
1311*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoEncoderFallback.java",
1312*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoFrame.java",
1313*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoSink.java",
1314*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/VideoTrack.java",
1315*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/YuvHelper.java",
1316*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/H264Utils.java",
1317*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/NV12Buffer.java",
1318*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/NV21Buffer.java",
1319*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/NativeAndroidVideoTrackSource.java",
1320*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/NativeCapturerObserver.java",
1321*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/VideoDecoderWrapper.java",
1322*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/VideoEncoderWrapper.java",
1323*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/WrappedNativeI420Buffer.java",
1324*d9f75844SAndroid Build Coastguard Worker    ]
1325*d9f75844SAndroid Build Coastguard Worker    namespace = "webrtc::jni"
1326*d9f75844SAndroid Build Coastguard Worker    jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
1327*d9f75844SAndroid Build Coastguard Worker  }
1328*d9f75844SAndroid Build Coastguard Worker
1329*d9f75844SAndroid Build Coastguard Worker  generate_jni("generated_video_egl_jni") {
1330*d9f75844SAndroid Build Coastguard Worker    sources = [ "src/java/org/webrtc/EglBase10Impl.java" ]
1331*d9f75844SAndroid Build Coastguard Worker    namespace = "webrtc::jni"
1332*d9f75844SAndroid Build Coastguard Worker    jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
1333*d9f75844SAndroid Build Coastguard Worker  }
1334*d9f75844SAndroid Build Coastguard Worker
1335*d9f75844SAndroid Build Coastguard Worker  generate_jni("generated_libvpx_vp8_jni") {
1336*d9f75844SAndroid Build Coastguard Worker    sources = [
1337*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/LibvpxVp8Decoder.java",
1338*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/LibvpxVp8Encoder.java",
1339*d9f75844SAndroid Build Coastguard Worker    ]
1340*d9f75844SAndroid Build Coastguard Worker
1341*d9f75844SAndroid Build Coastguard Worker    namespace = "webrtc::jni"
1342*d9f75844SAndroid Build Coastguard Worker    jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
1343*d9f75844SAndroid Build Coastguard Worker  }
1344*d9f75844SAndroid Build Coastguard Worker
1345*d9f75844SAndroid Build Coastguard Worker  generate_jni("generated_libvpx_vp9_jni") {
1346*d9f75844SAndroid Build Coastguard Worker    sources = [
1347*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/LibvpxVp9Decoder.java",
1348*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/LibvpxVp9Encoder.java",
1349*d9f75844SAndroid Build Coastguard Worker    ]
1350*d9f75844SAndroid Build Coastguard Worker
1351*d9f75844SAndroid Build Coastguard Worker    namespace = "webrtc::jni"
1352*d9f75844SAndroid Build Coastguard Worker    jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
1353*d9f75844SAndroid Build Coastguard Worker  }
1354*d9f75844SAndroid Build Coastguard Worker
1355*d9f75844SAndroid Build Coastguard Worker  generate_jni("generated_libaom_av1_encoder_jni") {
1356*d9f75844SAndroid Build Coastguard Worker    sources = [ "api/org/webrtc/LibaomAv1Encoder.java" ]
1357*d9f75844SAndroid Build Coastguard Worker
1358*d9f75844SAndroid Build Coastguard Worker    namespace = "webrtc::jni"
1359*d9f75844SAndroid Build Coastguard Worker    jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
1360*d9f75844SAndroid Build Coastguard Worker  }
1361*d9f75844SAndroid Build Coastguard Worker
1362*d9f75844SAndroid Build Coastguard Worker  generate_jni("generated_dav1d_jni") {
1363*d9f75844SAndroid Build Coastguard Worker    sources = [ "api/org/webrtc/Dav1dDecoder.java" ]
1364*d9f75844SAndroid Build Coastguard Worker
1365*d9f75844SAndroid Build Coastguard Worker    namespace = "webrtc::jni"
1366*d9f75844SAndroid Build Coastguard Worker    jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
1367*d9f75844SAndroid Build Coastguard Worker  }
1368*d9f75844SAndroid Build Coastguard Worker
1369*d9f75844SAndroid Build Coastguard Worker  generate_jni("generated_swcodecs_jni") {
1370*d9f75844SAndroid Build Coastguard Worker    sources = [
1371*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/SoftwareVideoDecoderFactory.java",
1372*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/SoftwareVideoEncoderFactory.java",
1373*d9f75844SAndroid Build Coastguard Worker    ]
1374*d9f75844SAndroid Build Coastguard Worker
1375*d9f75844SAndroid Build Coastguard Worker    namespace = "webrtc::jni"
1376*d9f75844SAndroid Build Coastguard Worker    jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
1377*d9f75844SAndroid Build Coastguard Worker  }
1378*d9f75844SAndroid Build Coastguard Worker
1379*d9f75844SAndroid Build Coastguard Worker  generate_jni("generated_peerconnection_jni") {
1380*d9f75844SAndroid Build Coastguard Worker    sources = [
1381*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/AddIceObserver.java",
1382*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/AudioTrack.java",
1383*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/CallSessionFileRotatingLogSink.java",
1384*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/CandidatePairChangeEvent.java",
1385*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/CryptoOptions.java",
1386*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/DataChannel.java",
1387*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/DtmfSender.java",
1388*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/IceCandidate.java",
1389*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/IceCandidateErrorEvent.java",
1390*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/MediaConstraints.java",
1391*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/MediaSource.java",
1392*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/MediaStream.java",
1393*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/MediaStreamTrack.java",
1394*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/PeerConnection.java",
1395*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/PeerConnectionFactory.java",
1396*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RTCStats.java",
1397*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RTCStatsCollectorCallback.java",
1398*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RTCStatsReport.java",
1399*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RtcCertificatePem.java",
1400*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RtpParameters.java",
1401*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RtpReceiver.java",
1402*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RtpSender.java",
1403*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/RtpTransceiver.java",
1404*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/SSLCertificateVerifier.java",
1405*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/SdpObserver.java",
1406*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/SessionDescription.java",
1407*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/StatsObserver.java",
1408*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/StatsReport.java",
1409*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/TurnCustomizer.java",
1410*d9f75844SAndroid Build Coastguard Worker    ]
1411*d9f75844SAndroid Build Coastguard Worker    namespace = "webrtc::jni"
1412*d9f75844SAndroid Build Coastguard Worker    jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
1413*d9f75844SAndroid Build Coastguard Worker  }
1414*d9f75844SAndroid Build Coastguard Worker
1415*d9f75844SAndroid Build Coastguard Worker  generate_jni("generated_java_audio_jni") {
1416*d9f75844SAndroid Build Coastguard Worker    sources = [ "api/org/webrtc/audio/JavaAudioDeviceModule.java" ]
1417*d9f75844SAndroid Build Coastguard Worker    namespace = "webrtc::jni"
1418*d9f75844SAndroid Build Coastguard Worker    jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
1419*d9f75844SAndroid Build Coastguard Worker  }
1420*d9f75844SAndroid Build Coastguard Worker
1421*d9f75844SAndroid Build Coastguard Worker  generate_jni("generated_builtin_audio_codecs_jni") {
1422*d9f75844SAndroid Build Coastguard Worker    sources = [
1423*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/BuiltinAudioDecoderFactoryFactory.java",
1424*d9f75844SAndroid Build Coastguard Worker      "api/org/webrtc/BuiltinAudioEncoderFactoryFactory.java",
1425*d9f75844SAndroid Build Coastguard Worker    ]
1426*d9f75844SAndroid Build Coastguard Worker    namespace = "webrtc::jni"
1427*d9f75844SAndroid Build Coastguard Worker    jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
1428*d9f75844SAndroid Build Coastguard Worker  }
1429*d9f75844SAndroid Build Coastguard Worker
1430*d9f75844SAndroid Build Coastguard Worker  # Generated JNI for native API targets
1431*d9f75844SAndroid Build Coastguard Worker
1432*d9f75844SAndroid Build Coastguard Worker  generate_jni("generated_native_api_jni") {
1433*d9f75844SAndroid Build Coastguard Worker    sources = [
1434*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/JniHelper.java",
1435*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/WebRtcClassLoader.java",
1436*d9f75844SAndroid Build Coastguard Worker    ]
1437*d9f75844SAndroid Build Coastguard Worker    namespace = "webrtc::jni"
1438*d9f75844SAndroid Build Coastguard Worker    jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
1439*d9f75844SAndroid Build Coastguard Worker  }
1440*d9f75844SAndroid Build Coastguard Worker
1441*d9f75844SAndroid Build Coastguard Worker  # Generated JNI for internal targets.
1442*d9f75844SAndroid Build Coastguard Worker
1443*d9f75844SAndroid Build Coastguard Worker  generate_jni("generated_logging_jni") {
1444*d9f75844SAndroid Build Coastguard Worker    sources = [ "src/java/org/webrtc/JNILogging.java" ]
1445*d9f75844SAndroid Build Coastguard Worker    jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
1446*d9f75844SAndroid Build Coastguard Worker  }
1447*d9f75844SAndroid Build Coastguard Worker
1448*d9f75844SAndroid Build Coastguard Worker  generate_jni("generated_audio_device_module_base_jni") {
1449*d9f75844SAndroid Build Coastguard Worker    sources = [ "src/java/org/webrtc/audio/WebRtcAudioManager.java" ]
1450*d9f75844SAndroid Build Coastguard Worker    namespace = "webrtc::jni"
1451*d9f75844SAndroid Build Coastguard Worker    jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
1452*d9f75844SAndroid Build Coastguard Worker  }
1453*d9f75844SAndroid Build Coastguard Worker
1454*d9f75844SAndroid Build Coastguard Worker  generate_jni("generated_java_audio_device_module_native_jni") {
1455*d9f75844SAndroid Build Coastguard Worker    sources = [
1456*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/audio/WebRtcAudioRecord.java",
1457*d9f75844SAndroid Build Coastguard Worker      "src/java/org/webrtc/audio/WebRtcAudioTrack.java",
1458*d9f75844SAndroid Build Coastguard Worker    ]
1459*d9f75844SAndroid Build Coastguard Worker    namespace = "webrtc::jni"
1460*d9f75844SAndroid Build Coastguard Worker    jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
1461*d9f75844SAndroid Build Coastguard Worker  }
1462*d9f75844SAndroid Build Coastguard Worker}
1463*d9f75844SAndroid Build Coastguard Worker
1464*d9f75844SAndroid Build Coastguard Workerif (is_android) {
1465*d9f75844SAndroid Build Coastguard Worker  ################
1466*d9f75844SAndroid Build Coastguard Worker  # Test targets #
1467*d9f75844SAndroid Build Coastguard Worker  ################
1468*d9f75844SAndroid Build Coastguard Worker
1469*d9f75844SAndroid Build Coastguard Worker  if (rtc_include_tests) {
1470*d9f75844SAndroid Build Coastguard Worker    rtc_instrumentation_test_apk("android_instrumentation_test_apk") {
1471*d9f75844SAndroid Build Coastguard Worker      apk_name = "android_instrumentation_test_apk"
1472*d9f75844SAndroid Build Coastguard Worker      android_manifest = "instrumentationtests/AndroidManifest.xml"
1473*d9f75844SAndroid Build Coastguard Worker      min_sdk_version = 21
1474*d9f75844SAndroid Build Coastguard Worker      target_sdk_version = 21
1475*d9f75844SAndroid Build Coastguard Worker
1476*d9f75844SAndroid Build Coastguard Worker      sources = [
1477*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/AndroidVideoDecoderInstrumentationTest.java",
1478*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/BuiltinAudioCodecsFactoryFactoryTest.java",
1479*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/Camera1CapturerUsingByteBufferTest.java",
1480*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java",
1481*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/Camera2CapturerTest.java",
1482*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/CameraVideoCapturerTestFixtures.java",
1483*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/DefaultVideoEncoderFactoryTest.java",
1484*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/EglRendererTest.java",
1485*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/FileVideoCapturerTest.java",
1486*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/GlRectDrawerTest.java",
1487*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/HardwareVideoEncoderTest.java",
1488*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/LoggableTest.java",
1489*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/NetworkMonitorTest.java",
1490*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/PeerConnectionEndToEndTest.java",
1491*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/PeerConnectionFactoryTest.java",
1492*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/PeerConnectionTest.java",
1493*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/RendererCommonTest.java",
1494*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/RtcCertificatePemTest.java",
1495*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/RtpSenderTest.java",
1496*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/RtpTransceiverTest.java",
1497*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/SoftwareVideoDecoderFactoryTest.java",
1498*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/SoftwareVideoEncoderFactoryTest.java",
1499*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/SurfaceTextureHelperTest.java",
1500*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/SurfaceViewRendererOnMeasureTest.java",
1501*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/TestConstants.java",
1502*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/TimestampAlignerTest.java",
1503*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/VideoFileRendererTest.java",
1504*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/VideoFrameBufferTest.java",
1505*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/VideoTrackTest.java",
1506*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/WebRtcJniBootTest.java",
1507*d9f75844SAndroid Build Coastguard Worker        "instrumentationtests/src/org/webrtc/YuvHelperTest.java",
1508*d9f75844SAndroid Build Coastguard Worker      ]
1509*d9f75844SAndroid Build Coastguard Worker
1510*d9f75844SAndroid Build Coastguard Worker      data = [ "../../sdk/android/instrumentationtests/src/org/webrtc/capturetestvideo.y4m" ]
1511*d9f75844SAndroid Build Coastguard Worker
1512*d9f75844SAndroid Build Coastguard Worker      deps = [
1513*d9f75844SAndroid Build Coastguard Worker        ":audio_api_java",
1514*d9f75844SAndroid Build Coastguard Worker        ":base_java",
1515*d9f75844SAndroid Build Coastguard Worker        ":builtin_audio_codecs_java",
1516*d9f75844SAndroid Build Coastguard Worker        ":camera_java",
1517*d9f75844SAndroid Build Coastguard Worker        ":default_video_codec_factory_java",
1518*d9f75844SAndroid Build Coastguard Worker        ":filevideo_java",
1519*d9f75844SAndroid Build Coastguard Worker        ":hwcodecs_java",
1520*d9f75844SAndroid Build Coastguard Worker        ":libjingle_peerconnection_java",
1521*d9f75844SAndroid Build Coastguard Worker        ":libjingle_peerconnection_metrics_default_java",
1522*d9f75844SAndroid Build Coastguard Worker        ":peerconnection_java",
1523*d9f75844SAndroid Build Coastguard Worker        ":surfaceviewrenderer_java",
1524*d9f75844SAndroid Build Coastguard Worker        ":swcodecs_java",
1525*d9f75844SAndroid Build Coastguard Worker        ":video_api_java",
1526*d9f75844SAndroid Build Coastguard Worker        ":video_java",
1527*d9f75844SAndroid Build Coastguard Worker        "//base:base_java_test_support",
1528*d9f75844SAndroid Build Coastguard Worker        "//rtc_base:base_java",
1529*d9f75844SAndroid Build Coastguard Worker        "//third_party/android_deps:guava_android_java",
1530*d9f75844SAndroid Build Coastguard Worker        "//third_party/android_support_test_runner:rules_java",
1531*d9f75844SAndroid Build Coastguard Worker        "//third_party/android_support_test_runner:runner_java",
1532*d9f75844SAndroid Build Coastguard Worker        "//third_party/androidx:androidx_annotation_annotation_java",
1533*d9f75844SAndroid Build Coastguard Worker        "//third_party/androidx:androidx_test_runner_java",
1534*d9f75844SAndroid Build Coastguard Worker        "//third_party/google-truth:google_truth_java",
1535*d9f75844SAndroid Build Coastguard Worker        "//third_party/hamcrest:hamcrest_java",
1536*d9f75844SAndroid Build Coastguard Worker        "//third_party/hamcrest:hamcrest_library_java",
1537*d9f75844SAndroid Build Coastguard Worker        "//third_party/junit",
1538*d9f75844SAndroid Build Coastguard Worker        "//third_party/mockito:mockito_java",
1539*d9f75844SAndroid Build Coastguard Worker      ]
1540*d9f75844SAndroid Build Coastguard Worker
1541*d9f75844SAndroid Build Coastguard Worker      shared_libraries = [
1542*d9f75844SAndroid Build Coastguard Worker        "../../sdk/android:libjingle_peerconnection_instrumentationtests_so",
1543*d9f75844SAndroid Build Coastguard Worker      ]
1544*d9f75844SAndroid Build Coastguard Worker    }
1545*d9f75844SAndroid Build Coastguard Worker  }
1546*d9f75844SAndroid Build Coastguard Worker
1547*d9f75844SAndroid Build Coastguard Worker  rtc_shared_library("libjingle_peerconnection_instrumentationtests_so") {
1548*d9f75844SAndroid Build Coastguard Worker    testonly = true
1549*d9f75844SAndroid Build Coastguard Worker    sources = [ "src/jni/jni_onload.cc" ]
1550*d9f75844SAndroid Build Coastguard Worker
1551*d9f75844SAndroid Build Coastguard Worker    suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
1552*d9f75844SAndroid Build Coastguard Worker    configs += [ "//build/config/android:hide_all_but_jni" ]
1553*d9f75844SAndroid Build Coastguard Worker
1554*d9f75844SAndroid Build Coastguard Worker    deps = [
1555*d9f75844SAndroid Build Coastguard Worker      ":instrumentationtests_jni",
1556*d9f75844SAndroid Build Coastguard Worker      ":libjingle_peerconnection_jni",
1557*d9f75844SAndroid Build Coastguard Worker      ":libjingle_peerconnection_metrics_default_jni",
1558*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
1559*d9f75844SAndroid Build Coastguard Worker      "../../pc:libjingle_peerconnection",
1560*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base",
1561*d9f75844SAndroid Build Coastguard Worker    ]
1562*d9f75844SAndroid Build Coastguard Worker    output_extension = "so"
1563*d9f75844SAndroid Build Coastguard Worker  }
1564*d9f75844SAndroid Build Coastguard Worker
1565*d9f75844SAndroid Build Coastguard Worker  rtc_library("instrumentationtests_jni") {
1566*d9f75844SAndroid Build Coastguard Worker    testonly = true
1567*d9f75844SAndroid Build Coastguard Worker    sources = [
1568*d9f75844SAndroid Build Coastguard Worker      "instrumentationtests/loggable_test.cc",
1569*d9f75844SAndroid Build Coastguard Worker      "instrumentationtests/video_frame_buffer_test.cc",
1570*d9f75844SAndroid Build Coastguard Worker    ]
1571*d9f75844SAndroid Build Coastguard Worker
1572*d9f75844SAndroid Build Coastguard Worker    deps = [
1573*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
1574*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
1575*d9f75844SAndroid Build Coastguard Worker      ":videoframe_jni",
1576*d9f75844SAndroid Build Coastguard Worker      "../../api/video:video_frame",
1577*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:logging",
1578*d9f75844SAndroid Build Coastguard Worker    ]
1579*d9f75844SAndroid Build Coastguard Worker  }
1580*d9f75844SAndroid Build Coastguard Worker
1581*d9f75844SAndroid Build Coastguard Worker  rtc_library("native_test_jni_onload") {
1582*d9f75844SAndroid Build Coastguard Worker    testonly = true
1583*d9f75844SAndroid Build Coastguard Worker
1584*d9f75844SAndroid Build Coastguard Worker    sources = [ "native_unittests/test_jni_onload.cc" ]
1585*d9f75844SAndroid Build Coastguard Worker
1586*d9f75844SAndroid Build Coastguard Worker    deps = [
1587*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
1588*d9f75844SAndroid Build Coastguard Worker      ":internal_jni",
1589*d9f75844SAndroid Build Coastguard Worker      ":native_api_base",
1590*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
1591*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:checks",
1592*d9f75844SAndroid Build Coastguard Worker    ]
1593*d9f75844SAndroid Build Coastguard Worker  }
1594*d9f75844SAndroid Build Coastguard Worker
1595*d9f75844SAndroid Build Coastguard Worker  rtc_library("native_unittests") {
1596*d9f75844SAndroid Build Coastguard Worker    testonly = true
1597*d9f75844SAndroid Build Coastguard Worker
1598*d9f75844SAndroid Build Coastguard Worker    sources = [
1599*d9f75844SAndroid Build Coastguard Worker      "native_unittests/android_network_monitor_unittest.cc",
1600*d9f75844SAndroid Build Coastguard Worker      "native_unittests/application_context_provider.cc",
1601*d9f75844SAndroid Build Coastguard Worker      "native_unittests/application_context_provider.h",
1602*d9f75844SAndroid Build Coastguard Worker      "native_unittests/audio_device/audio_device_unittest.cc",
1603*d9f75844SAndroid Build Coastguard Worker      "native_unittests/codecs/wrapper_unittest.cc",
1604*d9f75844SAndroid Build Coastguard Worker      "native_unittests/java_types_unittest.cc",
1605*d9f75844SAndroid Build Coastguard Worker      "native_unittests/peerconnection/peer_connection_factory_unittest.cc",
1606*d9f75844SAndroid Build Coastguard Worker      "native_unittests/stacktrace/stacktrace_unittest.cc",
1607*d9f75844SAndroid Build Coastguard Worker      "native_unittests/video/video_source_unittest.cc",
1608*d9f75844SAndroid Build Coastguard Worker    ]
1609*d9f75844SAndroid Build Coastguard Worker
1610*d9f75844SAndroid Build Coastguard Worker    data = [
1611*d9f75844SAndroid Build Coastguard Worker      "../../resources/audio_device/audio_short44.pcm",
1612*d9f75844SAndroid Build Coastguard Worker      "../../resources/audio_device/audio_short48.pcm",
1613*d9f75844SAndroid Build Coastguard Worker    ]
1614*d9f75844SAndroid Build Coastguard Worker
1615*d9f75844SAndroid Build Coastguard Worker    deps = [
1616*d9f75844SAndroid Build Coastguard Worker      ":audio_device_module_base",
1617*d9f75844SAndroid Build Coastguard Worker      ":audio_jni",
1618*d9f75844SAndroid Build Coastguard Worker      ":base_jni",
1619*d9f75844SAndroid Build Coastguard Worker      ":generated_native_unittests_jni",
1620*d9f75844SAndroid Build Coastguard Worker      ":native_api_audio_device_module",
1621*d9f75844SAndroid Build Coastguard Worker      ":native_api_base",
1622*d9f75844SAndroid Build Coastguard Worker      ":native_api_codecs",
1623*d9f75844SAndroid Build Coastguard Worker      ":native_api_jni",
1624*d9f75844SAndroid Build Coastguard Worker      ":native_api_peerconnection",
1625*d9f75844SAndroid Build Coastguard Worker      ":native_api_stacktrace",
1626*d9f75844SAndroid Build Coastguard Worker      ":native_api_video",
1627*d9f75844SAndroid Build Coastguard Worker      ":native_test_jni_onload",
1628*d9f75844SAndroid Build Coastguard Worker      ":opensles_audio_device_module",
1629*d9f75844SAndroid Build Coastguard Worker      ":video_jni",
1630*d9f75844SAndroid Build Coastguard Worker      "../../api:field_trials_view",
1631*d9f75844SAndroid Build Coastguard Worker      "../../api:scoped_refptr",
1632*d9f75844SAndroid Build Coastguard Worker      "../../api/rtc_event_log:rtc_event_log_factory",
1633*d9f75844SAndroid Build Coastguard Worker      "../../api/task_queue:default_task_queue_factory",
1634*d9f75844SAndroid Build Coastguard Worker      "../../api/video:video_frame",
1635*d9f75844SAndroid Build Coastguard Worker      "../../api/video:video_rtp_headers",
1636*d9f75844SAndroid Build Coastguard Worker      "../../media:rtc_audio_video",
1637*d9f75844SAndroid Build Coastguard Worker      "../../media:rtc_internal_video_codecs",
1638*d9f75844SAndroid Build Coastguard Worker      "../../media:rtc_media_base",
1639*d9f75844SAndroid Build Coastguard Worker      "../../media:rtc_media_engine_defaults",
1640*d9f75844SAndroid Build Coastguard Worker      "../../modules/audio_device",
1641*d9f75844SAndroid Build Coastguard Worker      "../../modules/audio_device:mock_audio_device",
1642*d9f75844SAndroid Build Coastguard Worker      "../../modules/audio_processing:api",
1643*d9f75844SAndroid Build Coastguard Worker      "../../modules/utility",
1644*d9f75844SAndroid Build Coastguard Worker      "../../pc:libjingle_peerconnection",
1645*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:checks",
1646*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:ip_address",
1647*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:logging",
1648*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:macromagic",
1649*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:platform_thread",
1650*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:rtc_base",
1651*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:rtc_event",
1652*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:stringutils",
1653*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:threading",
1654*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:timeutils",
1655*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base/synchronization:mutex",
1656*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base/system:inline",
1657*d9f75844SAndroid Build Coastguard Worker      "../../system_wrappers",
1658*d9f75844SAndroid Build Coastguard Worker      "../../test:fileutils",
1659*d9f75844SAndroid Build Coastguard Worker      "../../test:scoped_key_value_config",
1660*d9f75844SAndroid Build Coastguard Worker      "../../test:test_support",
1661*d9f75844SAndroid Build Coastguard Worker      "../../testing/gtest",
1662*d9f75844SAndroid Build Coastguard Worker    ]
1663*d9f75844SAndroid Build Coastguard Worker    absl_deps = [
1664*d9f75844SAndroid Build Coastguard Worker      "//third_party/abseil-cpp/absl/memory",
1665*d9f75844SAndroid Build Coastguard Worker      "//third_party/abseil-cpp/absl/strings",
1666*d9f75844SAndroid Build Coastguard Worker    ]
1667*d9f75844SAndroid Build Coastguard Worker  }
1668*d9f75844SAndroid Build Coastguard Worker
1669*d9f75844SAndroid Build Coastguard Worker  rtc_android_library("native_unittests_java") {
1670*d9f75844SAndroid Build Coastguard Worker    testonly = true
1671*d9f75844SAndroid Build Coastguard Worker
1672*d9f75844SAndroid Build Coastguard Worker    sources = [
1673*d9f75844SAndroid Build Coastguard Worker      "native_unittests/org/webrtc/ApplicationContextProvider.java",
1674*d9f75844SAndroid Build Coastguard Worker      "native_unittests/org/webrtc/BuildInfo.java",
1675*d9f75844SAndroid Build Coastguard Worker      "native_unittests/org/webrtc/CodecsWrapperTestHelper.java",
1676*d9f75844SAndroid Build Coastguard Worker      "native_unittests/org/webrtc/FakeVideoEncoder.java",
1677*d9f75844SAndroid Build Coastguard Worker      "native_unittests/org/webrtc/JavaTypesTestHelper.java",
1678*d9f75844SAndroid Build Coastguard Worker      "native_unittests/org/webrtc/JavaVideoSourceTestHelper.java",
1679*d9f75844SAndroid Build Coastguard Worker      "native_unittests/org/webrtc/PeerConnectionFactoryInitializationHelper.java",
1680*d9f75844SAndroid Build Coastguard Worker    ]
1681*d9f75844SAndroid Build Coastguard Worker
1682*d9f75844SAndroid Build Coastguard Worker    deps = [
1683*d9f75844SAndroid Build Coastguard Worker      ":base_java",
1684*d9f75844SAndroid Build Coastguard Worker      ":java_audio_device_module_java",
1685*d9f75844SAndroid Build Coastguard Worker      ":peerconnection_java",
1686*d9f75844SAndroid Build Coastguard Worker      ":video_api_java",
1687*d9f75844SAndroid Build Coastguard Worker      ":video_java",
1688*d9f75844SAndroid Build Coastguard Worker      "../../rtc_base:base_java",
1689*d9f75844SAndroid Build Coastguard Worker      "//third_party/android_support_test_runner:runner_java",
1690*d9f75844SAndroid Build Coastguard Worker      "//third_party/androidx:androidx_test_runner_java",
1691*d9f75844SAndroid Build Coastguard Worker    ]
1692*d9f75844SAndroid Build Coastguard Worker  }
1693*d9f75844SAndroid Build Coastguard Worker
1694*d9f75844SAndroid Build Coastguard Worker  generate_jni("generated_native_unittests_jni") {
1695*d9f75844SAndroid Build Coastguard Worker    testonly = true
1696*d9f75844SAndroid Build Coastguard Worker
1697*d9f75844SAndroid Build Coastguard Worker    sources = [
1698*d9f75844SAndroid Build Coastguard Worker      "native_unittests/org/webrtc/ApplicationContextProvider.java",
1699*d9f75844SAndroid Build Coastguard Worker      "native_unittests/org/webrtc/BuildInfo.java",
1700*d9f75844SAndroid Build Coastguard Worker      "native_unittests/org/webrtc/CodecsWrapperTestHelper.java",
1701*d9f75844SAndroid Build Coastguard Worker      "native_unittests/org/webrtc/JavaTypesTestHelper.java",
1702*d9f75844SAndroid Build Coastguard Worker      "native_unittests/org/webrtc/JavaVideoSourceTestHelper.java",
1703*d9f75844SAndroid Build Coastguard Worker      "native_unittests/org/webrtc/PeerConnectionFactoryInitializationHelper.java",
1704*d9f75844SAndroid Build Coastguard Worker    ]
1705*d9f75844SAndroid Build Coastguard Worker    namespace = "webrtc::jni"
1706*d9f75844SAndroid Build Coastguard Worker    jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
1707*d9f75844SAndroid Build Coastguard Worker  }
1708*d9f75844SAndroid Build Coastguard Worker
1709*d9f75844SAndroid Build Coastguard Worker  robolectric_binary("android_sdk_junit_tests") {
1710*d9f75844SAndroid Build Coastguard Worker    sources = [
1711*d9f75844SAndroid Build Coastguard Worker      "tests/src/org/webrtc/AndroidVideoDecoderTest.java",
1712*d9f75844SAndroid Build Coastguard Worker      "tests/src/org/webrtc/CameraEnumerationTest.java",
1713*d9f75844SAndroid Build Coastguard Worker      "tests/src/org/webrtc/CodecTestHelper.java",
1714*d9f75844SAndroid Build Coastguard Worker      "tests/src/org/webrtc/CryptoOptionsTest.java",
1715*d9f75844SAndroid Build Coastguard Worker      "tests/src/org/webrtc/FakeMediaCodecWrapper.java",
1716*d9f75844SAndroid Build Coastguard Worker      "tests/src/org/webrtc/FramerateBitrateAdjusterTest.java",
1717*d9f75844SAndroid Build Coastguard Worker      "tests/src/org/webrtc/GlGenericDrawerTest.java",
1718*d9f75844SAndroid Build Coastguard Worker      "tests/src/org/webrtc/HardwareVideoEncoderTest.java",
1719*d9f75844SAndroid Build Coastguard Worker      "tests/src/org/webrtc/IceCandidateTest.java",
1720*d9f75844SAndroid Build Coastguard Worker      "tests/src/org/webrtc/RefCountDelegateTest.java",
1721*d9f75844SAndroid Build Coastguard Worker      "tests/src/org/webrtc/ScalingSettingsTest.java",
1722*d9f75844SAndroid Build Coastguard Worker      "tests/src/org/webrtc/audio/LowLatencyAudioBufferManagerTest.java",
1723*d9f75844SAndroid Build Coastguard Worker    ]
1724*d9f75844SAndroid Build Coastguard Worker
1725*d9f75844SAndroid Build Coastguard Worker    deps = [
1726*d9f75844SAndroid Build Coastguard Worker      ":base_java",
1727*d9f75844SAndroid Build Coastguard Worker      ":camera_java",
1728*d9f75844SAndroid Build Coastguard Worker      ":hwcodecs_java",
1729*d9f75844SAndroid Build Coastguard Worker      ":java_audio_device_module_java",
1730*d9f75844SAndroid Build Coastguard Worker      ":libjingle_peerconnection_java",
1731*d9f75844SAndroid Build Coastguard Worker      ":peerconnection_java",
1732*d9f75844SAndroid Build Coastguard Worker      ":video_api_java",
1733*d9f75844SAndroid Build Coastguard Worker      ":video_java",
1734*d9f75844SAndroid Build Coastguard Worker      "//third_party/android_deps:guava_android_java",
1735*d9f75844SAndroid Build Coastguard Worker      "//third_party/androidx:androidx_annotation_annotation_java",
1736*d9f75844SAndroid Build Coastguard Worker      "//third_party/androidx:androidx_test_runner_java",
1737*d9f75844SAndroid Build Coastguard Worker      "//third_party/google-truth:google_truth_java",
1738*d9f75844SAndroid Build Coastguard Worker    ]
1739*d9f75844SAndroid Build Coastguard Worker
1740*d9f75844SAndroid Build Coastguard Worker    additional_jar_files = [ [
1741*d9f75844SAndroid Build Coastguard Worker          "tests/resources/robolectric.properties",
1742*d9f75844SAndroid Build Coastguard Worker          "robolectric.properties",
1743*d9f75844SAndroid Build Coastguard Worker        ] ]
1744*d9f75844SAndroid Build Coastguard Worker  }
1745*d9f75844SAndroid Build Coastguard Worker}
1746