kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [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 | |
mbonadei | 9aa3f0a | 2017-01-24 06:58:22 -0800 | [diff] [blame] | 9 | import("../webrtc.gni") |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 10 | import("audio_coding/audio_coding.gni") |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 11 | |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 12 | group("modules") { |
Mirko Bonadei | 28fe510 | 2017-12-15 10:00:58 +0100 | [diff] [blame] | 13 | deps = [ |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 14 | "audio_coding", |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 15 | "audio_device", |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 16 | "audio_mixer", |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 17 | "audio_processing", |
| 18 | "bitrate_controller", |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 19 | "congestion_controller", |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 20 | "pacing", |
| 21 | "remote_bitrate_estimator", |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 22 | "rtp_rtcp", |
| 23 | "utility", |
| 24 | "video_coding", |
| 25 | "video_processing", |
| 26 | ] |
Joachim Bauch | 75f18fc | 2017-12-20 21:25:47 +0100 | [diff] [blame] | 27 | |
| 28 | if (rtc_desktop_capture_supported) { |
| 29 | deps += [ "desktop_capture" ] |
| 30 | } |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 31 | } |
| 32 | |
Ilya Nikolaevskiy | 558cabf | 2017-11-14 10:32:15 +0100 | [diff] [blame] | 33 | rtc_source_set("module_api_public") { |
| 34 | sources = [ |
| 35 | "include/module_common_types_public.h", |
| 36 | ] |
| 37 | deps = [ |
| 38 | "..:webrtc_common", |
Danil Chapovalov | 196100e | 2018-06-21 10:17:24 +0200 | [diff] [blame] | 39 | "//third_party/abseil-cpp/absl/types:optional", |
Ilya Nikolaevskiy | 558cabf | 2017-11-14 10:32:15 +0100 | [diff] [blame] | 40 | ] |
| 41 | } |
| 42 | |
mbonadei | 1140f97 | 2017-04-26 03:38:35 -0700 | [diff] [blame] | 43 | rtc_source_set("module_api") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 44 | visibility = [ "*" ] |
mbonadei | 1140f97 | 2017-04-26 03:38:35 -0700 | [diff] [blame] | 45 | sources = [ |
| 46 | "include/module.h", |
Danil Chapovalov | db12856 | 2018-09-17 13:11:50 +0200 | [diff] [blame] | 47 | "include/module_common_types.cc", |
mbonadei | 1140f97 | 2017-04-26 03:38:35 -0700 | [diff] [blame] | 48 | "include/module_common_types.h", |
| 49 | ] |
| 50 | deps = [ |
Ilya Nikolaevskiy | 558cabf | 2017-11-14 10:32:15 +0100 | [diff] [blame] | 51 | ":module_api_public", |
Ying Wang | 0dd1b0a | 2018-02-20 12:50:27 +0100 | [diff] [blame] | 52 | ":module_fec_api", |
mbonadei | 1140f97 | 2017-04-26 03:38:35 -0700 | [diff] [blame] | 53 | "..:webrtc_common", |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 54 | "../api:libjingle_peerconnection_api", |
philipel | 1a4746a | 2018-07-09 15:52:29 +0200 | [diff] [blame] | 55 | "../modules/rtp_rtcp:rtp_video_header", |
Danil Chapovalov | db12856 | 2018-09-17 13:11:50 +0200 | [diff] [blame] | 56 | "../rtc_base:safe_conversions", |
mbonadei | 1140f97 | 2017-04-26 03:38:35 -0700 | [diff] [blame] | 57 | ] |
| 58 | } |
| 59 | |
Ying Wang | 0dd1b0a | 2018-02-20 12:50:27 +0100 | [diff] [blame] | 60 | rtc_source_set("module_fec_api") { |
| 61 | visibility = [ "*" ] |
| 62 | sources = [ |
| 63 | "include/module_fec_types.h", |
| 64 | ] |
| 65 | } |
| 66 | |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 67 | if (rtc_include_tests) { |
ehmaldonado | 3a7f35b | 2016-09-14 05:10:01 -0700 | [diff] [blame] | 68 | modules_tests_resources = [ |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 69 | "../resources/audio_coding/testfile32kHz.pcm", |
| 70 | "../resources/audio_coding/teststereo32kHz.pcm", |
| 71 | "../resources/foreman_cif.yuv", |
ehmaldonado | 3a7f35b | 2016-09-14 05:10:01 -0700 | [diff] [blame] | 72 | ] |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 73 | |
| 74 | if (is_ios) { |
| 75 | bundle_data("modules_tests_bundle_data") { |
| 76 | testonly = true |
| 77 | sources = modules_tests_resources |
| 78 | outputs = [ |
| 79 | "{{bundle_resources_dir}}/{{source_file_part}}", |
| 80 | ] |
| 81 | } |
| 82 | } |
| 83 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 84 | rtc_test("modules_tests") { |
ehmaldonado | f98dc10 | 2016-08-03 10:46:47 -0700 | [diff] [blame] | 85 | testonly = true |
| 86 | |
ehmaldonado | f98dc10 | 2016-08-03 10:46:47 -0700 | [diff] [blame] | 87 | deps = [ |
ehmaldonado | 26bddb9 | 2016-11-30 06:12:01 -0800 | [diff] [blame] | 88 | "../test:test_main", |
ehmaldonado | 656610f | 2017-02-06 02:21:11 -0800 | [diff] [blame] | 89 | "../test:video_test_common", |
ehmaldonado | 9cbb0a1 | 2017-01-30 03:07:03 -0800 | [diff] [blame] | 90 | "audio_coding:audio_coding_modules_tests", |
ehmaldonado | 9cbb0a1 | 2017-01-30 03:07:03 -0800 | [diff] [blame] | 91 | "rtp_rtcp:rtp_rtcp_modules_tests", |
| 92 | "video_coding:video_coding_modules_tests", |
ehmaldonado | f98dc10 | 2016-08-03 10:46:47 -0700 | [diff] [blame] | 93 | "//testing/gtest", |
| 94 | ] |
| 95 | |
Joachim Bauch | 75f18fc | 2017-12-20 21:25:47 +0100 | [diff] [blame] | 96 | if (rtc_desktop_capture_supported) { |
| 97 | deps += [ "desktop_capture:desktop_capture_modules_tests" ] |
| 98 | } |
| 99 | |
ehmaldonado | 3a7f35b | 2016-09-14 05:10:01 -0700 | [diff] [blame] | 100 | data = modules_tests_resources |
| 101 | |
ehmaldonado | f98dc10 | 2016-08-03 10:46:47 -0700 | [diff] [blame] | 102 | if (is_android) { |
brandtr | df23299 | 2017-09-07 07:50:06 -0700 | [diff] [blame] | 103 | deps += [ |
| 104 | # NOTE(brandtr): Including Java classes seems only to be possible from |
| 105 | # rtc_test targets. Therefore we include this target here, instead of |
| 106 | # in video_coding_modules_tests, where it is actually used. |
| 107 | "../sdk/android:libjingle_peerconnection_java", |
| 108 | "//testing/android/native_test:native_test_native_code", |
| 109 | ] |
sakal | 714dd4e | 2016-08-15 02:29:11 -0700 | [diff] [blame] | 110 | shard_timeout = 900 |
ehmaldonado | f98dc10 | 2016-08-03 10:46:47 -0700 | [diff] [blame] | 111 | } |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 112 | |
| 113 | if (is_ios) { |
| 114 | deps += [ ":modules_tests_bundle_data" ] |
ehmaldonado | f98dc10 | 2016-08-03 10:46:47 -0700 | [diff] [blame] | 115 | } |
ehmaldonado | f98dc10 | 2016-08-03 10:46:47 -0700 | [diff] [blame] | 116 | } |
| 117 | |
ehmaldonado | 3a7f35b | 2016-09-14 05:10:01 -0700 | [diff] [blame] | 118 | modules_unittests_resources = [ |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 119 | "../resources/att-downlink.rx", |
| 120 | "../resources/att-uplink.rx", |
| 121 | "../resources/audio_coding/neteq_opus.rtp", |
Henrik Lundin | e9619f8 | 2017-11-27 14:05:27 +0100 | [diff] [blame] | 122 | "../resources/audio_coding/neteq_opus_dtx.rtp", |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 123 | "../resources/audio_coding/neteq_universal_new.rtp", |
| 124 | "../resources/audio_coding/speech_mono_16kHz.pcm", |
| 125 | "../resources/audio_coding/speech_mono_32_48kHz.pcm", |
| 126 | "../resources/audio_coding/testfile32kHz.pcm", |
| 127 | "../resources/audio_coding/teststereo32kHz.pcm", |
| 128 | "../resources/audio_device/audio_short16.pcm", |
| 129 | "../resources/audio_device/audio_short44.pcm", |
| 130 | "../resources/audio_device/audio_short48.pcm", |
| 131 | "../resources/audio_processing/agc/agc_audio.pcm", |
| 132 | "../resources/audio_processing/agc/agc_no_circular_buffer.dat", |
| 133 | "../resources/audio_processing/agc/agc_pitch_gain.dat", |
| 134 | "../resources/audio_processing/agc/agc_pitch_lag.dat", |
| 135 | "../resources/audio_processing/agc/agc_spectral_peak.dat", |
| 136 | "../resources/audio_processing/agc/agc_vad.dat", |
| 137 | "../resources/audio_processing/agc/agc_voicing_prob.dat", |
| 138 | "../resources/audio_processing/agc/agc_with_circular_buffer.dat", |
| 139 | "../resources/audio_processing/output_data_fixed.pb", |
| 140 | "../resources/audio_processing/output_data_float.pb", |
| 141 | "../resources/audio_processing/output_data_mac.pb", |
| 142 | "../resources/audio_processing/transient/ajm-macbook-1-spke16m.pcm", |
| 143 | "../resources/audio_processing/transient/audio16kHz.pcm", |
| 144 | "../resources/audio_processing/transient/audio32kHz.pcm", |
| 145 | "../resources/audio_processing/transient/audio48kHz.pcm", |
| 146 | "../resources/audio_processing/transient/audio8kHz.pcm", |
| 147 | "../resources/audio_processing/transient/detect16kHz.dat", |
| 148 | "../resources/audio_processing/transient/detect32kHz.dat", |
| 149 | "../resources/audio_processing/transient/detect48kHz.dat", |
| 150 | "../resources/audio_processing/transient/detect8kHz.dat", |
| 151 | "../resources/audio_processing/transient/double-utils.dat", |
| 152 | "../resources/audio_processing/transient/float-utils.dat", |
| 153 | "../resources/audio_processing/transient/suppressed16kHz.pcm", |
| 154 | "../resources/audio_processing/transient/suppressed32kHz.pcm", |
| 155 | "../resources/audio_processing/transient/suppressed8kHz.pcm", |
| 156 | "../resources/audio_processing/transient/wpd0.dat", |
| 157 | "../resources/audio_processing/transient/wpd1.dat", |
| 158 | "../resources/audio_processing/transient/wpd2.dat", |
| 159 | "../resources/audio_processing/transient/wpd3.dat", |
| 160 | "../resources/audio_processing/transient/wpd4.dat", |
| 161 | "../resources/audio_processing/transient/wpd5.dat", |
| 162 | "../resources/audio_processing/transient/wpd6.dat", |
| 163 | "../resources/audio_processing/transient/wpd7.dat", |
| 164 | "../resources/deflicker_before_cif_short.yuv", |
| 165 | "../resources/far16_stereo.pcm", |
| 166 | "../resources/far32_stereo.pcm", |
| 167 | "../resources/far44_stereo.pcm", |
| 168 | "../resources/far48_stereo.pcm", |
| 169 | "../resources/far8_stereo.pcm", |
| 170 | "../resources/foremanColorEnhanced_cif_short.yuv", |
| 171 | "../resources/foreman_cif.yuv", |
| 172 | "../resources/foreman_cif_short.yuv", |
| 173 | "../resources/near16_stereo.pcm", |
| 174 | "../resources/near32_stereo.pcm", |
| 175 | "../resources/near44_stereo.pcm", |
| 176 | "../resources/near48_stereo.pcm", |
| 177 | "../resources/near8_stereo.pcm", |
| 178 | "../resources/ref03.aecdump", |
| 179 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin", |
| 180 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin", |
| 181 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin", |
| 182 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin", |
| 183 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin", |
| 184 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin", |
| 185 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin", |
| 186 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin", |
| 187 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin", |
| 188 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin", |
| 189 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin", |
| 190 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin", |
| 191 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin", |
| 192 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin", |
| 193 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin", |
| 194 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin", |
| 195 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin", |
| 196 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin", |
| 197 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin", |
| 198 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin", |
| 199 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin", |
| 200 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin", |
| 201 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin", |
| 202 | "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin", |
| 203 | "../resources/short_mixed_mono_48.dat", |
| 204 | "../resources/short_mixed_mono_48_arm.dat", |
| 205 | "../resources/short_mixed_mono_48.pcm", |
| 206 | "../resources/short_mixed_stereo_48.dat", |
| 207 | "../resources/short_mixed_stereo_48.pcm", |
| 208 | "../resources/sprint-downlink.rx", |
| 209 | "../resources/sprint-uplink.rx", |
| 210 | "../resources/synthetic-trace.rx", |
| 211 | "../resources/tmobile-downlink.rx", |
| 212 | "../resources/tmobile-uplink.rx", |
| 213 | "../resources/verizon3g-downlink.rx", |
| 214 | "../resources/verizon3g-uplink.rx", |
| 215 | "../resources/verizon4g-downlink.rx", |
| 216 | "../resources/verizon4g-uplink.rx", |
| 217 | "../resources/voice_engine/audio_tiny48.wav", |
ehmaldonado | 3a7f35b | 2016-09-14 05:10:01 -0700 | [diff] [blame] | 218 | ] |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 219 | if (is_ios) { |
| 220 | bundle_data("modules_unittests_bundle_data") { |
| 221 | testonly = true |
| 222 | sources = modules_unittests_resources |
| 223 | outputs = [ |
| 224 | "{{bundle_resources_dir}}/{{source_file_part}}", |
| 225 | ] |
| 226 | } |
| 227 | } |
| 228 | |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 229 | rtc_test("modules_unittests") { |
minyue | 4aec1d4 | 2016-09-21 23:01:26 -0700 | [diff] [blame] | 230 | testonly = true |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 231 | defines = [] |
minyue | 4aec1d4 | 2016-09-21 23:01:26 -0700 | [diff] [blame] | 232 | sources = [ |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 233 | "module_common_types_unittest.cc", |
minyue | 4aec1d4 | 2016-09-21 23:01:26 -0700 | [diff] [blame] | 234 | ] |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 235 | |
mbonadei | 1140f97 | 2017-04-26 03:38:35 -0700 | [diff] [blame] | 236 | deps = [ |
| 237 | ":module_api", |
ehmaldonado | 26bddb9 | 2016-11-30 06:12:01 -0800 | [diff] [blame] | 238 | "../test:test_main", |
Artem Titov | 40a7a35 | 2018-10-15 15:25:34 +0200 | [diff] [blame^] | 239 | "../test:test_support", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 240 | "audio_coding:audio_coding_unittests", |
| 241 | "audio_device:audio_device_unittests", |
| 242 | "audio_mixer:audio_mixer_unittests", |
| 243 | "audio_processing:audio_processing_unittests", |
Gustaf Ullberg | f35c666 | 2018-02-23 13:18:29 +0100 | [diff] [blame] | 244 | "audio_processing/aec3:aec3_unittests", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 245 | "bitrate_controller:bitrate_controller_unittests", |
| 246 | "congestion_controller:congestion_controller_unittests", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 247 | "pacing:pacing_unittests", |
| 248 | "remote_bitrate_estimator:remote_bitrate_estimator_unittests", |
| 249 | "rtp_rtcp:rtp_rtcp_unittests", |
| 250 | "utility:utility_unittests", |
| 251 | "video_coding:video_coding_unittests", |
| 252 | "video_processing:video_processing_unittests", |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 253 | ] |
| 254 | |
Joachim Bauch | 75f18fc | 2017-12-20 21:25:47 +0100 | [diff] [blame] | 255 | if (rtc_desktop_capture_supported) { |
| 256 | deps += [ "desktop_capture:desktop_capture_unittests" ] |
| 257 | } |
| 258 | |
Dan Minor | 9c68613 | 2018-01-15 10:20:00 -0500 | [diff] [blame] | 259 | if (!build_with_mozilla) { |
| 260 | deps += [ "video_capture" ] |
| 261 | } |
| 262 | |
ehmaldonado | 3a7f35b | 2016-09-14 05:10:01 -0700 | [diff] [blame] | 263 | data = modules_unittests_resources |
| 264 | |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 265 | if (is_android) { |
sakal | bd59c71 | 2016-08-11 00:59:15 -0700 | [diff] [blame] | 266 | deps += [ |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 267 | "../sdk/android:libjingle_peerconnection_java", |
sakal | bd59c71 | 2016-08-11 00:59:15 -0700 | [diff] [blame] | 268 | "//testing/android/native_test:native_test_support", |
sakal | bd59c71 | 2016-08-11 00:59:15 -0700 | [diff] [blame] | 269 | ] |
kjellander | 28a0ffd | 2016-08-24 07:48:42 -0700 | [diff] [blame] | 270 | shard_timeout = 900 |
| 271 | } |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 272 | if (is_ios) { |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 273 | info_plist = "../test/ios/Info.plist" |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 274 | deps += [ ":modules_unittests_bundle_data" ] |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 275 | configs += [ "..:common_objc" ] |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 276 | ldflags = [ "-ObjC" ] |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 277 | } |
| 278 | } |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 279 | } |