blob: abbb284bccee6ad13cf3fe558d624974bf9bbda3 [file] [log] [blame]
kjellanderfb114242016-06-13 00:19:48 -07001# 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
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../webrtc.gni")
kjellanderfb114242016-06-13 00:19:48 -070010import("audio_coding/audio_coding.gni")
kjellanderfb114242016-06-13 00:19:48 -070011
kjellanderfb114242016-06-13 00:19:48 -070012group("modules") {
Mirko Bonadei28fe5102017-12-15 10:00:58 +010013 deps = [
kjellanderfb114242016-06-13 00:19:48 -070014 "audio_coding",
kjellanderfb114242016-06-13 00:19:48 -070015 "audio_device",
kjellander6ceab082016-10-28 05:44:03 -070016 "audio_mixer",
kjellanderfb114242016-06-13 00:19:48 -070017 "audio_processing",
kjellander6ceab082016-10-28 05:44:03 -070018 "congestion_controller",
kjellander6ceab082016-10-28 05:44:03 -070019 "pacing",
20 "remote_bitrate_estimator",
kjellanderfb114242016-06-13 00:19:48 -070021 "rtp_rtcp",
22 "utility",
23 "video_coding",
24 "video_processing",
25 ]
Joachim Bauch75f18fc2017-12-20 21:25:47 +010026
27 if (rtc_desktop_capture_supported) {
28 deps += [ "desktop_capture" ]
29 }
kjellanderfb114242016-06-13 00:19:48 -070030}
31
Ilya Nikolaevskiy558cabf2017-11-14 10:32:15 +010032rtc_source_set("module_api_public") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010033 sources = [ "include/module_common_types_public.h" ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +020034 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
Ilya Nikolaevskiy558cabf2017-11-14 10:32:15 +010035}
36
Danil Chapovalovc60774b2020-09-01 13:29:52 +020037rtc_source_set("module_api") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000038 visibility = [ "*" ]
Danil Chapovalov0fd2ed52022-07-01 13:38:59 +020039 sources = [ "include/module_common_types.h" ]
mbonadei1140f972017-04-26 03:38:35 -070040}
41
Ying Wang0dd1b0a2018-02-20 12:50:27 +010042rtc_source_set("module_fec_api") {
43 visibility = [ "*" ]
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010044 sources = [ "include/module_fec_types.h" ]
Ying Wang0dd1b0a2018-02-20 12:50:27 +010045}
46
Andrey Logvine7c79fd2021-02-01 09:56:37 +000047if (rtc_include_tests && !build_with_chromium) {
ehmaldonado3a7f35b2016-09-14 05:10:01 -070048 modules_tests_resources = [
Alessio Bazzicaa7382f72020-02-27 13:46:51 +010049 "../resources/audio_coding/testfile16kHz.pcm",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020050 "../resources/audio_coding/testfile32kHz.pcm",
51 "../resources/audio_coding/teststereo32kHz.pcm",
52 "../resources/foreman_cif.yuv",
ehmaldonado3a7f35b2016-09-14 05:10:01 -070053 ]
kjellander32c4a202016-08-30 02:53:49 -070054
55 if (is_ios) {
56 bundle_data("modules_tests_bundle_data") {
57 testonly = true
58 sources = modules_tests_resources
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010059 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
kjellander32c4a202016-08-30 02:53:49 -070060 }
61 }
62
ehmaldonado38a21322016-09-02 04:10:34 -070063 rtc_test("modules_tests") {
ehmaldonadof98dc102016-08-03 10:46:47 -070064 testonly = true
65
ehmaldonadof98dc102016-08-03 10:46:47 -070066 deps = [
ehmaldonado26bddb92016-11-30 06:12:01 -080067 "../test:test_main",
ehmaldonado656610f2017-02-06 02:21:11 -080068 "../test:video_test_common",
ehmaldonado9cbb0a12017-01-30 03:07:03 -080069 "audio_coding:audio_coding_modules_tests",
ehmaldonado9cbb0a12017-01-30 03:07:03 -080070 "rtp_rtcp:rtp_rtcp_modules_tests",
71 "video_coding:video_coding_modules_tests",
ehmaldonadof98dc102016-08-03 10:46:47 -070072 "//testing/gtest",
73 ]
74
Joachim Bauch75f18fc2017-12-20 21:25:47 +010075 if (rtc_desktop_capture_supported) {
76 deps += [ "desktop_capture:desktop_capture_modules_tests" ]
77 }
78
ehmaldonado3a7f35b2016-09-14 05:10:01 -070079 data = modules_tests_resources
80
ehmaldonadof98dc102016-08-03 10:46:47 -070081 if (is_android) {
Björn Terelius0c68a7a2022-04-19 15:32:37 +020082 use_default_launcher = false
brandtrdf232992017-09-07 07:50:06 -070083 deps += [
84 # NOTE(brandtr): Including Java classes seems only to be possible from
85 # rtc_test targets. Therefore we include this target here, instead of
86 # in video_coding_modules_tests, where it is actually used.
87 "../sdk/android:libjingle_peerconnection_java",
Björn Terelius0c68a7a2022-04-19 15:32:37 +020088 "//sdk/android:native_test_jni_onload",
89 "//testing/android/native_test:native_test_support",
brandtrdf232992017-09-07 07:50:06 -070090 ]
sakal714dd4e2016-08-15 02:29:11 -070091 shard_timeout = 900
ehmaldonadof98dc102016-08-03 10:46:47 -070092 }
kjellander32c4a202016-08-30 02:53:49 -070093
94 if (is_ios) {
95 deps += [ ":modules_tests_bundle_data" ]
ehmaldonadof98dc102016-08-03 10:46:47 -070096 }
ehmaldonadof98dc102016-08-03 10:46:47 -070097 }
98
ehmaldonado3a7f35b2016-09-14 05:10:01 -070099 modules_unittests_resources = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200100 "../resources/audio_coding/neteq_opus.rtp",
Henrik Lundine9619f82017-11-27 14:05:27 +0100101 "../resources/audio_coding/neteq_opus_dtx.rtp",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200102 "../resources/audio_coding/neteq_universal_new.rtp",
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100103 "../resources/audio_coding/speech_4_channels_48k_one_second.wav",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200104 "../resources/audio_coding/speech_mono_16kHz.pcm",
105 "../resources/audio_coding/speech_mono_32_48kHz.pcm",
Alessio Bazzicaa7382f72020-02-27 13:46:51 +0100106 "../resources/audio_coding/testfile16kHz.pcm",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200107 "../resources/audio_coding/testfile32kHz.pcm",
Alex Loiko65438812019-02-22 10:13:44 +0100108 "../resources/audio_coding/testfile_fake_stereo_32kHz.pcm",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200109 "../resources/audio_coding/teststereo32kHz.pcm",
110 "../resources/audio_device/audio_short16.pcm",
111 "../resources/audio_device/audio_short44.pcm",
112 "../resources/audio_device/audio_short48.pcm",
113 "../resources/audio_processing/agc/agc_audio.pcm",
114 "../resources/audio_processing/agc/agc_no_circular_buffer.dat",
115 "../resources/audio_processing/agc/agc_pitch_gain.dat",
116 "../resources/audio_processing/agc/agc_pitch_lag.dat",
117 "../resources/audio_processing/agc/agc_spectral_peak.dat",
118 "../resources/audio_processing/agc/agc_vad.dat",
119 "../resources/audio_processing/agc/agc_voicing_prob.dat",
120 "../resources/audio_processing/agc/agc_with_circular_buffer.dat",
121 "../resources/audio_processing/output_data_fixed.pb",
122 "../resources/audio_processing/output_data_float.pb",
Per Åhgrena43178c2020-09-25 12:02:32 +0200123 "../resources/audio_processing/output_data_float_avx2.pb",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200124 "../resources/audio_processing/output_data_mac.pb",
125 "../resources/audio_processing/transient/ajm-macbook-1-spke16m.pcm",
126 "../resources/audio_processing/transient/audio16kHz.pcm",
127 "../resources/audio_processing/transient/audio32kHz.pcm",
128 "../resources/audio_processing/transient/audio48kHz.pcm",
129 "../resources/audio_processing/transient/audio8kHz.pcm",
130 "../resources/audio_processing/transient/detect16kHz.dat",
131 "../resources/audio_processing/transient/detect32kHz.dat",
132 "../resources/audio_processing/transient/detect48kHz.dat",
133 "../resources/audio_processing/transient/detect8kHz.dat",
134 "../resources/audio_processing/transient/double-utils.dat",
135 "../resources/audio_processing/transient/float-utils.dat",
136 "../resources/audio_processing/transient/suppressed16kHz.pcm",
137 "../resources/audio_processing/transient/suppressed32kHz.pcm",
138 "../resources/audio_processing/transient/suppressed8kHz.pcm",
139 "../resources/audio_processing/transient/wpd0.dat",
140 "../resources/audio_processing/transient/wpd1.dat",
141 "../resources/audio_processing/transient/wpd2.dat",
142 "../resources/audio_processing/transient/wpd3.dat",
143 "../resources/audio_processing/transient/wpd4.dat",
144 "../resources/audio_processing/transient/wpd5.dat",
145 "../resources/audio_processing/transient/wpd6.dat",
146 "../resources/audio_processing/transient/wpd7.dat",
147 "../resources/deflicker_before_cif_short.yuv",
148 "../resources/far16_stereo.pcm",
Sam Zackrisson3bd444f2022-08-03 14:37:00 +0200149 "../resources/far176_stereo.pcm",
150 "../resources/far192_stereo.pcm",
151 "../resources/far22_stereo.pcm",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200152 "../resources/far32_stereo.pcm",
153 "../resources/far44_stereo.pcm",
154 "../resources/far48_stereo.pcm",
Sam Zackrisson3bd444f2022-08-03 14:37:00 +0200155 "../resources/far88_stereo.pcm",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200156 "../resources/far8_stereo.pcm",
Sam Zackrisson3bd444f2022-08-03 14:37:00 +0200157 "../resources/far96_stereo.pcm",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200158 "../resources/foremanColorEnhanced_cif_short.yuv",
159 "../resources/foreman_cif.yuv",
160 "../resources/foreman_cif_short.yuv",
161 "../resources/near16_stereo.pcm",
Sam Zackrisson3bd444f2022-08-03 14:37:00 +0200162 "../resources/near176_stereo.pcm",
163 "../resources/near192_stereo.pcm",
164 "../resources/near22_stereo.pcm",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200165 "../resources/near32_stereo.pcm",
166 "../resources/near44_stereo.pcm",
167 "../resources/near48_stereo.pcm",
Sam Zackrisson3bd444f2022-08-03 14:37:00 +0200168 "../resources/near88_stereo.pcm",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200169 "../resources/near8_stereo.pcm",
Sam Zackrisson3bd444f2022-08-03 14:37:00 +0200170 "../resources/near96_stereo.pcm",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200171 "../resources/ref03.aecdump",
172 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin",
173 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin",
174 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin",
175 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin",
176 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin",
177 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin",
178 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin",
179 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin",
180 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin",
181 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin",
182 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin",
183 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin",
184 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin",
185 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin",
186 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin",
187 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin",
188 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin",
189 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin",
190 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin",
191 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin",
192 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin",
193 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin",
194 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin",
195 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin",
196 "../resources/short_mixed_mono_48.dat",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200197 "../resources/short_mixed_mono_48.pcm",
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100198 "../resources/short_mixed_mono_48_arm.dat",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200199 "../resources/short_mixed_stereo_48.dat",
200 "../resources/short_mixed_stereo_48.pcm",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200201 "../resources/voice_engine/audio_tiny48.wav",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700202 ]
kjellander32c4a202016-08-30 02:53:49 -0700203 if (is_ios) {
204 bundle_data("modules_unittests_bundle_data") {
205 testonly = true
206 sources = modules_unittests_resources
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100207 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
kjellander32c4a202016-08-30 02:53:49 -0700208 }
209 }
210
ehmaldonado36268652017-01-19 08:27:11 -0800211 rtc_test("modules_unittests") {
minyue4aec1d42016-09-21 23:01:26 -0700212 testonly = true
ehmaldonado36268652017-01-19 08:27:11 -0800213 defines = []
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100214 sources = [ "module_common_types_unittest.cc" ]
ehmaldonado36268652017-01-19 08:27:11 -0800215
mbonadei1140f972017-04-26 03:38:35 -0700216 deps = [
217 ":module_api",
Yves Gerey3e707812018-11-28 16:47:49 +0100218 ":module_api_public",
ehmaldonado26bddb92016-11-30 06:12:01 -0800219 "../test:test_main",
Artem Titov40a7a352018-10-15 15:25:34 +0200220 "../test:test_support",
ehmaldonado36268652017-01-19 08:27:11 -0800221 "audio_coding:audio_coding_unittests",
222 "audio_device:audio_device_unittests",
223 "audio_mixer:audio_mixer_unittests",
224 "audio_processing:audio_processing_unittests",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100225 "audio_processing/aec3:aec3_unittests",
Per Åhgren0cbb58e2019-10-29 22:59:44 +0100226 "audio_processing/ns:ns_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800227 "congestion_controller:congestion_controller_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800228 "pacing:pacing_unittests",
229 "remote_bitrate_estimator:remote_bitrate_estimator_unittests",
230 "rtp_rtcp:rtp_rtcp_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800231 "video_coding:video_coding_unittests",
Rasmus Brandt23772262022-05-23 09:53:15 +0200232 "video_coding/timing:timing_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800233 "video_processing:video_processing_unittests",
kjellanderfb114242016-06-13 00:19:48 -0700234 ]
235
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100236 if (rtc_desktop_capture_supported) {
237 deps += [ "desktop_capture:desktop_capture_unittests" ]
238 }
239
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700240 data = modules_unittests_resources
241
kjellanderfb114242016-06-13 00:19:48 -0700242 if (is_android) {
Björn Terelius0c68a7a2022-04-19 15:32:37 +0200243 use_default_launcher = false
sakalbd59c712016-08-11 00:59:15 -0700244 deps += [
jianjun.zhuc0247402017-07-11 06:20:45 -0700245 "../sdk/android:libjingle_peerconnection_java",
sakalbd59c712016-08-11 00:59:15 -0700246 "//testing/android/native_test:native_test_support",
sakalbd59c712016-08-11 00:59:15 -0700247 ]
kjellander28a0ffd2016-08-24 07:48:42 -0700248 shard_timeout = 900
249 }
kjellanderfb114242016-06-13 00:19:48 -0700250 if (is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700251 info_plist = "../test/ios/Info.plist"
kjellander32c4a202016-08-30 02:53:49 -0700252 deps += [ ":modules_unittests_bundle_data" ]
ehmaldonado36268652017-01-19 08:27:11 -0800253 configs += [ "..:common_objc" ]
kjellanderfb114242016-06-13 00:19:48 -0700254 ldflags = [ "-ObjC" ]
kjellanderfb114242016-06-13 00:19:48 -0700255 }
256 }
kjellanderfb114242016-06-13 00:19:48 -0700257}