blob: 501ba2a449e7616ce2a0615f0c44bd9961973c82 [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",
18 "bitrate_controller",
kjellander6ceab082016-10-28 05:44:03 -070019 "congestion_controller",
kjellander6ceab082016-10-28 05:44:03 -070020 "pacing",
21 "remote_bitrate_estimator",
kjellanderfb114242016-06-13 00:19:48 -070022 "rtp_rtcp",
23 "utility",
24 "video_coding",
25 "video_processing",
26 ]
Joachim Bauch75f18fc2017-12-20 21:25:47 +010027
28 if (rtc_desktop_capture_supported) {
29 deps += [ "desktop_capture" ]
30 }
kjellanderfb114242016-06-13 00:19:48 -070031}
32
Ilya Nikolaevskiy558cabf2017-11-14 10:32:15 +010033rtc_source_set("module_api_public") {
34 sources = [
35 "include/module_common_types_public.h",
36 ]
37 deps = [
38 "..:webrtc_common",
Danil Chapovalov196100e2018-06-21 10:17:24 +020039 "//third_party/abseil-cpp/absl/types:optional",
Ilya Nikolaevskiy558cabf2017-11-14 10:32:15 +010040 ]
41}
42
mbonadei1140f972017-04-26 03:38:35 -070043rtc_source_set("module_api") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000044 visibility = [ "*" ]
mbonadei1140f972017-04-26 03:38:35 -070045 sources = [
46 "include/module.h",
Danil Chapovalovdb128562018-09-17 13:11:50 +020047 "include/module_common_types.cc",
mbonadei1140f972017-04-26 03:38:35 -070048 "include/module_common_types.h",
49 ]
50 deps = [
Ilya Nikolaevskiy558cabf2017-11-14 10:32:15 +010051 ":module_api_public",
Ying Wang0dd1b0a2018-02-20 12:50:27 +010052 ":module_fec_api",
mbonadei1140f972017-04-26 03:38:35 -070053 "..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +010054 "../api:libjingle_peerconnection_api",
philipel1a4746a2018-07-09 15:52:29 +020055 "../modules/rtp_rtcp:rtp_video_header",
Danil Chapovalovdb128562018-09-17 13:11:50 +020056 "../rtc_base:safe_conversions",
Mirko Bonadei276827c2018-10-16 14:13:50 +020057 "../rtc_base/system:rtc_export",
mbonadei1140f972017-04-26 03:38:35 -070058 ]
59}
60
Ying Wang0dd1b0a2018-02-20 12:50:27 +010061rtc_source_set("module_fec_api") {
62 visibility = [ "*" ]
63 sources = [
64 "include/module_fec_types.h",
65 ]
66}
67
kjellanderfb114242016-06-13 00:19:48 -070068if (rtc_include_tests) {
ehmaldonado3a7f35b2016-09-14 05:10:01 -070069 modules_tests_resources = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020070 "../resources/audio_coding/testfile32kHz.pcm",
71 "../resources/audio_coding/teststereo32kHz.pcm",
72 "../resources/foreman_cif.yuv",
ehmaldonado3a7f35b2016-09-14 05:10:01 -070073 ]
kjellander32c4a202016-08-30 02:53:49 -070074
75 if (is_ios) {
76 bundle_data("modules_tests_bundle_data") {
77 testonly = true
78 sources = modules_tests_resources
79 outputs = [
80 "{{bundle_resources_dir}}/{{source_file_part}}",
81 ]
82 }
83 }
84
ehmaldonado38a21322016-09-02 04:10:34 -070085 rtc_test("modules_tests") {
ehmaldonadof98dc102016-08-03 10:46:47 -070086 testonly = true
87
ehmaldonadof98dc102016-08-03 10:46:47 -070088 deps = [
ehmaldonado26bddb92016-11-30 06:12:01 -080089 "../test:test_main",
ehmaldonado656610f2017-02-06 02:21:11 -080090 "../test:video_test_common",
ehmaldonado9cbb0a12017-01-30 03:07:03 -080091 "audio_coding:audio_coding_modules_tests",
ehmaldonado9cbb0a12017-01-30 03:07:03 -080092 "rtp_rtcp:rtp_rtcp_modules_tests",
93 "video_coding:video_coding_modules_tests",
ehmaldonadof98dc102016-08-03 10:46:47 -070094 "//testing/gtest",
95 ]
96
Joachim Bauch75f18fc2017-12-20 21:25:47 +010097 if (rtc_desktop_capture_supported) {
98 deps += [ "desktop_capture:desktop_capture_modules_tests" ]
99 }
100
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700101 data = modules_tests_resources
102
ehmaldonadof98dc102016-08-03 10:46:47 -0700103 if (is_android) {
brandtrdf232992017-09-07 07:50:06 -0700104 deps += [
105 # NOTE(brandtr): Including Java classes seems only to be possible from
106 # rtc_test targets. Therefore we include this target here, instead of
107 # in video_coding_modules_tests, where it is actually used.
108 "../sdk/android:libjingle_peerconnection_java",
109 "//testing/android/native_test:native_test_native_code",
110 ]
sakal714dd4e2016-08-15 02:29:11 -0700111 shard_timeout = 900
ehmaldonadof98dc102016-08-03 10:46:47 -0700112 }
kjellander32c4a202016-08-30 02:53:49 -0700113
114 if (is_ios) {
115 deps += [ ":modules_tests_bundle_data" ]
ehmaldonadof98dc102016-08-03 10:46:47 -0700116 }
ehmaldonadof98dc102016-08-03 10:46:47 -0700117 }
118
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700119 modules_unittests_resources = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200120 "../resources/att-downlink.rx",
121 "../resources/att-uplink.rx",
122 "../resources/audio_coding/neteq_opus.rtp",
Henrik Lundine9619f82017-11-27 14:05:27 +0100123 "../resources/audio_coding/neteq_opus_dtx.rtp",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200124 "../resources/audio_coding/neteq_universal_new.rtp",
125 "../resources/audio_coding/speech_mono_16kHz.pcm",
126 "../resources/audio_coding/speech_mono_32_48kHz.pcm",
Alex Loiko7a3e43a2019-01-29 12:27:08 +0100127 "../resources/audio_coding/speech_4_channels_48k_one_second.wav",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200128 "../resources/audio_coding/testfile32kHz.pcm",
Alex Loiko65438812019-02-22 10:13:44 +0100129 "../resources/audio_coding/testfile_fake_stereo_32kHz.pcm",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200130 "../resources/audio_coding/teststereo32kHz.pcm",
131 "../resources/audio_device/audio_short16.pcm",
132 "../resources/audio_device/audio_short44.pcm",
133 "../resources/audio_device/audio_short48.pcm",
134 "../resources/audio_processing/agc/agc_audio.pcm",
135 "../resources/audio_processing/agc/agc_no_circular_buffer.dat",
136 "../resources/audio_processing/agc/agc_pitch_gain.dat",
137 "../resources/audio_processing/agc/agc_pitch_lag.dat",
138 "../resources/audio_processing/agc/agc_spectral_peak.dat",
139 "../resources/audio_processing/agc/agc_vad.dat",
140 "../resources/audio_processing/agc/agc_voicing_prob.dat",
141 "../resources/audio_processing/agc/agc_with_circular_buffer.dat",
142 "../resources/audio_processing/output_data_fixed.pb",
143 "../resources/audio_processing/output_data_float.pb",
144 "../resources/audio_processing/output_data_mac.pb",
145 "../resources/audio_processing/transient/ajm-macbook-1-spke16m.pcm",
146 "../resources/audio_processing/transient/audio16kHz.pcm",
147 "../resources/audio_processing/transient/audio32kHz.pcm",
148 "../resources/audio_processing/transient/audio48kHz.pcm",
149 "../resources/audio_processing/transient/audio8kHz.pcm",
150 "../resources/audio_processing/transient/detect16kHz.dat",
151 "../resources/audio_processing/transient/detect32kHz.dat",
152 "../resources/audio_processing/transient/detect48kHz.dat",
153 "../resources/audio_processing/transient/detect8kHz.dat",
154 "../resources/audio_processing/transient/double-utils.dat",
155 "../resources/audio_processing/transient/float-utils.dat",
156 "../resources/audio_processing/transient/suppressed16kHz.pcm",
157 "../resources/audio_processing/transient/suppressed32kHz.pcm",
158 "../resources/audio_processing/transient/suppressed8kHz.pcm",
159 "../resources/audio_processing/transient/wpd0.dat",
160 "../resources/audio_processing/transient/wpd1.dat",
161 "../resources/audio_processing/transient/wpd2.dat",
162 "../resources/audio_processing/transient/wpd3.dat",
163 "../resources/audio_processing/transient/wpd4.dat",
164 "../resources/audio_processing/transient/wpd5.dat",
165 "../resources/audio_processing/transient/wpd6.dat",
166 "../resources/audio_processing/transient/wpd7.dat",
167 "../resources/deflicker_before_cif_short.yuv",
168 "../resources/far16_stereo.pcm",
169 "../resources/far32_stereo.pcm",
170 "../resources/far44_stereo.pcm",
171 "../resources/far48_stereo.pcm",
172 "../resources/far8_stereo.pcm",
173 "../resources/foremanColorEnhanced_cif_short.yuv",
174 "../resources/foreman_cif.yuv",
175 "../resources/foreman_cif_short.yuv",
176 "../resources/near16_stereo.pcm",
177 "../resources/near32_stereo.pcm",
178 "../resources/near44_stereo.pcm",
179 "../resources/near48_stereo.pcm",
180 "../resources/near8_stereo.pcm",
181 "../resources/ref03.aecdump",
182 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin",
183 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin",
184 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin",
185 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin",
186 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin",
187 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin",
188 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin",
189 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin",
190 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin",
191 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin",
192 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin",
193 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin",
194 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin",
195 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin",
196 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin",
197 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin",
198 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin",
199 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin",
200 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin",
201 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin",
202 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin",
203 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin",
204 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin",
205 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin",
206 "../resources/short_mixed_mono_48.dat",
207 "../resources/short_mixed_mono_48_arm.dat",
208 "../resources/short_mixed_mono_48.pcm",
209 "../resources/short_mixed_stereo_48.dat",
210 "../resources/short_mixed_stereo_48.pcm",
211 "../resources/sprint-downlink.rx",
212 "../resources/sprint-uplink.rx",
213 "../resources/synthetic-trace.rx",
214 "../resources/tmobile-downlink.rx",
215 "../resources/tmobile-uplink.rx",
216 "../resources/verizon3g-downlink.rx",
217 "../resources/verizon3g-uplink.rx",
218 "../resources/verizon4g-downlink.rx",
219 "../resources/verizon4g-uplink.rx",
220 "../resources/voice_engine/audio_tiny48.wav",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700221 ]
kjellander32c4a202016-08-30 02:53:49 -0700222 if (is_ios) {
223 bundle_data("modules_unittests_bundle_data") {
224 testonly = true
225 sources = modules_unittests_resources
226 outputs = [
227 "{{bundle_resources_dir}}/{{source_file_part}}",
228 ]
229 }
230 }
231
ehmaldonado36268652017-01-19 08:27:11 -0800232 rtc_test("modules_unittests") {
minyue4aec1d42016-09-21 23:01:26 -0700233 testonly = true
ehmaldonado36268652017-01-19 08:27:11 -0800234 defines = []
minyue4aec1d42016-09-21 23:01:26 -0700235 sources = [
ehmaldonado36268652017-01-19 08:27:11 -0800236 "module_common_types_unittest.cc",
minyue4aec1d42016-09-21 23:01:26 -0700237 ]
ehmaldonado36268652017-01-19 08:27:11 -0800238
mbonadei1140f972017-04-26 03:38:35 -0700239 deps = [
240 ":module_api",
Yves Gerey3e707812018-11-28 16:47:49 +0100241 ":module_api_public",
ehmaldonado26bddb92016-11-30 06:12:01 -0800242 "../test:test_main",
Artem Titov40a7a352018-10-15 15:25:34 +0200243 "../test:test_support",
ehmaldonado36268652017-01-19 08:27:11 -0800244 "audio_coding:audio_coding_unittests",
245 "audio_device:audio_device_unittests",
246 "audio_mixer:audio_mixer_unittests",
247 "audio_processing:audio_processing_unittests",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100248 "audio_processing/aec3:aec3_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800249 "bitrate_controller:bitrate_controller_unittests",
250 "congestion_controller:congestion_controller_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800251 "pacing:pacing_unittests",
252 "remote_bitrate_estimator:remote_bitrate_estimator_unittests",
253 "rtp_rtcp:rtp_rtcp_unittests",
254 "utility:utility_unittests",
255 "video_coding:video_coding_unittests",
256 "video_processing:video_processing_unittests",
kjellanderfb114242016-06-13 00:19:48 -0700257 ]
258
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100259 if (rtc_desktop_capture_supported) {
260 deps += [ "desktop_capture:desktop_capture_unittests" ]
261 }
262
Dan Minor9c686132018-01-15 10:20:00 -0500263 if (!build_with_mozilla) {
264 deps += [ "video_capture" ]
265 }
266
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700267 data = modules_unittests_resources
268
kjellanderfb114242016-06-13 00:19:48 -0700269 if (is_android) {
sakalbd59c712016-08-11 00:59:15 -0700270 deps += [
jianjun.zhuc0247402017-07-11 06:20:45 -0700271 "../sdk/android:libjingle_peerconnection_java",
sakalbd59c712016-08-11 00:59:15 -0700272 "//testing/android/native_test:native_test_support",
sakalbd59c712016-08-11 00:59:15 -0700273 ]
kjellander28a0ffd2016-08-24 07:48:42 -0700274 shard_timeout = 900
275 }
kjellanderfb114242016-06-13 00:19:48 -0700276 if (is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700277 info_plist = "../test/ios/Info.plist"
kjellander32c4a202016-08-30 02:53:49 -0700278 deps += [ ":modules_unittests_bundle_data" ]
ehmaldonado36268652017-01-19 08:27:11 -0800279 configs += [ "..:common_objc" ]
kjellanderfb114242016-06-13 00:19:48 -0700280 ldflags = [ "-ObjC" ]
kjellanderfb114242016-06-13 00:19:48 -0700281 }
282 }
kjellanderfb114242016-06-13 00:19:48 -0700283}