blob: b5de323fc46b9833c9adb429cc5fe7f190274dae [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",
kjellanderfb114242016-06-13 00:19:48 -070020 "media_file",
kjellander6ceab082016-10-28 05:44:03 -070021 "pacing",
22 "remote_bitrate_estimator",
kjellanderfb114242016-06-13 00:19:48 -070023 "rtp_rtcp",
24 "utility",
25 "video_coding",
26 "video_processing",
27 ]
Joachim Bauch75f18fc2017-12-20 21:25:47 +010028
29 if (rtc_desktop_capture_supported) {
30 deps += [ "desktop_capture" ]
31 }
kjellanderfb114242016-06-13 00:19:48 -070032}
33
Ilya Nikolaevskiy558cabf2017-11-14 10:32:15 +010034rtc_source_set("module_api_public") {
35 sources = [
36 "include/module_common_types_public.h",
37 ]
38 deps = [
39 "..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +010040 "../:typedefs",
Ilya Nikolaevskiy558cabf2017-11-14 10:32:15 +010041 "../api:optional",
42 ]
43}
44
mbonadei1140f972017-04-26 03:38:35 -070045rtc_source_set("module_api") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000046 visibility = [ "*" ]
mbonadei1140f972017-04-26 03:38:35 -070047 sources = [
48 "include/module.h",
49 "include/module_common_types.h",
50 ]
51 deps = [
Ilya Nikolaevskiy558cabf2017-11-14 10:32:15 +010052 ":module_api_public",
mbonadei1140f972017-04-26 03:38:35 -070053 "..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +010054 "../:typedefs",
55 "../api:libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -070056 "../api:optional",
mbonadei1140f972017-04-26 03:38:35 -070057 "../api:video_frame_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +010058 "../api:video_frame_api_i420",
Patrik Höglund3e113432017-12-15 14:40:10 +010059 "../rtc_base:deprecation",
ehmaldonadof6a861a2017-07-19 10:40:47 -070060 "../rtc_base:rtc_base_approved",
charujaincb728ea2017-09-18 03:08:08 -070061 "video_coding:codec_globals_headers",
mbonadei1140f972017-04-26 03:38:35 -070062 ]
63}
64
kjellanderfb114242016-06-13 00:19:48 -070065if (rtc_include_tests) {
ehmaldonado3a7f35b2016-09-14 05:10:01 -070066 modules_tests_resources = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020067 "../resources/audio_coding/testfile32kHz.pcm",
68 "../resources/audio_coding/teststereo32kHz.pcm",
69 "../resources/foreman_cif.yuv",
70 "../resources/paris_qcif.yuv",
ehmaldonado3a7f35b2016-09-14 05:10:01 -070071 ]
kjellander32c4a202016-08-30 02:53:49 -070072
73 if (is_ios) {
74 bundle_data("modules_tests_bundle_data") {
75 testonly = true
76 sources = modules_tests_resources
77 outputs = [
78 "{{bundle_resources_dir}}/{{source_file_part}}",
79 ]
80 }
81 }
82
ehmaldonado38a21322016-09-02 04:10:34 -070083 rtc_test("modules_tests") {
ehmaldonadof98dc102016-08-03 10:46:47 -070084 testonly = true
85
ehmaldonadof98dc102016-08-03 10:46:47 -070086 deps = [
ehmaldonado26bddb92016-11-30 06:12:01 -080087 "../test:test_main",
ehmaldonado656610f2017-02-06 02:21:11 -080088 "../test:video_test_common",
ehmaldonado9cbb0a12017-01-30 03:07:03 -080089 "audio_coding:audio_coding_modules_tests",
ehmaldonado9cbb0a12017-01-30 03:07:03 -080090 "rtp_rtcp:rtp_rtcp_modules_tests",
91 "video_coding:video_coding_modules_tests",
zijiehe6be0a652016-10-27 16:50:35 -070092 "//testing/gmock",
ehmaldonadof98dc102016-08-03 10:46:47 -070093 "//testing/gtest",
94 ]
95
Joachim Bauch75f18fc2017-12-20 21:25:47 +010096 if (rtc_desktop_capture_supported) {
97 deps += [ "desktop_capture:desktop_capture_modules_tests" ]
98 }
99
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700100 data = modules_tests_resources
101
ehmaldonadof98dc102016-08-03 10:46:47 -0700102 if (is_android) {
brandtrdf232992017-09-07 07:50:06 -0700103 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 ]
sakal714dd4e2016-08-15 02:29:11 -0700110 shard_timeout = 900
ehmaldonadof98dc102016-08-03 10:46:47 -0700111 }
kjellander32c4a202016-08-30 02:53:49 -0700112
113 if (is_ios) {
114 deps += [ ":modules_tests_bundle_data" ]
ehmaldonadof98dc102016-08-03 10:46:47 -0700115 }
116
kjellandere40a7ee2016-10-16 23:56:12 -0700117 if (!build_with_chromium && is_clang) {
ehmaldonadof98dc102016-08-03 10:46:47 -0700118 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700119 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonadof98dc102016-08-03 10:46:47 -0700120 }
121 if (is_win) {
122 cflags = [
123 # TODO(phoglund): get rid of 4373 supression when
124 # http://code.google.com/p/webrtc/issues/detail?id=261 is solved.
125 # legacy warning for ignoring const / volatile in signatures.
126 "/wd4373",
127 ]
128 }
129 }
130
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700131 modules_unittests_resources = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200132 "../resources/att-downlink.rx",
133 "../resources/att-uplink.rx",
134 "../resources/audio_coding/neteq_opus.rtp",
Henrik Lundine9619f82017-11-27 14:05:27 +0100135 "../resources/audio_coding/neteq_opus_dtx.rtp",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200136 "../resources/audio_coding/neteq_universal_new.rtp",
137 "../resources/audio_coding/speech_mono_16kHz.pcm",
138 "../resources/audio_coding/speech_mono_32_48kHz.pcm",
139 "../resources/audio_coding/testfile32kHz.pcm",
140 "../resources/audio_coding/teststereo32kHz.pcm",
141 "../resources/audio_device/audio_short16.pcm",
142 "../resources/audio_device/audio_short44.pcm",
143 "../resources/audio_device/audio_short48.pcm",
144 "../resources/audio_processing/agc/agc_audio.pcm",
145 "../resources/audio_processing/agc/agc_no_circular_buffer.dat",
146 "../resources/audio_processing/agc/agc_pitch_gain.dat",
147 "../resources/audio_processing/agc/agc_pitch_lag.dat",
148 "../resources/audio_processing/agc/agc_spectral_peak.dat",
149 "../resources/audio_processing/agc/agc_vad.dat",
150 "../resources/audio_processing/agc/agc_voicing_prob.dat",
151 "../resources/audio_processing/agc/agc_with_circular_buffer.dat",
152 "../resources/audio_processing/output_data_fixed.pb",
153 "../resources/audio_processing/output_data_float.pb",
154 "../resources/audio_processing/output_data_mac.pb",
155 "../resources/audio_processing/transient/ajm-macbook-1-spke16m.pcm",
156 "../resources/audio_processing/transient/audio16kHz.pcm",
157 "../resources/audio_processing/transient/audio32kHz.pcm",
158 "../resources/audio_processing/transient/audio48kHz.pcm",
159 "../resources/audio_processing/transient/audio8kHz.pcm",
160 "../resources/audio_processing/transient/detect16kHz.dat",
161 "../resources/audio_processing/transient/detect32kHz.dat",
162 "../resources/audio_processing/transient/detect48kHz.dat",
163 "../resources/audio_processing/transient/detect8kHz.dat",
164 "../resources/audio_processing/transient/double-utils.dat",
165 "../resources/audio_processing/transient/float-utils.dat",
166 "../resources/audio_processing/transient/suppressed16kHz.pcm",
167 "../resources/audio_processing/transient/suppressed32kHz.pcm",
168 "../resources/audio_processing/transient/suppressed8kHz.pcm",
169 "../resources/audio_processing/transient/wpd0.dat",
170 "../resources/audio_processing/transient/wpd1.dat",
171 "../resources/audio_processing/transient/wpd2.dat",
172 "../resources/audio_processing/transient/wpd3.dat",
173 "../resources/audio_processing/transient/wpd4.dat",
174 "../resources/audio_processing/transient/wpd5.dat",
175 "../resources/audio_processing/transient/wpd6.dat",
176 "../resources/audio_processing/transient/wpd7.dat",
177 "../resources/deflicker_before_cif_short.yuv",
178 "../resources/far16_stereo.pcm",
179 "../resources/far32_stereo.pcm",
180 "../resources/far44_stereo.pcm",
181 "../resources/far48_stereo.pcm",
182 "../resources/far8_stereo.pcm",
183 "../resources/foremanColorEnhanced_cif_short.yuv",
184 "../resources/foreman_cif.yuv",
185 "../resources/foreman_cif_short.yuv",
186 "../resources/near16_stereo.pcm",
187 "../resources/near32_stereo.pcm",
188 "../resources/near44_stereo.pcm",
189 "../resources/near48_stereo.pcm",
190 "../resources/near8_stereo.pcm",
191 "../resources/ref03.aecdump",
192 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin",
193 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin",
194 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin",
195 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin",
196 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin",
197 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin",
198 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin",
199 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin",
200 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin",
201 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin",
202 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin",
203 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin",
204 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin",
205 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin",
206 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin",
207 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin",
208 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin",
209 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin",
210 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin",
211 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin",
212 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin",
213 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin",
214 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin",
215 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin",
216 "../resources/short_mixed_mono_48.dat",
217 "../resources/short_mixed_mono_48_arm.dat",
218 "../resources/short_mixed_mono_48.pcm",
219 "../resources/short_mixed_stereo_48.dat",
220 "../resources/short_mixed_stereo_48.pcm",
221 "../resources/sprint-downlink.rx",
222 "../resources/sprint-uplink.rx",
223 "../resources/synthetic-trace.rx",
224 "../resources/tmobile-downlink.rx",
225 "../resources/tmobile-uplink.rx",
226 "../resources/verizon3g-downlink.rx",
227 "../resources/verizon3g-uplink.rx",
228 "../resources/verizon4g-downlink.rx",
229 "../resources/verizon4g-uplink.rx",
230 "../resources/voice_engine/audio_tiny48.wav",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700231 ]
kjellander32c4a202016-08-30 02:53:49 -0700232 if (is_ios) {
233 bundle_data("modules_unittests_bundle_data") {
234 testonly = true
235 sources = modules_unittests_resources
236 outputs = [
237 "{{bundle_resources_dir}}/{{source_file_part}}",
238 ]
239 }
240 }
241
ehmaldonado36268652017-01-19 08:27:11 -0800242 rtc_test("modules_unittests") {
minyue4aec1d42016-09-21 23:01:26 -0700243 testonly = true
ehmaldonado36268652017-01-19 08:27:11 -0800244 defines = []
minyue4aec1d42016-09-21 23:01:26 -0700245 sources = [
ehmaldonado36268652017-01-19 08:27:11 -0800246 "module_common_types_unittest.cc",
minyue4aec1d42016-09-21 23:01:26 -0700247 ]
ehmaldonado36268652017-01-19 08:27:11 -0800248
kjellandere40a7ee2016-10-16 23:56:12 -0700249 if (!build_with_chromium && is_clang) {
minyue4aec1d42016-09-21 23:01:26 -0700250 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
251 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
252 }
kjellanderfb114242016-06-13 00:19:48 -0700253
mbonadei1140f972017-04-26 03:38:35 -0700254 deps = [
255 ":module_api",
ehmaldonado26bddb92016-11-30 06:12:01 -0800256 "../test:test_main",
ehmaldonado36268652017-01-19 08:27:11 -0800257 "audio_coding:audio_coding_unittests",
258 "audio_device:audio_device_unittests",
259 "audio_mixer:audio_mixer_unittests",
260 "audio_processing:audio_processing_unittests",
261 "bitrate_controller:bitrate_controller_unittests",
262 "congestion_controller:congestion_controller_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800263 "media_file:media_file_unittests",
264 "pacing:pacing_unittests",
265 "remote_bitrate_estimator:remote_bitrate_estimator_unittests",
266 "rtp_rtcp:rtp_rtcp_unittests",
267 "utility:utility_unittests",
ehmaldonado656610f2017-02-06 02:21:11 -0800268 "video_capture",
ehmaldonado36268652017-01-19 08:27:11 -0800269 "video_coding:video_coding_unittests",
270 "video_processing:video_processing_unittests",
kjellanderfb114242016-06-13 00:19:48 -0700271 ]
272
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100273 if (rtc_desktop_capture_supported) {
274 deps += [ "desktop_capture:desktop_capture_unittests" ]
275 }
276
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700277 data = modules_unittests_resources
278
kjellanderfb114242016-06-13 00:19:48 -0700279 if (is_android) {
sakalbd59c712016-08-11 00:59:15 -0700280 deps += [
jianjun.zhuc0247402017-07-11 06:20:45 -0700281 "../sdk/android:libjingle_peerconnection_java",
sakalbd59c712016-08-11 00:59:15 -0700282 "//testing/android/native_test:native_test_support",
sakalbd59c712016-08-11 00:59:15 -0700283 ]
kjellander28a0ffd2016-08-24 07:48:42 -0700284 shard_timeout = 900
285 }
kjellanderfb114242016-06-13 00:19:48 -0700286 if (is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700287 info_plist = "../test/ios/Info.plist"
kjellander32c4a202016-08-30 02:53:49 -0700288 deps += [ ":modules_unittests_bundle_data" ]
ehmaldonado36268652017-01-19 08:27:11 -0800289 configs += [ "..:common_objc" ]
kjellanderfb114242016-06-13 00:19:48 -0700290 ldflags = [ "-ObjC" ]
kjellanderfb114242016-06-13 00:19:48 -0700291 }
292 }
kjellanderfb114242016-06-13 00:19:48 -0700293}