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