magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 1 | # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license |
| 4 | # that can be found in the LICENSE file in the root of the source |
| 5 | # tree. An additional intellectual property rights grant can be found |
| 6 | # in the file PATENTS. All contributing project authors may |
| 7 | # be found in the AUTHORS file in the root of the source tree. |
| 8 | |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 9 | import("../../webrtc.gni") |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 10 | import("//build/config/android/config.gni") |
| 11 | import("//build/config/android/rules.gni") |
| 12 | |
Henrik Kjellander | a7d0df7 | 2017-06-27 08:56:46 +0200 | [diff] [blame] | 13 | group("android") { |
| 14 | if (!build_with_chromium && is_android) { |
| 15 | public_deps = [ |
| 16 | ":libjingle_peerconnection_datachannelonly_so", |
| 17 | ":libjingle_peerconnection_jni", |
| 18 | ":libjingle_peerconnection_so", |
| 19 | ":libwebrtc", |
Sami Kalliomäki | 82f96e6 | 2018-01-29 13:18:57 +0100 | [diff] [blame] | 20 | ":native_api", |
Henrik Kjellander | a7d0df7 | 2017-06-27 08:56:46 +0200 | [diff] [blame] | 21 | ] |
| 22 | } |
| 23 | } |
| 24 | |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 25 | config("libjingle_peerconnection_jni_warnings_config") { |
| 26 | # The warnings below are enabled by default. Since GN orders compiler flags |
| 27 | # for a target before flags from configs, the only way to disable such |
| 28 | # warnings is by having them in a separate config, loaded from the target. |
| 29 | if (!is_win) { |
| 30 | cflags = [ |
| 31 | "-Wno-sign-compare", |
| 32 | "-Wno-unused-variable", |
| 33 | ] |
| 34 | } |
| 35 | } |
| 36 | |
Magnus Jedvert | 3111e5f | 2017-11-07 12:33:43 +0100 | [diff] [blame] | 37 | generate_jni("generated_base_jni") { |
| 38 | sources = [ |
Sami Kalliomäki | ad148a3 | 2018-02-16 12:55:55 +0100 | [diff] [blame] | 39 | "api/org/webrtc/NetworkMonitor.java", |
| 40 | "api/org/webrtc/NetworkMonitorAutoDetect.java", |
Magnus Jedvert | 84d8ae5 | 2017-12-20 15:12:10 +0100 | [diff] [blame] | 41 | "src/java/org/webrtc/Histogram.java", |
| 42 | "src/java/org/webrtc/JniCommon.java", |
Magnus Jedvert | 3111e5f | 2017-11-07 12:33:43 +0100 | [diff] [blame] | 43 | ] |
| 44 | jni_package = "" |
| 45 | jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h" |
| 46 | } |
| 47 | |
Magnus Jedvert | a319931 | 2017-11-18 16:20:52 +0100 | [diff] [blame] | 48 | generate_jar_jni("generated_external_classes_jni") { |
Magnus Jedvert | bba8e9e | 2017-11-29 19:27:06 +0100 | [diff] [blame] | 49 | classes = [ |
| 50 | "java/lang/Integer.class", |
| 51 | "java/lang/Double.class", |
| 52 | "java/lang/Long.class", |
Magnus Jedvert | 3863153 | 2017-12-07 14:07:20 +0100 | [diff] [blame] | 53 | "java/lang/Iterable.class", |
| 54 | "java/util/Iterator.class", |
Magnus Jedvert | bba8e9e | 2017-11-29 19:27:06 +0100 | [diff] [blame] | 55 | "java/lang/Boolean.class", |
| 56 | "java/math/BigInteger.class", |
Magnus Jedvert | 3863153 | 2017-12-07 14:07:20 +0100 | [diff] [blame] | 57 | "java/util/Map.class", |
| 58 | "java/util/LinkedHashMap.class", |
| 59 | "java/util/ArrayList.class", |
| 60 | "java/lang/Enum.class", |
Magnus Jedvert | bba8e9e | 2017-11-29 19:27:06 +0100 | [diff] [blame] | 61 | ] |
Magnus Jedvert | a319931 | 2017-11-18 16:20:52 +0100 | [diff] [blame] | 62 | jni_package = "" |
| 63 | jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h" |
| 64 | } |
| 65 | |
Sami Kalliomäki | 82f96e6 | 2018-01-29 13:18:57 +0100 | [diff] [blame] | 66 | # Internal code that is needed by native_api_jni. The code cannot be placed in |
| 67 | # base_jni because native_api_jni depends on the code (and base_jni depends on |
| 68 | # native_api_jni). |
| 69 | rtc_source_set("internal_jni") { |
| 70 | sources = [ |
| 71 | "src/jni/jvm.cc", |
| 72 | "src/jni/jvm.h", |
| 73 | ] |
| 74 | |
| 75 | deps = [ |
| 76 | "../../rtc_base:checks", |
| 77 | ] |
Sami Kalliomäki | 82f96e6 | 2018-01-29 13:18:57 +0100 | [diff] [blame] | 78 | } |
| 79 | |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 80 | rtc_source_set("base_jni") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 81 | visibility = [ "*" ] |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 82 | sources = [ |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 83 | "src/jni/androidhistogram.cc", |
Sami Kalliomäki | ad148a3 | 2018-02-16 12:55:55 +0100 | [diff] [blame] | 84 | "src/jni/androidnetworkmonitor.cc", |
| 85 | "src/jni/androidnetworkmonitor.h", |
Magnus Jedvert | 3111e5f | 2017-11-07 12:33:43 +0100 | [diff] [blame] | 86 | "src/jni/class_loader.h", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 87 | "src/jni/classreferenceholder.h", |
magjed | b1c7453 | 2017-08-27 13:47:20 -0700 | [diff] [blame] | 88 | "src/jni/jni_common.cc", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 89 | "src/jni/jni_helpers.cc", |
| 90 | "src/jni/jni_helpers.h", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 91 | "src/jni/pc/audio.h", |
| 92 | "src/jni/pc/media.h", |
| 93 | "src/jni/pc/video.h", |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 94 | ] |
| 95 | |
| 96 | deps = [ |
Magnus Jedvert | 3111e5f | 2017-11-07 12:33:43 +0100 | [diff] [blame] | 97 | ":generated_base_jni", |
Sami Kalliomäki | 82f96e6 | 2018-01-29 13:18:57 +0100 | [diff] [blame] | 98 | ":internal_jni", |
| 99 | ":native_api_jni", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 100 | "../../api:libjingle_peerconnection_api", |
Magnus Jedvert | cdda0d9 | 2017-11-18 14:02:59 +0100 | [diff] [blame] | 101 | "../../api:optional", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 102 | "../../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 103 | "../../rtc_base:rtc_base", |
| 104 | "../../rtc_base:rtc_base_approved", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 105 | "../../system_wrappers:metrics_api", |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 106 | ] |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 107 | } |
| 108 | |
| 109 | rtc_static_library("audio_jni") { |
| 110 | sources = [ |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 111 | "src/jni/pc/audio.cc", |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 112 | ] |
| 113 | |
| 114 | deps = [ |
| 115 | ":base_jni", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 116 | "../../api/audio_codecs:builtin_audio_decoder_factory", |
| 117 | "../../api/audio_codecs:builtin_audio_encoder_factory", |
Sam Zackrisson | 6f38d25 | 2017-10-20 09:36:16 +0200 | [diff] [blame] | 118 | "../../modules/audio_processing:audio_processing", |
| 119 | "../../rtc_base:rtc_base_approved", |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 120 | ] |
| 121 | } |
| 122 | |
Paulina Hensman | 89dd7bf | 2018-03-20 15:27:52 +0100 | [diff] [blame] | 123 | rtc_source_set("native_api_audio_device_module") { |
| 124 | visibility = [ "*" ] |
| 125 | |
| 126 | sources = [ |
| 127 | "native_api/audio_device_module/audio_device_android.cc", |
| 128 | "native_api/audio_device_module/audio_device_android.h", |
| 129 | ] |
| 130 | |
| 131 | deps = [ |
Paulina Hensman | 89dd7bf | 2018-03-20 15:27:52 +0100 | [diff] [blame] | 132 | ":base_jni", |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 133 | ":java_audio_device_module", |
| 134 | ":opensles_audio_device_module", |
Paulina Hensman | 89dd7bf | 2018-03-20 15:27:52 +0100 | [diff] [blame] | 135 | "../../modules/audio_device:audio_device", |
| 136 | "../../rtc_base:checks", |
| 137 | "../../rtc_base:rtc_base_approved", |
| 138 | "../../system_wrappers", |
| 139 | "../../system_wrappers:metrics_api", |
| 140 | ] |
Magnus Jedvert | e2be7ee | 2018-04-04 10:42:25 +0200 | [diff] [blame] | 141 | if (rtc_enable_android_aaudio) { |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 142 | deps += [ ":aaudio_audio_device_module" ] |
Magnus Jedvert | e2be7ee | 2018-04-04 10:42:25 +0200 | [diff] [blame] | 143 | } |
Paulina Hensman | 89dd7bf | 2018-03-20 15:27:52 +0100 | [diff] [blame] | 144 | } |
| 145 | |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 146 | rtc_source_set("audio_device_module_base") { |
Paulina Hensman | 89dd7bf | 2018-03-20 15:27:52 +0100 | [diff] [blame] | 147 | visibility = [ "*" ] |
| 148 | |
| 149 | sources = [ |
| 150 | "src/jni/audio_device/audio_common.h", |
Magnus Jedvert | 1a18e0a | 2018-03-28 16:51:15 +0200 | [diff] [blame] | 151 | "src/jni/audio_device/audio_device_module.cc", |
| 152 | "src/jni/audio_device/audio_device_module.h", |
Magnus Jedvert | e2be7ee | 2018-04-04 10:42:25 +0200 | [diff] [blame] | 153 | ] |
| 154 | |
| 155 | deps = [ |
| 156 | ":base_jni", |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 157 | ":generated_audio_device_module_base_jni", |
Magnus Jedvert | e2be7ee | 2018-04-04 10:42:25 +0200 | [diff] [blame] | 158 | ":native_api_jni", |
| 159 | "../../api:optional", |
Magnus Jedvert | e2be7ee | 2018-04-04 10:42:25 +0200 | [diff] [blame] | 160 | "../../modules/audio_device:audio_device_buffer", |
| 161 | "../../rtc_base:checks", |
| 162 | "../../rtc_base:rtc_base_approved", |
| 163 | "../../system_wrappers:metrics_api", |
| 164 | ] |
| 165 | } |
| 166 | |
| 167 | if (rtc_enable_android_aaudio) { |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 168 | rtc_source_set("aaudio_audio_device_module") { |
Magnus Jedvert | e2be7ee | 2018-04-04 10:42:25 +0200 | [diff] [blame] | 169 | visibility = [ "*" ] |
| 170 | defines = [ "AUDIO_DEVICE_INCLUDE_ANDROID_AAUDIO" ] |
| 171 | sources = [ |
| 172 | "src/jni/audio_device/aaudio_player.cc", |
| 173 | "src/jni/audio_device/aaudio_player.h", |
| 174 | "src/jni/audio_device/aaudio_recorder.cc", |
| 175 | "src/jni/audio_device/aaudio_recorder.h", |
| 176 | "src/jni/audio_device/aaudio_wrapper.cc", |
| 177 | "src/jni/audio_device/aaudio_wrapper.h", |
| 178 | ] |
| 179 | libs = [ "aaudio" ] |
| 180 | deps = [ |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 181 | ":audio_device_module_base", |
Magnus Jedvert | e2be7ee | 2018-04-04 10:42:25 +0200 | [diff] [blame] | 182 | ":base_jni", |
| 183 | "../../api:array_view", |
| 184 | "../../api:optional", |
| 185 | "../../modules/audio_device:audio_device", |
| 186 | "../../modules/audio_device:audio_device_buffer", |
| 187 | "../../rtc_base:checks", |
| 188 | "../../rtc_base:rtc_base", |
| 189 | "../../rtc_base:rtc_base_approved", |
| 190 | "../../system_wrappers", |
| 191 | ] |
| 192 | } |
| 193 | } |
| 194 | |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 195 | rtc_source_set("opensles_audio_device_module") { |
Magnus Jedvert | e2be7ee | 2018-04-04 10:42:25 +0200 | [diff] [blame] | 196 | visibility = [ "*" ] |
| 197 | sources = [ |
Paulina Hensman | 89dd7bf | 2018-03-20 15:27:52 +0100 | [diff] [blame] | 198 | "src/jni/audio_device/opensles_common.cc", |
| 199 | "src/jni/audio_device/opensles_common.h", |
| 200 | "src/jni/audio_device/opensles_player.cc", |
| 201 | "src/jni/audio_device/opensles_player.h", |
| 202 | "src/jni/audio_device/opensles_recorder.cc", |
| 203 | "src/jni/audio_device/opensles_recorder.h", |
| 204 | ] |
| 205 | libs = [ "OpenSLES" ] |
Paulina Hensman | 89dd7bf | 2018-03-20 15:27:52 +0100 | [diff] [blame] | 206 | deps = [ |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 207 | ":audio_device_module_base", |
Paulina Hensman | 89dd7bf | 2018-03-20 15:27:52 +0100 | [diff] [blame] | 208 | ":base_jni", |
| 209 | "../../api:array_view", |
Magnus Jedvert | ff4cac9 | 2018-03-27 15:15:41 +0200 | [diff] [blame] | 210 | "../../api:optional", |
Paulina Hensman | 89dd7bf | 2018-03-20 15:27:52 +0100 | [diff] [blame] | 211 | "../../modules/audio_device:audio_device", |
| 212 | "../../modules/audio_device:audio_device_buffer", |
Paulina Hensman | 89dd7bf | 2018-03-20 15:27:52 +0100 | [diff] [blame] | 213 | "../../rtc_base:checks", |
Paulina Hensman | 89dd7bf | 2018-03-20 15:27:52 +0100 | [diff] [blame] | 214 | "../../rtc_base:rtc_base_approved", |
Magnus Jedvert | e2be7ee | 2018-04-04 10:42:25 +0200 | [diff] [blame] | 215 | ] |
| 216 | } |
| 217 | |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 218 | rtc_source_set("java_audio_device_module") { |
Magnus Jedvert | e2be7ee | 2018-04-04 10:42:25 +0200 | [diff] [blame] | 219 | visibility = [ "*" ] |
| 220 | |
| 221 | sources = [ |
| 222 | "src/jni/audio_device/audio_record_jni.cc", |
| 223 | "src/jni/audio_device/audio_record_jni.h", |
| 224 | "src/jni/audio_device/audio_track_jni.cc", |
| 225 | "src/jni/audio_device/audio_track_jni.h", |
| 226 | ] |
| 227 | deps = [ |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 228 | ":audio_device_module_base", |
Magnus Jedvert | e2be7ee | 2018-04-04 10:42:25 +0200 | [diff] [blame] | 229 | ":base_jni", |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 230 | ":generated_java_audio_device_module_native_jni", |
Magnus Jedvert | e2be7ee | 2018-04-04 10:42:25 +0200 | [diff] [blame] | 231 | "../../api:optional", |
| 232 | "../../modules/audio_device:audio_device", |
| 233 | "../../modules/audio_device:audio_device_buffer", |
| 234 | "../../rtc_base:checks", |
| 235 | "../../rtc_base:rtc_base_approved", |
Paulina Hensman | 89dd7bf | 2018-03-20 15:27:52 +0100 | [diff] [blame] | 236 | "../../system_wrappers:metrics_api", |
| 237 | ] |
Paulina Hensman | 89dd7bf | 2018-03-20 15:27:52 +0100 | [diff] [blame] | 238 | } |
| 239 | |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 240 | rtc_static_library("null_audio_jni") { |
| 241 | sources = [ |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 242 | "src/jni/pc/null_audio.cc", |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 243 | ] |
| 244 | |
| 245 | deps = [ |
| 246 | ":base_jni", |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 247 | ] |
| 248 | } |
| 249 | |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 250 | generate_jni("generated_audio_device_module_base_jni") { |
Magnus Jedvert | 8fc7948 | 2018-03-20 19:11:19 +0100 | [diff] [blame] | 251 | sources = [ |
Magnus Jedvert | 8fc7948 | 2018-03-20 19:11:19 +0100 | [diff] [blame] | 252 | "src/java/org/webrtc/audio/WebRtcAudioManager.java", |
Magnus Jedvert | e2be7ee | 2018-04-04 10:42:25 +0200 | [diff] [blame] | 253 | ] |
| 254 | jni_package = "" |
| 255 | jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h" |
| 256 | } |
| 257 | |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 258 | generate_jni("generated_java_audio_device_module_native_jni") { |
Magnus Jedvert | e2be7ee | 2018-04-04 10:42:25 +0200 | [diff] [blame] | 259 | sources = [ |
Magnus Jedvert | 8fc7948 | 2018-03-20 19:11:19 +0100 | [diff] [blame] | 260 | "src/java/org/webrtc/audio/WebRtcAudioRecord.java", |
| 261 | "src/java/org/webrtc/audio/WebRtcAudioTrack.java", |
| 262 | ] |
| 263 | jni_package = "" |
| 264 | jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h" |
| 265 | } |
| 266 | |
Magnus Jedvert | 56231d0 | 2017-10-31 17:47:06 +0100 | [diff] [blame] | 267 | generate_jni("generated_video_jni") { |
| 268 | sources = [ |
Magnus Jedvert | 4eb0188 | 2017-11-20 22:33:40 +0100 | [diff] [blame] | 269 | "api/org/webrtc/EncodedImage.java", |
Magnus Jedvert | 655e196 | 2017-12-08 11:05:22 +0100 | [diff] [blame] | 270 | "api/org/webrtc/MediaCodecVideoDecoder.java", |
| 271 | "api/org/webrtc/MediaCodecVideoEncoder.java", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 272 | "api/org/webrtc/VideoCodecInfo.java", |
Magnus Jedvert | 0371e10 | 2017-11-07 14:23:44 +0100 | [diff] [blame] | 273 | "api/org/webrtc/VideoCodecStatus.java", |
Magnus Jedvert | 4eb0188 | 2017-11-20 22:33:40 +0100 | [diff] [blame] | 274 | "api/org/webrtc/VideoDecoder.java", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 275 | "api/org/webrtc/VideoDecoderFactory.java", |
Magnus Jedvert | 84d8ae5 | 2017-12-20 15:12:10 +0100 | [diff] [blame] | 276 | "api/org/webrtc/VideoDecoderFallback.java", |
Magnus Jedvert | 56231d0 | 2017-10-31 17:47:06 +0100 | [diff] [blame] | 277 | "api/org/webrtc/VideoEncoder.java", |
Magnus Jedvert | 3863153 | 2017-12-07 14:07:20 +0100 | [diff] [blame] | 278 | "api/org/webrtc/VideoEncoderFactory.java", |
Magnus Jedvert | 84d8ae5 | 2017-12-20 15:12:10 +0100 | [diff] [blame] | 279 | "api/org/webrtc/VideoEncoderFallback.java", |
Magnus Jedvert | c2ac3c6 | 2017-11-14 17:08:59 +0100 | [diff] [blame] | 280 | "api/org/webrtc/VideoFrame.java", |
Magnus Jedvert | e987f2b | 2018-04-23 16:14:47 +0200 | [diff] [blame] | 281 | "api/org/webrtc/VideoFrameDrawer.java", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 282 | "api/org/webrtc/VideoRenderer.java", |
Magnus Jedvert | 56231d0 | 2017-10-31 17:47:06 +0100 | [diff] [blame] | 283 | "api/org/webrtc/VideoSink.java", |
Magnus Jedvert | 84d8ae5 | 2017-12-20 15:12:10 +0100 | [diff] [blame] | 284 | "api/org/webrtc/VideoSource.java", |
| 285 | "api/org/webrtc/VideoTrack.java", |
| 286 | "api/org/webrtc/YuvHelper.java", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 287 | "src/java/org/webrtc/EglBase14.java", |
Magnus Jedvert | 84d8ae5 | 2017-12-20 15:12:10 +0100 | [diff] [blame] | 288 | "src/java/org/webrtc/NV12Buffer.java", |
| 289 | "src/java/org/webrtc/NV21Buffer.java", |
Magnus Jedvert | 4eb0188 | 2017-11-20 22:33:40 +0100 | [diff] [blame] | 290 | "src/java/org/webrtc/VideoDecoderWrapper.java", |
Magnus Jedvert | 0371e10 | 2017-11-07 14:23:44 +0100 | [diff] [blame] | 291 | "src/java/org/webrtc/VideoEncoderWrapper.java", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 292 | "src/java/org/webrtc/WrappedNativeI420Buffer.java", |
Anders Carlsson | dc1b9f1 | 2017-11-10 13:15:04 +0100 | [diff] [blame] | 293 | "src/java/org/webrtc/WrappedNativeVideoDecoder.java", |
| 294 | "src/java/org/webrtc/WrappedNativeVideoEncoder.java", |
Magnus Jedvert | 56231d0 | 2017-10-31 17:47:06 +0100 | [diff] [blame] | 295 | ] |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 296 | if (rtc_use_builtin_sw_codecs) { |
| 297 | sources += [ "api/org/webrtc/HardwareVideoEncoderFactory.java" ] # TODO(andersc): This currently depends on SoftwareVideoEncoderFactory |
| 298 | } |
Magnus Jedvert | 56231d0 | 2017-10-31 17:47:06 +0100 | [diff] [blame] | 299 | jni_package = "" |
| 300 | jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h" |
| 301 | } |
| 302 | |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 303 | rtc_static_library("video_jni") { |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 304 | sources = [] |
| 305 | deps = [] |
| 306 | |
| 307 | sources += [ |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 308 | "src/jni/androidvideotracksource.cc", |
| 309 | "src/jni/androidvideotracksource.h", |
Magnus Jedvert | 4eb0188 | 2017-11-20 22:33:40 +0100 | [diff] [blame] | 310 | "src/jni/encodedimage.cc", |
| 311 | "src/jni/encodedimage.h", |
Magnus Jedvert | 56231d0 | 2017-10-31 17:47:06 +0100 | [diff] [blame] | 312 | "src/jni/jni_generator_helper.h", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 313 | "src/jni/nv12buffer.cc", |
| 314 | "src/jni/nv21buffer.cc", |
| 315 | "src/jni/pc/video.cc", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 316 | "src/jni/video_renderer.cc", |
Anders Carlsson | dc1b9f1 | 2017-11-10 13:15:04 +0100 | [diff] [blame] | 317 | "src/jni/videocodecinfo.cc", |
| 318 | "src/jni/videocodecinfo.h", |
Magnus Jedvert | 4eb0188 | 2017-11-20 22:33:40 +0100 | [diff] [blame] | 319 | "src/jni/videocodecstatus.cc", |
| 320 | "src/jni/videocodecstatus.h", |
Sami Kalliomäki | 93ad1f7 | 2017-06-27 10:03:49 +0200 | [diff] [blame] | 321 | "src/jni/videodecoderfactorywrapper.cc", |
| 322 | "src/jni/videodecoderfactorywrapper.h", |
Anders Carlsson | dc1b9f1 | 2017-11-10 13:15:04 +0100 | [diff] [blame] | 323 | "src/jni/videodecoderfallback.cc", |
Sami Kalliomäki | 93ad1f7 | 2017-06-27 10:03:49 +0200 | [diff] [blame] | 324 | "src/jni/videodecoderwrapper.cc", |
| 325 | "src/jni/videodecoderwrapper.h", |
sakal | 07a3bd7 | 2017-09-04 03:57:21 -0700 | [diff] [blame] | 326 | "src/jni/videoencoderfactorywrapper.cc", |
| 327 | "src/jni/videoencoderfactorywrapper.h", |
Anders Carlsson | c3fedcc | 2017-11-15 14:36:33 +0100 | [diff] [blame] | 328 | "src/jni/videoencoderfallback.cc", |
sakal | 07a3bd7 | 2017-09-04 03:57:21 -0700 | [diff] [blame] | 329 | "src/jni/videoencoderwrapper.cc", |
| 330 | "src/jni/videoencoderwrapper.h", |
Magnus Jedvert | c2ac3c6 | 2017-11-14 17:08:59 +0100 | [diff] [blame] | 331 | "src/jni/videoframe.cc", |
| 332 | "src/jni/videoframe.h", |
Magnus Jedvert | e987f2b | 2018-04-23 16:14:47 +0200 | [diff] [blame] | 333 | "src/jni/videoframedrawer.cc", |
Jonathan Yu | fa6a283 | 2018-02-12 17:32:37 -0800 | [diff] [blame] | 334 | "src/jni/videosink.cc", |
| 335 | "src/jni/videosink.h", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 336 | "src/jni/videotrack.cc", |
Magnus Jedvert | 62faaab | 2017-06-14 19:03:31 +0200 | [diff] [blame] | 337 | "src/jni/wrapped_native_i420_buffer.cc", |
| 338 | "src/jni/wrapped_native_i420_buffer.h", |
Anders Carlsson | dc1b9f1 | 2017-11-10 13:15:04 +0100 | [diff] [blame] | 339 | "src/jni/wrappednativecodec.cc", |
| 340 | "src/jni/wrappednativecodec.h", |
Sami Kalliomäki | f6515cd | 2017-11-02 11:25:58 +0100 | [diff] [blame] | 341 | "src/jni/yuvhelper.cc", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 342 | ] |
| 343 | |
| 344 | configs += [ ":libjingle_peerconnection_jni_warnings_config" ] |
| 345 | |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 346 | # TODO(jschuh): Bug 1348: fix this warning. |
| 347 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 348 | |
| 349 | if (is_win) { |
| 350 | cflags += [ |
| 351 | "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. |
| 352 | "/wd4389", # signed/unsigned mismatch. |
| 353 | ] |
| 354 | } |
| 355 | |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 356 | if (rtc_use_builtin_sw_codecs) { |
| 357 | sources += [ |
| 358 | "src/jni/androidmediacodeccommon.h", |
| 359 | "src/jni/androidmediadecoder.cc", |
| 360 | "src/jni/androidmediadecoder_jni.h", |
| 361 | "src/jni/androidmediaencoder.cc", |
| 362 | "src/jni/androidmediaencoder_jni.h", |
Anders Carlsson | 6deb65c | 2018-03-05 14:30:04 +0100 | [diff] [blame] | 363 | "src/jni/hardwarevideoencoderfactory.cc", |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 364 | ] |
| 365 | |
| 366 | deps += [ |
| 367 | ":vp8_jni", |
| 368 | ":vp9_jni", |
| 369 | "../../media:rtc_internal_video_codecs", |
| 370 | ] |
| 371 | } |
| 372 | deps += [ |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 373 | ":base_jni", |
Magnus Jedvert | 56231d0 | 2017-10-31 17:47:06 +0100 | [diff] [blame] | 374 | ":generated_video_jni", |
Sami Kalliomäki | 82f96e6 | 2018-01-29 13:18:57 +0100 | [diff] [blame] | 375 | ":native_api_jni", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 376 | "../..:webrtc_common", |
| 377 | "../../api:libjingle_peerconnection_api", |
| 378 | "../../api:video_frame_api", |
| 379 | "../../api/video_codecs:video_codecs_api", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 380 | "../../common_video:common_video", |
| 381 | "../../media:rtc_audio_video", |
Mirko Bonadei | 75baa49 | 2018-01-11 17:07:30 +0100 | [diff] [blame] | 382 | "../../media:rtc_h264_profile_id", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 383 | "../../media:rtc_media_base", |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 384 | "../../media:rtc_software_fallback_wrappers", |
sakal | 07a3bd7 | 2017-09-04 03:57:21 -0700 | [diff] [blame] | 385 | "../../modules:module_api", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 386 | "../../modules/utility:utility", |
charujain | cb728ea | 2017-09-18 03:08:08 -0700 | [diff] [blame] | 387 | "../../modules/video_coding:codec_globals_headers", |
Patrik Höglund | 99175c6 | 2018-01-08 11:05:10 +0100 | [diff] [blame] | 388 | "../../modules/video_coding:video_codec_interface", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 389 | "../../modules/video_coding:video_coding_utility", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 390 | "../../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 391 | "../../rtc_base:rtc_base", |
| 392 | "../../rtc_base:rtc_base_approved", |
| 393 | "../../rtc_base:rtc_task_queue", |
| 394 | "../../rtc_base:sequenced_task_checker", |
| 395 | "../../rtc_base:weak_ptr", |
Karl Wiberg | 29e7bee | 2018-03-22 14:11:52 +0100 | [diff] [blame] | 396 | "../../rtc_base/memory:aligned_malloc", |
Mirko Bonadei | a498ae8 | 2017-12-06 09:17:14 +0100 | [diff] [blame] | 397 | "../../system_wrappers:field_trial_api", |
Mirko Bonadei | 401d056 | 2017-12-14 11:24:00 +0100 | [diff] [blame] | 398 | "//third_party/libyuv", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 399 | ] |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 400 | } |
| 401 | |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 402 | rtc_static_library("null_video_jni") { |
| 403 | sources = [ |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 404 | "src/jni/pc/null_video.cc", |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 405 | ] |
| 406 | |
| 407 | deps = [ |
| 408 | ":base_jni", |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 409 | ] |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 410 | } |
| 411 | |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 412 | generate_jni("generated_vp8_jni") { |
| 413 | sources = [ |
| 414 | "src/java/org/webrtc/VP8Decoder.java", |
| 415 | "src/java/org/webrtc/VP8Encoder.java", |
| 416 | ] |
| 417 | |
| 418 | jni_package = "" |
| 419 | jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h" |
| 420 | } |
| 421 | |
| 422 | rtc_static_library("vp8_jni") { |
| 423 | sources = [ |
| 424 | "src/jni/vp8codec.cc", |
| 425 | ] |
| 426 | |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 427 | deps = [ |
| 428 | ":base_jni", |
| 429 | ":generated_vp8_jni", |
| 430 | "../../modules/video_coding:webrtc_vp8", |
| 431 | ] |
| 432 | } |
| 433 | |
| 434 | generate_jni("generated_vp9_jni") { |
| 435 | sources = [ |
| 436 | "src/java/org/webrtc/VP9Decoder.java", |
| 437 | "src/java/org/webrtc/VP9Encoder.java", |
| 438 | ] |
| 439 | |
| 440 | jni_package = "" |
| 441 | jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h" |
| 442 | } |
| 443 | |
| 444 | rtc_static_library("vp9_jni") { |
| 445 | sources = [ |
| 446 | "src/jni/vp9codec.cc", |
| 447 | ] |
| 448 | |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 449 | deps = [ |
| 450 | ":base_jni", |
| 451 | ":generated_vp9_jni", |
| 452 | "../../modules/video_coding:webrtc_vp9", |
| 453 | ] |
| 454 | } |
| 455 | |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 456 | rtc_static_library("media_jni") { |
| 457 | sources = [ |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 458 | "src/jni/pc/media.cc", |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 459 | ] |
| 460 | |
| 461 | deps = [ |
| 462 | ":base_jni", |
Niels Möller | 8366e17 | 2018-02-14 12:20:13 +0100 | [diff] [blame] | 463 | "../../api:callfactory_api", |
Anders Carlsson | dc1b9f1 | 2017-11-10 13:15:04 +0100 | [diff] [blame] | 464 | "../../api/video_codecs:video_codecs_api", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 465 | "../../call:call_interfaces", |
| 466 | "../../logging:rtc_event_log_api", |
| 467 | "../../media:rtc_audio_video", |
Anders Carlsson | dc1b9f1 | 2017-11-10 13:15:04 +0100 | [diff] [blame] | 468 | "../../modules/audio_device:audio_device", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 469 | "../../modules/audio_processing:audio_processing", |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 470 | ] |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 471 | } |
| 472 | |
| 473 | rtc_static_library("null_media_jni") { |
| 474 | sources = [ |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 475 | "src/jni/pc/null_media.cc", |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 476 | ] |
| 477 | |
| 478 | deps = [ |
| 479 | ":base_jni", |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 480 | ] |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 481 | } |
| 482 | |
Magnus Jedvert | cada601 | 2017-11-20 21:55:27 +0100 | [diff] [blame] | 483 | generate_jni("generated_peerconnection_jni") { |
| 484 | sources = [ |
Magnus Jedvert | 84d8ae5 | 2017-12-20 15:12:10 +0100 | [diff] [blame] | 485 | "api/org/webrtc/AudioTrack.java", |
| 486 | "api/org/webrtc/CallSessionFileRotatingLogSink.java", |
Magnus Jedvert | 7bd6ccc | 2017-11-24 14:42:47 +0100 | [diff] [blame] | 487 | "api/org/webrtc/DataChannel.java", |
Magnus Jedvert | 84d8ae5 | 2017-12-20 15:12:10 +0100 | [diff] [blame] | 488 | "api/org/webrtc/DtmfSender.java", |
Magnus Jedvert | 80610c4 | 2017-11-25 21:18:34 +0100 | [diff] [blame] | 489 | "api/org/webrtc/IceCandidate.java", |
Magnus Jedvert | 3ecdd0f | 2017-11-24 11:21:14 +0100 | [diff] [blame] | 490 | "api/org/webrtc/MediaConstraints.java", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 491 | "api/org/webrtc/MediaSource.java", |
Magnus Jedvert | 6a0345b | 2017-11-27 11:23:42 +0100 | [diff] [blame] | 492 | "api/org/webrtc/MediaStream.java", |
Magnus Jedvert | 4fa5da5 | 2017-11-27 13:44:38 +0100 | [diff] [blame] | 493 | "api/org/webrtc/MediaStreamTrack.java", |
Magnus Jedvert | ba700f6 | 2017-12-04 13:43:27 +0100 | [diff] [blame] | 494 | "api/org/webrtc/PeerConnection.java", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 495 | "api/org/webrtc/PeerConnectionFactory.java", |
Magnus Jedvert | c4c8876 | 2017-11-24 18:46:15 +0100 | [diff] [blame] | 496 | "api/org/webrtc/RTCStats.java", |
| 497 | "api/org/webrtc/RTCStatsCollectorCallback.java", |
| 498 | "api/org/webrtc/RTCStatsReport.java", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 499 | "api/org/webrtc/RtpParameters.java", |
Magnus Jedvert | ba700f6 | 2017-12-04 13:43:27 +0100 | [diff] [blame] | 500 | "api/org/webrtc/RtpReceiver.java", |
Magnus Jedvert | 3863153 | 2017-12-07 14:07:20 +0100 | [diff] [blame] | 501 | "api/org/webrtc/RtpSender.java", |
Seth Hampson | c384e14 | 2018-03-06 15:47:10 -0800 | [diff] [blame] | 502 | "api/org/webrtc/RtpTransceiver.java", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 503 | "api/org/webrtc/SdpObserver.java", |
| 504 | "api/org/webrtc/SessionDescription.java", |
Magnus Jedvert | bba8e9e | 2017-11-29 19:27:06 +0100 | [diff] [blame] | 505 | "api/org/webrtc/StatsObserver.java", |
| 506 | "api/org/webrtc/StatsReport.java", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 507 | "api/org/webrtc/TurnCustomizer.java", |
Magnus Jedvert | cada601 | 2017-11-20 21:55:27 +0100 | [diff] [blame] | 508 | ] |
| 509 | jni_package = "" |
| 510 | jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h" |
| 511 | } |
| 512 | |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 513 | rtc_static_library("peerconnection_jni") { |
Sami Kalliomäki | c4f18fe | 2018-01-15 13:51:38 +0100 | [diff] [blame] | 514 | # Do not depend on this target externally unless you absolute have to. It is |
| 515 | # made public because we don't have a proper NDK yet. Header APIs here are not |
| 516 | # considered public and are subject to change. |
| 517 | visibility = [ "*" ] |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 518 | |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 519 | sources = [ |
zhihuang | 1b1daec | 2017-08-02 18:01:05 -0700 | [diff] [blame] | 520 | "src/jni/androidnetworkmonitor_jni.h", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 521 | "src/jni/pc/androidnetworkmonitor.h", |
| 522 | "src/jni/pc/audiotrack.cc", |
| 523 | "src/jni/pc/callsessionfilerotatinglogsink.cc", |
Magnus Jedvert | 7bd6ccc | 2017-11-24 14:42:47 +0100 | [diff] [blame] | 524 | "src/jni/pc/datachannel.cc", |
| 525 | "src/jni/pc/datachannel.h", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 526 | "src/jni/pc/dtmfsender.cc", |
| 527 | "src/jni/pc/icecandidate.cc", |
| 528 | "src/jni/pc/icecandidate.h", |
| 529 | "src/jni/pc/logging.cc", |
| 530 | "src/jni/pc/mediaconstraints.cc", |
| 531 | "src/jni/pc/mediaconstraints.h", |
| 532 | "src/jni/pc/mediasource.cc", |
| 533 | "src/jni/pc/mediastream.cc", |
Magnus Jedvert | 1212f1e | 2017-12-20 12:00:50 +0100 | [diff] [blame] | 534 | "src/jni/pc/mediastream.h", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 535 | "src/jni/pc/mediastreamtrack.cc", |
| 536 | "src/jni/pc/mediastreamtrack.h", |
deadbeef | 0d48c69 | 2017-08-03 10:20:17 -0700 | [diff] [blame] | 537 | "src/jni/pc/ownedfactoryandthreads.cc", |
| 538 | "src/jni/pc/ownedfactoryandthreads.h", |
Magnus Jedvert | de5afcf | 2017-12-10 14:58:29 +0100 | [diff] [blame] | 539 | "src/jni/pc/peerconnection.cc", |
| 540 | "src/jni/pc/peerconnection.h", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 541 | "src/jni/pc/peerconnectionfactory.cc", |
| 542 | "src/jni/pc/peerconnectionfactory.h", |
deadbeef | 0d48c69 | 2017-08-03 10:20:17 -0700 | [diff] [blame] | 543 | "src/jni/pc/rtcstatscollectorcallbackwrapper.cc", |
| 544 | "src/jni/pc/rtcstatscollectorcallbackwrapper.h", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 545 | "src/jni/pc/rtpparameters.cc", |
| 546 | "src/jni/pc/rtpparameters.h", |
Magnus Jedvert | ba700f6 | 2017-12-04 13:43:27 +0100 | [diff] [blame] | 547 | "src/jni/pc/rtpreceiver.cc", |
| 548 | "src/jni/pc/rtpreceiver.h", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 549 | "src/jni/pc/rtpsender.cc", |
Magnus Jedvert | 1212f1e | 2017-12-20 12:00:50 +0100 | [diff] [blame] | 550 | "src/jni/pc/rtpsender.h", |
Seth Hampson | c384e14 | 2018-03-06 15:47:10 -0800 | [diff] [blame] | 551 | "src/jni/pc/rtptransceiver.cc", |
| 552 | "src/jni/pc/rtptransceiver.h", |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 553 | "src/jni/pc/sdpobserver.cc", |
| 554 | "src/jni/pc/sdpobserver.h", |
| 555 | "src/jni/pc/sessiondescription.cc", |
| 556 | "src/jni/pc/sessiondescription.h", |
| 557 | "src/jni/pc/statsobserver.cc", |
| 558 | "src/jni/pc/statsobserver.h", |
| 559 | "src/jni/pc/turncustomizer.cc", |
Magnus Jedvert | 1212f1e | 2017-12-20 12:00:50 +0100 | [diff] [blame] | 560 | "src/jni/pc/turncustomizer.h", |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 561 | ] |
| 562 | |
| 563 | configs += [ ":libjingle_peerconnection_jni_warnings_config" ] |
| 564 | |
| 565 | if (is_clang) { |
| 566 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 567 | suppressed_configs += [ |
| 568 | "//build/config/clang:extra_warnings", |
| 569 | "//build/config/clang:find_bad_constructs", |
| 570 | ] |
| 571 | } |
| 572 | |
| 573 | # TODO(jschuh): Bug 1348: fix this warning. |
| 574 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 575 | |
| 576 | if (is_win) { |
| 577 | cflags += [ |
| 578 | "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. |
| 579 | "/wd4389", # signed/unsigned mismatch. |
| 580 | ] |
| 581 | } |
| 582 | |
| 583 | deps = [ |
| 584 | ":base_jni", |
Magnus Jedvert | bba8e9e | 2017-11-29 19:27:06 +0100 | [diff] [blame] | 585 | ":generated_external_classes_jni", |
Magnus Jedvert | cada601 | 2017-11-20 21:55:27 +0100 | [diff] [blame] | 586 | ":generated_peerconnection_jni", |
Sami Kalliomäki | 82f96e6 | 2018-01-29 13:18:57 +0100 | [diff] [blame] | 587 | ":native_api_jni", |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 588 | "../..:webrtc_common", |
Mirko Bonadei | e51f785 | 2017-12-06 11:23:19 +0100 | [diff] [blame] | 589 | "../../api:libjingle_peerconnection_api", |
Anders Carlsson | dc1b9f1 | 2017-11-10 13:15:04 +0100 | [diff] [blame] | 590 | "../../api/video_codecs:video_codecs_api", |
Qingsi Wang | 970b088 | 2018-02-01 11:04:46 -0800 | [diff] [blame] | 591 | "../../logging:rtc_event_log_api", |
| 592 | "../../logging:rtc_event_log_impl_base", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 593 | "../../media:rtc_data", |
| 594 | "../../media:rtc_media_base", |
Anders Carlsson | dc1b9f1 | 2017-11-10 13:15:04 +0100 | [diff] [blame] | 595 | "../../modules/audio_device:audio_device", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 596 | "../../modules/utility:utility", |
| 597 | "../../pc:peerconnection", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 598 | "../../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 599 | "../../rtc_base:rtc_base", |
| 600 | "../../rtc_base:rtc_base_approved", |
| 601 | "../../rtc_base:rtc_task_queue", |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 602 | "../../rtc_base:stringutils", |
Mirko Bonadei | a498ae8 | 2017-12-06 09:17:14 +0100 | [diff] [blame] | 603 | "../../system_wrappers:field_trial_api", |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 604 | ] |
| 605 | } |
| 606 | |
| 607 | rtc_static_library("libjingle_peerconnection_jni") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 608 | visibility = [ "*" ] |
Anders Carlsson | 1f433e4 | 2018-04-24 16:39:05 +0200 | [diff] [blame] | 609 | allow_poison = [ |
| 610 | "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove. |
| 611 | "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove. |
| 612 | ] |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 613 | public_deps = [ |
| 614 | ":audio_jni", |
| 615 | ":base_jni", |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 616 | ":java_audio_device_module_jni", |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 617 | ":media_jni", |
| 618 | ":peerconnection_jni", |
| 619 | ":video_jni", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 620 | "../../pc:create_pc_factory", |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 621 | ] |
| 622 | } |
| 623 | |
Magnus Jedvert | 986a79c | 2017-11-18 16:45:18 +0100 | [diff] [blame] | 624 | generate_jni("generated_metrics_jni") { |
| 625 | sources = [ |
| 626 | "api/org/webrtc/Metrics.java", |
| 627 | ] |
| 628 | jni_package = "" |
| 629 | jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h" |
| 630 | } |
| 631 | |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 632 | rtc_static_library("libjingle_peerconnection_metrics_default_jni") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 633 | visibility = [ "*" ] |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 634 | sources = [ |
Magnus Jedvert | 9060eb1 | 2017-12-12 12:52:54 +0100 | [diff] [blame] | 635 | "src/jni/androidmetrics.cc", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 636 | ] |
| 637 | |
| 638 | configs += [ ":libjingle_peerconnection_jni_warnings_config" ] |
| 639 | |
| 640 | deps = [ |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 641 | ":base_jni", |
Magnus Jedvert | 986a79c | 2017-11-18 16:45:18 +0100 | [diff] [blame] | 642 | ":generated_metrics_jni", |
Sami Kalliomäki | 82f96e6 | 2018-01-29 13:18:57 +0100 | [diff] [blame] | 643 | ":native_api_jni", |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 644 | ":peerconnection_jni", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 645 | "../../pc:peerconnection", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 646 | "../../system_wrappers:field_trial_default", |
Mirko Bonadei | a498ae8 | 2017-12-06 09:17:14 +0100 | [diff] [blame] | 647 | "../../system_wrappers:metrics_api", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 648 | "../../system_wrappers:metrics_default", |
Ilya Nikolaevskiy | 2ffe3e8 | 2018-01-17 19:57:24 +0000 | [diff] [blame] | 649 | "../../system_wrappers:runtime_enabled_features_default", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 650 | ] |
| 651 | } |
| 652 | |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 653 | # The modular build targets can be used to build WebRTC with different |
| 654 | # functionalities. The users can choose either the real implemenation or the |
| 655 | # null implementation of the audio/video modules based on their requirments. |
Henrik Kjellander | a7d0df7 | 2017-06-27 08:56:46 +0200 | [diff] [blame] | 656 | rtc_shared_library("libjingle_peerconnection_datachannelonly_so") { |
| 657 | sources = [ |
| 658 | "src/jni/jni_onload.cc", |
| 659 | ] |
| 660 | |
| 661 | suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] |
| 662 | configs += [ "//build/config/android:hide_all_but_jni" ] |
| 663 | |
| 664 | deps = [ |
| 665 | ":base_jni", |
| 666 | ":libjingle_peerconnection_metrics_default_jni", |
| 667 | ":null_audio_jni", |
| 668 | ":null_media_jni", |
| 669 | ":null_video_jni", |
| 670 | ":peerconnection_jni", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 671 | "../../pc:peerconnection", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 672 | "../../rtc_base:rtc_base", |
| 673 | "../../rtc_base:rtc_base_approved", |
Henrik Kjellander | a7d0df7 | 2017-06-27 08:56:46 +0200 | [diff] [blame] | 674 | ] |
| 675 | output_extension = "so" |
| 676 | } |
zhihuang | af62935 | 2017-06-17 22:31:24 -0700 | [diff] [blame] | 677 | |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 678 | rtc_shared_library("libjingle_peerconnection_so") { |
| 679 | sources = [ |
| 680 | "src/jni/jni_onload.cc", |
| 681 | ] |
| 682 | |
kjellander | 12b3e03 | 2017-02-16 01:06:04 -0800 | [diff] [blame] | 683 | suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] |
| 684 | configs += [ "//build/config/android:hide_all_but_jni" ] |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 685 | |
| 686 | deps = [ |
| 687 | ":libjingle_peerconnection_jni", |
| 688 | ":libjingle_peerconnection_metrics_default_jni", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 689 | "../../pc:libjingle_peerconnection", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 690 | "../../rtc_base:rtc_base", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 691 | ] |
| 692 | output_extension = "so" |
| 693 | } |
| 694 | |
Sami Kalliomäki | e93de5f | 2018-01-22 14:43:18 +0100 | [diff] [blame] | 695 | dist_jar("libwebrtc") { |
mbonadei | b55bd97 | 2017-01-23 01:25:53 -0800 | [diff] [blame] | 696 | _target_dir_name = get_label_info(":$target_name", "dir") |
| 697 | output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar" |
Sami Kalliomäki | e93de5f | 2018-01-22 14:43:18 +0100 | [diff] [blame] | 698 | direct_deps_only = true |
| 699 | use_unprocessed_jars = true |
| 700 | requires_android = true |
Sami Kalliomäki | b9f4bf2 | 2018-03-12 14:19:23 +0100 | [diff] [blame] | 701 | no_build_hooks = true |
Sami Kalliomäki | 7bc55b8 | 2017-11-08 14:24:41 +0100 | [diff] [blame] | 702 | |
mbonadei | b55bd97 | 2017-01-23 01:25:53 -0800 | [diff] [blame] | 703 | deps = [ |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 704 | ":audio_api_java", |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 705 | ":base_java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 706 | ":camera_java", |
| 707 | ":filevideo_java", |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 708 | ":hwcodecs_java", |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 709 | ":java_audio_device_module_java", |
mbonadei | b55bd97 | 2017-01-23 01:25:53 -0800 | [diff] [blame] | 710 | ":libjingle_peerconnection_java", |
| 711 | ":libjingle_peerconnection_metrics_default_java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 712 | ":peerconnection_java", |
| 713 | ":screencapturer_java", |
| 714 | ":surfaceviewrenderer_java", |
| 715 | ":video_api_java", |
| 716 | ":video_java", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 717 | "../../modules/audio_device:audio_device_java", |
| 718 | "../../rtc_base:base_java", |
mbonadei | b55bd97 | 2017-01-23 01:25:53 -0800 | [diff] [blame] | 719 | ] |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 720 | |
| 721 | if (rtc_use_builtin_sw_codecs) { |
| 722 | deps += [ ":swcodecs_java" ] |
| 723 | } |
mbonadei | b55bd97 | 2017-01-23 01:25:53 -0800 | [diff] [blame] | 724 | } |
| 725 | |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 726 | # TODO(sakal): Extract files from this target to releveant subtargets, video, audio etc. |
| 727 | rtc_android_library("base_java") { |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 728 | java_files = [ |
Sami Kalliomäki | 61db3fd | 2018-04-09 17:51:19 +0200 | [diff] [blame] | 729 | "api/org/webrtc/RefCounted.java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 730 | "src/java/org/webrtc/CalledByNative.java", |
| 731 | "src/java/org/webrtc/CalledByNativeUnchecked.java", |
| 732 | "src/java/org/webrtc/Histogram.java", |
| 733 | "src/java/org/webrtc/JniCommon.java", |
| 734 | "src/java/org/webrtc/JniHelper.java", |
| 735 | "src/java/org/webrtc/JNINamespace.java", |
| 736 | "src/java/org/webrtc/NativeClassQualifiedName.java", |
Sami Kalliomäki | 61db3fd | 2018-04-09 17:51:19 +0200 | [diff] [blame] | 737 | "src/java/org/webrtc/RefCountDelegate.java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 738 | "src/java/org/webrtc/WebRtcClassLoader.java", |
| 739 | ] |
| 740 | |
| 741 | deps = [ |
| 742 | "//rtc_base:base_java", |
| 743 | ] |
| 744 | } |
| 745 | |
| 746 | rtc_android_library("video_api_java") { |
| 747 | java_files = [ |
Sami Kalliomäki | e2410e9 | 2017-06-02 14:46:12 +0200 | [diff] [blame] | 748 | "api/org/webrtc/EncodedImage.java", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 749 | "api/org/webrtc/VideoCapturer.java", |
Sami Kalliomäki | e2410e9 | 2017-06-02 14:46:12 +0200 | [diff] [blame] | 750 | "api/org/webrtc/VideoCodecInfo.java", |
Bjorn Mellem | 5c4eebb | 2017-06-12 09:21:03 -0700 | [diff] [blame] | 751 | "api/org/webrtc/VideoCodecStatus.java", |
Sami Kalliomäki | e2410e9 | 2017-06-02 14:46:12 +0200 | [diff] [blame] | 752 | "api/org/webrtc/VideoDecoder.java", |
Bjorn Mellem | 3814524 | 2017-06-20 11:35:04 -0700 | [diff] [blame] | 753 | "api/org/webrtc/VideoDecoderFactory.java", |
Sami Kalliomäki | e2410e9 | 2017-06-02 14:46:12 +0200 | [diff] [blame] | 754 | "api/org/webrtc/VideoEncoder.java", |
Bjorn Mellem | 9fbbdc2 | 2017-06-16 09:23:50 -0700 | [diff] [blame] | 755 | "api/org/webrtc/VideoEncoderFactory.java", |
magjed | 5522021 | 2017-06-02 02:45:56 -0700 | [diff] [blame] | 756 | "api/org/webrtc/VideoFrame.java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 757 | "api/org/webrtc/VideoRenderer.java", # TODO(sakal): Remove |
sakal | 0ba43b5 | 2017-08-14 05:17:49 -0700 | [diff] [blame] | 758 | "api/org/webrtc/VideoSink.java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 759 | ] |
| 760 | |
| 761 | # TODO(sakal): These should be moved to video_java but cannot because of dependencies. |
| 762 | java_files += [ |
| 763 | "api/org/webrtc/EglBase.java", |
| 764 | "api/org/webrtc/GlShader.java", |
| 765 | "api/org/webrtc/GlTextureFrameBuffer.java", |
| 766 | "api/org/webrtc/GlUtil.java", |
| 767 | "api/org/webrtc/JavaI420Buffer.java", |
| 768 | "api/org/webrtc/RendererCommon.java", |
| 769 | "api/org/webrtc/SurfaceTextureHelper.java", |
Magnus Jedvert | 1d270f8 | 2018-04-16 16:28:29 +0200 | [diff] [blame] | 770 | "api/org/webrtc/TextureBufferImpl.java", |
Sami Kalliomäki | cb98b11 | 2017-10-16 11:20:26 +0200 | [diff] [blame] | 771 | "api/org/webrtc/YuvConverter.java", |
Sami Kalliomäki | f6515cd | 2017-11-02 11:25:58 +0100 | [diff] [blame] | 772 | "api/org/webrtc/YuvHelper.java", |
magjed | 82de179 | 2017-04-25 05:32:07 -0700 | [diff] [blame] | 773 | "src/java/org/webrtc/EglBase10.java", |
| 774 | "src/java/org/webrtc/EglBase14.java", |
Magnus Jedvert | e2be7ee | 2018-04-04 10:42:25 +0200 | [diff] [blame] | 775 | ] |
| 776 | |
| 777 | deps = [ |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 778 | ":base_java", |
Magnus Jedvert | e2be7ee | 2018-04-04 10:42:25 +0200 | [diff] [blame] | 779 | "//rtc_base:base_java", |
| 780 | ] |
| 781 | } |
| 782 | |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 783 | rtc_android_library("audio_api_java") { |
| 784 | java_files = [ "api/org/webrtc/audio/AudioDeviceModule.java" ] |
| 785 | |
| 786 | deps = [ |
| 787 | ":base_java", |
| 788 | "//rtc_base:base_java", |
| 789 | ] |
| 790 | } |
| 791 | |
| 792 | rtc_android_library("java_audio_device_module_java") { |
Magnus Jedvert | e2be7ee | 2018-04-04 10:42:25 +0200 | [diff] [blame] | 793 | java_files = [ |
| 794 | "api/org/webrtc/audio/JavaAudioDeviceModule.java", |
| 795 | "src/java/org/webrtc/audio/VolumeLogger.java", |
Paulina Hensman | 89dd7bf | 2018-03-20 15:27:52 +0100 | [diff] [blame] | 796 | "src/java/org/webrtc/audio/WebRtcAudioEffects.java", |
| 797 | "src/java/org/webrtc/audio/WebRtcAudioManager.java", |
| 798 | "src/java/org/webrtc/audio/WebRtcAudioRecord.java", |
| 799 | "src/java/org/webrtc/audio/WebRtcAudioTrack.java", |
| 800 | "src/java/org/webrtc/audio/WebRtcAudioUtils.java", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 801 | ] |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 802 | |
| 803 | deps = [ |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 804 | ":audio_api_java", |
Magnus Jedvert | e2be7ee | 2018-04-04 10:42:25 +0200 | [diff] [blame] | 805 | ":base_java", |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 806 | "//rtc_base:base_java", |
| 807 | ] |
| 808 | } |
| 809 | |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 810 | # JNI target for java_audio_device_module_java |
| 811 | rtc_source_set("java_audio_device_module_jni") { |
| 812 | sources = [ |
| 813 | "src/jni/audio_device/java_audio_device_module.cc", |
| 814 | ] |
| 815 | |
| 816 | deps = [ |
| 817 | ":base_jni", |
| 818 | ":generated_java_audio_jni", |
| 819 | ":java_audio_device_module", |
| 820 | ] |
| 821 | } |
| 822 | |
| 823 | generate_jni("generated_java_audio_jni") { |
| 824 | sources = [ |
| 825 | "api/org/webrtc/audio/JavaAudioDeviceModule.java", |
| 826 | ] |
| 827 | jni_package = "" |
| 828 | jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h" |
| 829 | } |
| 830 | |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 831 | rtc_android_library("video_java") { |
| 832 | java_files = [ |
| 833 | "api/org/webrtc/EglRenderer.java", |
| 834 | "api/org/webrtc/GlRectDrawer.java", |
| 835 | "api/org/webrtc/VideoDecoderFallback.java", |
| 836 | "api/org/webrtc/VideoEncoderFallback.java", |
| 837 | "api/org/webrtc/VideoFrameDrawer.java", |
Magnus Jedvert | 1a759c6 | 2018-04-24 15:11:02 +0200 | [diff] [blame] | 838 | "src/java/org/webrtc/NV21Buffer.java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 839 | "src/java/org/webrtc/VideoDecoderWrapper.java", |
| 840 | "src/java/org/webrtc/VideoEncoderWrapper.java", |
| 841 | "src/java/org/webrtc/WrappedNativeI420Buffer.java", |
| 842 | "src/java/org/webrtc/WrappedNativeVideoDecoder.java", |
| 843 | "src/java/org/webrtc/WrappedNativeVideoEncoder.java", |
| 844 | ] |
| 845 | |
| 846 | deps = [ |
| 847 | ":base_java", |
| 848 | ":video_api_java", |
| 849 | "//rtc_base:base_java", |
| 850 | ] |
| 851 | } |
| 852 | |
| 853 | rtc_android_library("camera_java") { |
| 854 | java_files = [ |
| 855 | "api/org/webrtc/Camera1Capturer.java", |
| 856 | "api/org/webrtc/Camera1Enumerator.java", |
| 857 | "api/org/webrtc/Camera2Capturer.java", |
| 858 | "api/org/webrtc/Camera2Enumerator.java", |
| 859 | "api/org/webrtc/CameraEnumerationAndroid.java", |
| 860 | "api/org/webrtc/CameraEnumerator.java", |
| 861 | "api/org/webrtc/CameraVideoCapturer.java", |
| 862 | "src/java/org/webrtc/Camera1Session.java", |
| 863 | "src/java/org/webrtc/Camera2Session.java", |
| 864 | "src/java/org/webrtc/CameraCapturer.java", |
| 865 | "src/java/org/webrtc/CameraSession.java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 866 | ] |
| 867 | |
| 868 | deps = [ |
| 869 | ":base_java", |
| 870 | ":video_api_java", |
| 871 | ":video_java", |
| 872 | "//rtc_base:base_java", |
| 873 | ] |
| 874 | } |
| 875 | |
| 876 | rtc_android_library("screencapturer_java") { |
| 877 | java_files = [ "api/org/webrtc/ScreenCapturerAndroid.java" ] |
| 878 | |
| 879 | deps = [ |
| 880 | ":video_api_java", |
| 881 | ":video_java", |
| 882 | "//rtc_base:base_java", |
| 883 | ] |
| 884 | } |
| 885 | |
| 886 | rtc_android_library("surfaceviewrenderer_java") { |
| 887 | java_files = [ |
| 888 | "api/org/webrtc/SurfaceEglRenderer.java", |
| 889 | "api/org/webrtc/SurfaceViewRenderer.java", |
| 890 | ] |
| 891 | |
| 892 | deps = [ |
| 893 | ":video_api_java", |
| 894 | ":video_java", |
| 895 | "//rtc_base:base_java", |
| 896 | ] |
| 897 | } |
| 898 | |
| 899 | rtc_android_library("filevideo_java") { |
| 900 | java_files = [ |
| 901 | "api/org/webrtc/VideoFileRenderer.java", |
| 902 | "api/org/webrtc/FileVideoCapturer.java", |
| 903 | ] |
| 904 | |
| 905 | deps = [ |
| 906 | ":base_java", |
| 907 | ":video_api_java", |
| 908 | ":video_java", |
| 909 | "//rtc_base:base_java", |
| 910 | ] |
| 911 | } |
| 912 | |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 913 | if (rtc_use_builtin_sw_codecs) { |
| 914 | rtc_android_library("swcodecs_java") { |
| 915 | java_files = [ |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 916 | "api/org/webrtc/SoftwareVideoDecoderFactory.java", |
| 917 | "api/org/webrtc/SoftwareVideoEncoderFactory.java", |
| 918 | "src/java/org/webrtc/VP8Encoder.java", |
| 919 | "src/java/org/webrtc/VP8Decoder.java", |
| 920 | "src/java/org/webrtc/VP9Encoder.java", |
| 921 | "src/java/org/webrtc/VP9Decoder.java", |
| 922 | ] |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 923 | |
| 924 | deps = [ |
| 925 | ":base_java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 926 | ":video_api_java", |
| 927 | ":video_java", |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 928 | "//rtc_base:base_java", |
| 929 | ] |
Anders Carlsson | dd8c165 | 2018-01-30 10:32:13 +0100 | [diff] [blame] | 930 | } |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 931 | } |
| 932 | |
| 933 | rtc_android_library("hwcodecs_java") { |
| 934 | java_files = [ |
| 935 | "src/java/org/webrtc/BaseBitrateAdjuster.java", |
| 936 | "src/java/org/webrtc/BitrateAdjuster.java", |
| 937 | "src/java/org/webrtc/DynamicBitrateAdjuster.java", |
| 938 | "src/java/org/webrtc/FramerateBitrateAdjuster.java", |
| 939 | "src/java/org/webrtc/HardwareVideoDecoder.java", |
| 940 | "src/java/org/webrtc/HardwareVideoEncoder.java", |
| 941 | "src/java/org/webrtc/MediaCodecUtils.java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 942 | "src/java/org/webrtc/NV12Buffer.java", |
| 943 | "src/java/org/webrtc/VideoCodecType.java", |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 944 | ] |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 945 | |
| 946 | deps = [ |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 947 | ":base_java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 948 | ":video_api_java", |
| 949 | ":video_java", |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 950 | "//rtc_base:base_java", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 951 | ] |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 952 | |
| 953 | if (rtc_use_builtin_sw_codecs) { |
| 954 | java_files += [ |
| 955 | "api/org/webrtc/HardwareVideoDecoderFactory.java", # TODO(andersc): make this not depend on SoftwareVideoDecoderFactory |
| 956 | "api/org/webrtc/HardwareVideoEncoderFactory.java", # TODO(andersc): make this not depend on SoftwareVideoEncoderFactory |
| 957 | ] |
| 958 | |
| 959 | deps += [ ":swcodecs_java" ] |
| 960 | } |
| 961 | } |
| 962 | |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 963 | rtc_android_library("peerconnection_java") { |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 964 | java_files = [ |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 965 | "api/org/webrtc/audio/LegacyAudioDeviceModule.java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 966 | "api/org/webrtc/AudioProcessingFactory.java", |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 967 | "api/org/webrtc/AudioSource.java", |
| 968 | "api/org/webrtc/AudioTrack.java", |
| 969 | "api/org/webrtc/CallSessionFileRotatingLogSink.java", |
| 970 | "api/org/webrtc/DataChannel.java", |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 971 | "api/org/webrtc/DtmfSender.java", |
| 972 | "api/org/webrtc/FecControllerFactoryFactoryInterface.java", |
| 973 | "api/org/webrtc/IceCandidate.java", |
| 974 | "api/org/webrtc/MediaCodecVideoDecoder.java", |
| 975 | "api/org/webrtc/MediaCodecVideoEncoder.java", |
| 976 | "api/org/webrtc/MediaConstraints.java", |
| 977 | "api/org/webrtc/MediaSource.java", |
| 978 | "api/org/webrtc/MediaStream.java", |
| 979 | "api/org/webrtc/MediaStreamTrack.java", |
| 980 | "api/org/webrtc/NativeLibraryLoader.java", |
| 981 | "api/org/webrtc/NativePeerConnectionFactory.java", |
| 982 | "api/org/webrtc/NetworkMonitor.java", # TODDO(sakal): Break dependencies and move to base_java. |
| 983 | "api/org/webrtc/NetworkMonitorAutoDetect.java", # TODDO(sakal): Break dependencies and move to base_java. |
| 984 | "api/org/webrtc/PeerConnection.java", |
| 985 | "api/org/webrtc/PeerConnectionFactory.java", |
| 986 | "api/org/webrtc/RTCStats.java", |
| 987 | "api/org/webrtc/RTCStatsCollectorCallback.java", |
| 988 | "api/org/webrtc/RTCStatsReport.java", |
| 989 | "api/org/webrtc/RtpParameters.java", |
| 990 | "api/org/webrtc/RtpReceiver.java", |
| 991 | "api/org/webrtc/RtpSender.java", |
| 992 | "api/org/webrtc/RtpTransceiver.java", |
| 993 | "api/org/webrtc/SdpObserver.java", |
| 994 | "api/org/webrtc/SessionDescription.java", |
| 995 | "api/org/webrtc/StatsObserver.java", |
| 996 | "api/org/webrtc/StatsReport.java", |
| 997 | "api/org/webrtc/TurnCustomizer.java", |
| 998 | "api/org/webrtc/VideoSource.java", |
| 999 | "api/org/webrtc/VideoTrack.java", |
| 1000 | "src/java/org/webrtc/NativeLibrary.java", |
| 1001 | ] |
| 1002 | |
| 1003 | deps = [ |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 1004 | ":audio_api_java", |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 1005 | ":base_java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 1006 | ":video_api_java", |
| 1007 | ":video_java", # TODO(sakal): Remove dependency. |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 1008 | "//modules/audio_device:audio_device_java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 1009 | "//rtc_base:base_java", |
| 1010 | ] |
| 1011 | } |
| 1012 | |
| 1013 | # Old target that pulls in everything. This will be going away in the future, |
| 1014 | # clients should depend on individual video_java etc. targets instead. |
| 1015 | rtc_android_library("libjingle_peerconnection_java") { |
| 1016 | java_files = [ "src/java/org/webrtc/Empty.java" ] |
| 1017 | |
| 1018 | deps = [ |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 1019 | ":audio_api_java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 1020 | ":base_java", |
| 1021 | ":camera_java", |
| 1022 | ":filevideo_java", |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 1023 | ":hwcodecs_java", |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 1024 | ":java_audio_device_module_java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 1025 | ":peerconnection_java", |
| 1026 | ":screencapturer_java", |
| 1027 | ":surfaceviewrenderer_java", |
| 1028 | ":video_api_java", |
| 1029 | ":video_java", |
Sami Kalliomäki | d7e1266 | 2018-03-28 15:41:28 +0200 | [diff] [blame] | 1030 | "//modules/audio_device:audio_device_java", |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 1031 | "//rtc_base:base_java", |
| 1032 | ] |
| 1033 | |
| 1034 | if (rtc_use_builtin_sw_codecs) { |
| 1035 | deps += [ ":swcodecs_java" ] |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 1036 | |
| 1037 | java_files += [ |
| 1038 | "api/org/webrtc/DefaultVideoDecoderFactory.java", |
| 1039 | "api/org/webrtc/DefaultVideoEncoderFactory.java", |
| 1040 | ] |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 1041 | } |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 1042 | } |
| 1043 | |
Mirko Bonadei | fbb3b7d | 2017-11-07 15:36:33 +0000 | [diff] [blame] | 1044 | rtc_android_library("libjingle_peerconnection_metrics_default_java") { |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 1045 | java_files = [ "api/org/webrtc/Metrics.java" ] |
| 1046 | |
| 1047 | deps = [ |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 1048 | ":base_java", |
Magnus Jedvert | 986a79c | 2017-11-18 16:45:18 +0100 | [diff] [blame] | 1049 | ":libjingle_peerconnection_java", |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 1050 | "../../rtc_base:base_java", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 1051 | ] |
| 1052 | } |
| 1053 | |
| 1054 | if (rtc_include_tests) { |
Mirko Bonadei | fbb3b7d | 2017-11-07 15:36:33 +0000 | [diff] [blame] | 1055 | rtc_instrumentation_test_apk("libjingle_peerconnection_android_unittest") { |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 1056 | apk_name = "libjingle_peerconnection_android_unittest" |
| 1057 | android_manifest = "instrumentationtests/AndroidManifest.xml" |
| 1058 | |
| 1059 | java_files = [ |
| 1060 | "instrumentationtests/src/org/webrtc/Camera1CapturerUsingByteBufferTest.java", |
| 1061 | "instrumentationtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java", |
| 1062 | "instrumentationtests/src/org/webrtc/Camera2CapturerTest.java", |
| 1063 | "instrumentationtests/src/org/webrtc/CameraVideoCapturerTestFixtures.java", |
Anders Carlsson | dc1b9f1 | 2017-11-10 13:15:04 +0100 | [diff] [blame] | 1064 | "instrumentationtests/src/org/webrtc/DefaultVideoEncoderFactoryTest.java", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 1065 | "instrumentationtests/src/org/webrtc/EglRendererTest.java", |
sakal | e8aca24 | 2017-01-17 03:32:06 -0800 | [diff] [blame] | 1066 | "instrumentationtests/src/org/webrtc/FileVideoCapturerTest.java", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 1067 | "instrumentationtests/src/org/webrtc/GlRectDrawerTest.java", |
Bjorn Mellem | 3814524 | 2017-06-20 11:35:04 -0700 | [diff] [blame] | 1068 | "instrumentationtests/src/org/webrtc/HardwareVideoDecoderTest.java", |
Sami Kalliomäki | f6515cd | 2017-11-02 11:25:58 +0100 | [diff] [blame] | 1069 | "instrumentationtests/src/org/webrtc/HardwareVideoEncoderTest.java", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 1070 | "instrumentationtests/src/org/webrtc/MediaCodecVideoEncoderTest.java", |
| 1071 | "instrumentationtests/src/org/webrtc/NetworkMonitorTest.java", |
Sami Kalliomäki | 4e38321 | 2017-11-15 14:15:24 +0100 | [diff] [blame] | 1072 | "instrumentationtests/src/org/webrtc/PeerConnectionFactoryTest.java", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 1073 | "instrumentationtests/src/org/webrtc/PeerConnectionTest.java", |
| 1074 | "instrumentationtests/src/org/webrtc/RendererCommonTest.java", |
| 1075 | "instrumentationtests/src/org/webrtc/SurfaceTextureHelperTest.java", |
| 1076 | "instrumentationtests/src/org/webrtc/SurfaceViewRendererOnMeasureTest.java", |
sakal | e8aca24 | 2017-01-17 03:32:06 -0800 | [diff] [blame] | 1077 | "instrumentationtests/src/org/webrtc/VideoFileRendererTest.java", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 1078 | "instrumentationtests/src/org/webrtc/WebRtcJniBootTest.java", |
Sami Kalliomäki | f6515cd | 2017-11-02 11:25:58 +0100 | [diff] [blame] | 1079 | "instrumentationtests/src/org/webrtc/YuvHelperTest.java", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 1080 | ] |
| 1081 | |
sakal | e8aca24 | 2017-01-17 03:32:06 -0800 | [diff] [blame] | 1082 | data = [ |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 1083 | "../../sdk/android/instrumentationtests/src/org/webrtc/capturetestvideo.y4m", |
sakal | e8aca24 | 2017-01-17 03:32:06 -0800 | [diff] [blame] | 1084 | ] |
| 1085 | |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 1086 | deps = [ |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 1087 | ":base_java", |
| 1088 | ":libjingle_peerconnection_java", |
| 1089 | ":libjingle_peerconnection_metrics_default_java", |
Sami Kalliomäki | 1641ca3 | 2018-04-04 15:59:31 +0200 | [diff] [blame] | 1090 | ":video_api_java", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 1091 | "//base:base_java", |
sakal | e1674ef | 2017-01-11 06:22:56 -0800 | [diff] [blame] | 1092 | "//base:base_java_test_support", |
Sami Kalliomäki | 725c106 | 2018-03-28 10:49:18 +0200 | [diff] [blame] | 1093 | "//rtc_base:base_java", |
sakal | e1674ef | 2017-01-11 06:22:56 -0800 | [diff] [blame] | 1094 | "//third_party/android_support_test_runner:rules_java", |
| 1095 | "//third_party/android_support_test_runner:runner_java", |
| 1096 | "//third_party/junit", |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 1097 | ] |
| 1098 | |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 1099 | shared_libraries = [ "../../sdk/android:libjingle_peerconnection_so" ] |
magjed | 768c648 | 2016-12-06 04:29:37 -0800 | [diff] [blame] | 1100 | } |
| 1101 | } |
Sami Kalliomäki | 82f96e6 | 2018-01-29 13:18:57 +0100 | [diff] [blame] | 1102 | |
| 1103 | # The native API is currently experimental and may change without notice. |
| 1104 | group("native_api") { |
| 1105 | deps = [ |
Paulina Hensman | 89dd7bf | 2018-03-20 15:27:52 +0100 | [diff] [blame] | 1106 | ":native_api_audio_device_module", |
Sami Kalliomäki | 82f96e6 | 2018-01-29 13:18:57 +0100 | [diff] [blame] | 1107 | ":native_api_base", |
| 1108 | ":native_api_codecs", |
| 1109 | ":native_api_jni", |
Artem Titov | 70899e0 | 2018-03-22 13:34:24 +0100 | [diff] [blame] | 1110 | ":native_api_peerconnection", |
Jonathan Yu | fa6a283 | 2018-02-12 17:32:37 -0800 | [diff] [blame] | 1111 | ":native_api_video", |
Sami Kalliomäki | 82f96e6 | 2018-01-29 13:18:57 +0100 | [diff] [blame] | 1112 | ] |
| 1113 | } |
| 1114 | |
| 1115 | rtc_static_library("native_api_base") { |
| 1116 | visibility = [ "*" ] |
| 1117 | sources = [ |
| 1118 | "native_api/base/init.cc", |
| 1119 | "native_api/base/init.h", |
Sami Kalliomäki | ad148a3 | 2018-02-16 12:55:55 +0100 | [diff] [blame] | 1120 | "native_api/base/networkmonitor.cc", |
| 1121 | "native_api/base/networkmonitor.h", |
Sami Kalliomäki | 82f96e6 | 2018-01-29 13:18:57 +0100 | [diff] [blame] | 1122 | ] |
| 1123 | |
| 1124 | deps = [ |
| 1125 | ":base_jni", |
| 1126 | ":native_api_jni", |
| 1127 | "//rtc_base:checks", |
| 1128 | "//rtc_base:rtc_base", |
| 1129 | ] |
| 1130 | } |
| 1131 | |
| 1132 | generate_jni("generated_native_api_jni") { |
| 1133 | sources = [ |
| 1134 | "src/java/org/webrtc/JniHelper.java", |
| 1135 | "src/java/org/webrtc/WebRtcClassLoader.java", |
| 1136 | ] |
| 1137 | jni_package = "" |
| 1138 | jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h" |
| 1139 | } |
| 1140 | |
| 1141 | # JNI helpers that are also needed from internal JNI code. Cannot depend on any |
| 1142 | # other JNI targets than internal_jni. |
| 1143 | rtc_static_library("native_api_jni") { |
| 1144 | visibility = [ "*" ] |
| 1145 | sources = [ |
| 1146 | "native_api/jni/class_loader.cc", |
| 1147 | "native_api/jni/class_loader.h", |
| 1148 | "native_api/jni/java_types.cc", |
| 1149 | "native_api/jni/java_types.h", |
| 1150 | "native_api/jni/jvm.cc", |
| 1151 | "native_api/jni/jvm.h", |
| 1152 | "native_api/jni/scoped_java_ref.h", |
| 1153 | "src/jni/jni_generator_helper.cc", |
| 1154 | "src/jni/jni_generator_helper.h", |
| 1155 | ] |
| 1156 | |
| 1157 | public = [ |
| 1158 | "native_api/jni/class_loader.h", |
| 1159 | "native_api/jni/java_types.h", |
| 1160 | "native_api/jni/jvm.h", |
| 1161 | "native_api/jni/scoped_java_ref.h", |
| 1162 | ] |
| 1163 | |
| 1164 | deps = [ |
| 1165 | ":generated_external_classes_jni", |
| 1166 | ":generated_native_api_jni", |
| 1167 | ":internal_jni", |
| 1168 | "//api:optional", |
| 1169 | "//rtc_base:checks", |
| 1170 | "//rtc_base:rtc_base_approved", |
| 1171 | ] |
| 1172 | } |
| 1173 | |
| 1174 | # API for wrapping Java VideoDecoderFactory/VideoEncoderFactory classes to C++ |
| 1175 | # objects. |
| 1176 | rtc_static_library("native_api_codecs") { |
| 1177 | visibility = [ "*" ] |
Anders Carlsson | 1f433e4 | 2018-04-24 16:39:05 +0200 | [diff] [blame] | 1178 | allow_poison = [ |
| 1179 | "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove. |
| 1180 | "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove. |
| 1181 | ] |
Sami Kalliomäki | 82f96e6 | 2018-01-29 13:18:57 +0100 | [diff] [blame] | 1182 | sources = [ |
| 1183 | "native_api/codecs/wrapper.cc", |
| 1184 | "native_api/codecs/wrapper.h", |
| 1185 | ] |
| 1186 | |
Sami Kalliomäki | 82f96e6 | 2018-01-29 13:18:57 +0100 | [diff] [blame] | 1187 | deps = [ |
| 1188 | ":base_jni", |
| 1189 | ":video_jni", |
| 1190 | "//api/video_codecs:video_codecs_api", |
| 1191 | "//rtc_base:checks", |
| 1192 | "//rtc_base:rtc_base_approved", |
| 1193 | ] |
| 1194 | } |
Sami Kalliomäki | 78498cf | 2018-02-07 16:59:33 +0100 | [diff] [blame] | 1195 | |
Artem Titov | 70899e0 | 2018-03-22 13:34:24 +0100 | [diff] [blame] | 1196 | # API for creating Java PeerConnectionFactory from C++ equivalents. |
| 1197 | rtc_static_library("native_api_peerconnection") { |
| 1198 | visibility = [ "*" ] |
| 1199 | sources = [ |
| 1200 | "native_api/peerconnection/peerconnectionfactory.cc", |
| 1201 | "native_api/peerconnection/peerconnectionfactory.h", |
| 1202 | ] |
| 1203 | |
| 1204 | if (is_clang) { |
| 1205 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 1206 | suppressed_configs += [ |
| 1207 | "//build/config/clang:extra_warnings", |
| 1208 | "//build/config/clang:find_bad_constructs", |
| 1209 | ] |
| 1210 | } |
| 1211 | |
| 1212 | deps = [ |
| 1213 | ":base_jni", |
| 1214 | ":peerconnection_jni", |
| 1215 | "//api:libjingle_peerconnection_api", |
| 1216 | "//api/video_codecs:video_codecs_api", |
| 1217 | "//rtc_base:rtc_base", |
| 1218 | ] |
| 1219 | } |
| 1220 | |
Jonathan Yu | fa6a283 | 2018-02-12 17:32:37 -0800 | [diff] [blame] | 1221 | # API for creating C++ wrapper implementations of api/mediastreaminterface.h |
| 1222 | # video interfaces from their Java equivalents. |
| 1223 | rtc_static_library("native_api_video") { |
| 1224 | visibility = [ "*" ] |
Anders Carlsson | 1f433e4 | 2018-04-24 16:39:05 +0200 | [diff] [blame] | 1225 | allow_poison = [ |
| 1226 | "audio_codecs", # TODO(bugs.webrtc.org/8396): Remove. |
| 1227 | "software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove. |
| 1228 | ] |
Jonathan Yu | fa6a283 | 2018-02-12 17:32:37 -0800 | [diff] [blame] | 1229 | sources = [ |
| 1230 | "native_api/video/wrapper.cc", |
| 1231 | "native_api/video/wrapper.h", |
| 1232 | ] |
| 1233 | deps = [ |
| 1234 | ":native_api_jni", |
| 1235 | ":video_jni", |
| 1236 | "//api:libjingle_peerconnection_api", |
| 1237 | "//api:video_frame_api", |
| 1238 | "//rtc_base:rtc_base_approved", |
| 1239 | ] |
| 1240 | } |
| 1241 | |
Sami Kalliomäki | 78498cf | 2018-02-07 16:59:33 +0100 | [diff] [blame] | 1242 | generate_jni("generated_native_unittests_jni") { |
| 1243 | testonly = true |
| 1244 | |
| 1245 | sources = [ |
Paulina Hensman | a2a9875 | 2018-04-11 17:08:17 +0200 | [diff] [blame] | 1246 | "native_unittests/org/webrtc/ApplicationContextProvider.java", |
| 1247 | "native_unittests/org/webrtc/BuildInfo.java", |
Sami Kalliomäki | 78498cf | 2018-02-07 16:59:33 +0100 | [diff] [blame] | 1248 | "native_unittests/org/webrtc/JavaTypesTestHelper.java", |
Artem Titov | 70899e0 | 2018-03-22 13:34:24 +0100 | [diff] [blame] | 1249 | "native_unittests/org/webrtc/PeerConnectionFactoryInitializationHelper.java", |
Sami Kalliomäki | 78498cf | 2018-02-07 16:59:33 +0100 | [diff] [blame] | 1250 | ] |
| 1251 | jni_package = "" |
| 1252 | jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h" |
| 1253 | } |
| 1254 | |
| 1255 | rtc_android_library("native_unittests_java") { |
| 1256 | testonly = true |
| 1257 | |
Artem Titov | 70899e0 | 2018-03-22 13:34:24 +0100 | [diff] [blame] | 1258 | java_files = [ |
Paulina Hensman | a2a9875 | 2018-04-11 17:08:17 +0200 | [diff] [blame] | 1259 | "native_unittests/org/webrtc/ApplicationContextProvider.java", |
| 1260 | "native_unittests/org/webrtc/BuildInfo.java", |
Artem Titov | 70899e0 | 2018-03-22 13:34:24 +0100 | [diff] [blame] | 1261 | "native_unittests/org/webrtc/JavaTypesTestHelper.java", |
| 1262 | "native_unittests/org/webrtc/PeerConnectionFactoryInitializationHelper.java", |
| 1263 | ] |
Sami Kalliomäki | 78498cf | 2018-02-07 16:59:33 +0100 | [diff] [blame] | 1264 | |
| 1265 | deps = [ |
| 1266 | ":libjingle_peerconnection_java", |
Paulina Hensman | a2a9875 | 2018-04-11 17:08:17 +0200 | [diff] [blame] | 1267 | "//third_party/android_support_test_runner:runner_java", |
Sami Kalliomäki | 78498cf | 2018-02-07 16:59:33 +0100 | [diff] [blame] | 1268 | ] |
| 1269 | } |
| 1270 | |
| 1271 | rtc_source_set("native_unittests") { |
| 1272 | testonly = true |
| 1273 | |
| 1274 | sources = [ |
Paulina Hensman | a2a9875 | 2018-04-11 17:08:17 +0200 | [diff] [blame] | 1275 | "native_unittests/audio_device/audio_device_unittest.cc", |
Sami Kalliomäki | 78498cf | 2018-02-07 16:59:33 +0100 | [diff] [blame] | 1276 | "native_unittests/java_types_unittest.cc", |
Artem Titov | 70899e0 | 2018-03-22 13:34:24 +0100 | [diff] [blame] | 1277 | "native_unittests/peerconnection/peerconnectionfactory_unittest.cc", |
Sami Kalliomäki | 78498cf | 2018-02-07 16:59:33 +0100 | [diff] [blame] | 1278 | "native_unittests/test_jni_onload.cc", |
| 1279 | ] |
| 1280 | |
Paulina Hensman | a2a9875 | 2018-04-11 17:08:17 +0200 | [diff] [blame] | 1281 | data = [ |
| 1282 | "../../resources/audio_device/audio_short44.pcm", |
| 1283 | "../../resources/audio_device/audio_short48.pcm", |
| 1284 | ] |
| 1285 | |
Artem Titov | 70899e0 | 2018-03-22 13:34:24 +0100 | [diff] [blame] | 1286 | if (is_clang) { |
| 1287 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 1288 | suppressed_configs += [ |
| 1289 | "//build/config/clang:extra_warnings", |
| 1290 | "//build/config/clang:find_bad_constructs", |
| 1291 | ] |
| 1292 | } |
| 1293 | |
Sami Kalliomäki | 78498cf | 2018-02-07 16:59:33 +0100 | [diff] [blame] | 1294 | deps = [ |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 1295 | ":audio_device_module_base", |
Artem Titov | 70899e0 | 2018-03-22 13:34:24 +0100 | [diff] [blame] | 1296 | ":audio_jni", |
Paulina Hensman | a2a9875 | 2018-04-11 17:08:17 +0200 | [diff] [blame] | 1297 | ":base_jni", |
Sami Kalliomäki | 78498cf | 2018-02-07 16:59:33 +0100 | [diff] [blame] | 1298 | ":generated_native_unittests_jni", |
Artem Titov | 70899e0 | 2018-03-22 13:34:24 +0100 | [diff] [blame] | 1299 | ":media_jni", |
Paulina Hensman | a2a9875 | 2018-04-11 17:08:17 +0200 | [diff] [blame] | 1300 | ":native_api_audio_device_module", |
Sami Kalliomäki | 78498cf | 2018-02-07 16:59:33 +0100 | [diff] [blame] | 1301 | ":native_api_base", |
| 1302 | ":native_api_jni", |
Artem Titov | 70899e0 | 2018-03-22 13:34:24 +0100 | [diff] [blame] | 1303 | ":native_api_peerconnection", |
| 1304 | ":native_unittests_java", |
Sami Kalliomäki | 7d8f594 | 2018-04-23 15:07:34 +0200 | [diff] [blame] | 1305 | ":opensles_audio_device_module", |
Artem Titov | 70899e0 | 2018-03-22 13:34:24 +0100 | [diff] [blame] | 1306 | ":video_jni", |
Paulina Hensman | a2a9875 | 2018-04-11 17:08:17 +0200 | [diff] [blame] | 1307 | "../../system_wrappers:system_wrappers", |
Artem Titov | 70899e0 | 2018-03-22 13:34:24 +0100 | [diff] [blame] | 1308 | "//api/audio_codecs:builtin_audio_decoder_factory", |
| 1309 | "//api/audio_codecs:builtin_audio_encoder_factory", |
| 1310 | "//media:rtc_audio_video", |
| 1311 | "//media:rtc_internal_video_codecs", |
| 1312 | "//media:rtc_media_base", |
Paulina Hensman | a2a9875 | 2018-04-11 17:08:17 +0200 | [diff] [blame] | 1313 | "//modules/audio_device:audio_device", |
| 1314 | "//modules/audio_device:mock_audio_device", |
Artem Titov | 70899e0 | 2018-03-22 13:34:24 +0100 | [diff] [blame] | 1315 | "//modules/audio_processing:audio_processing", |
| 1316 | "//modules/utility:utility", |
| 1317 | "//pc:libjingle_peerconnection", |
Sami Kalliomäki | 78498cf | 2018-02-07 16:59:33 +0100 | [diff] [blame] | 1318 | "//rtc_base:checks", |
Artem Titov | 70899e0 | 2018-03-22 13:34:24 +0100 | [diff] [blame] | 1319 | "//rtc_base:rtc_base_approved", |
Paulina Hensman | a2a9875 | 2018-04-11 17:08:17 +0200 | [diff] [blame] | 1320 | "//test:fileutils", |
Sami Kalliomäki | 78498cf | 2018-02-07 16:59:33 +0100 | [diff] [blame] | 1321 | "//test:test_support", |
| 1322 | "//testing/gtest", |
| 1323 | ] |
| 1324 | } |