blob: 4a77b21561756dd99b1be481cc241d237d156d6c [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",
Patrik Höglund3e113432017-12-15 14:40:10 +010039 "../:typedefs",
Ilya Nikolaevskiy558cabf2017-11-14 10:32:15 +010040 "../api:optional",
41 ]
42}
43
mbonadei1140f972017-04-26 03:38:35 -070044rtc_source_set("module_api") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000045 visibility = [ "*" ]
mbonadei1140f972017-04-26 03:38:35 -070046 sources = [
47 "include/module.h",
48 "include/module_common_types.h",
49 ]
50 deps = [
Ilya Nikolaevskiy558cabf2017-11-14 10:32:15 +010051 ":module_api_public",
mbonadei1140f972017-04-26 03:38:35 -070052 "..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +010053 "../:typedefs",
54 "../api:libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -070055 "../api:optional",
mbonadei1140f972017-04-26 03:38:35 -070056 "../api:video_frame_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +010057 "../api:video_frame_api_i420",
Patrik Höglund3e113432017-12-15 14:40:10 +010058 "../rtc_base:deprecation",
ehmaldonadof6a861a2017-07-19 10:40:47 -070059 "../rtc_base:rtc_base_approved",
charujaincb728ea2017-09-18 03:08:08 -070060 "video_coding:codec_globals_headers",
mbonadei1140f972017-04-26 03:38:35 -070061 ]
62}
63
kjellanderfb114242016-06-13 00:19:48 -070064if (rtc_include_tests) {
ehmaldonado3a7f35b2016-09-14 05:10:01 -070065 modules_tests_resources = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020066 "../resources/audio_coding/testfile32kHz.pcm",
67 "../resources/audio_coding/teststereo32kHz.pcm",
68 "../resources/foreman_cif.yuv",
69 "../resources/paris_qcif.yuv",
Sergey Silkin10d9d592018-02-01 13:25:17 +010070 "../resources/ConferenceMotion_1280_720_50.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",
ehmaldonadof98dc102016-08-03 10:46:47 -070092 "//testing/gtest",
93 ]
94
Joachim Bauch75f18fc2017-12-20 21:25:47 +010095 if (rtc_desktop_capture_supported) {
96 deps += [ "desktop_capture:desktop_capture_modules_tests" ]
97 }
98
ehmaldonado3a7f35b2016-09-14 05:10:01 -070099 data = modules_tests_resources
100
ehmaldonadof98dc102016-08-03 10:46:47 -0700101 if (is_android) {
brandtrdf232992017-09-07 07:50:06 -0700102 deps += [
103 # NOTE(brandtr): Including Java classes seems only to be possible from
104 # rtc_test targets. Therefore we include this target here, instead of
105 # in video_coding_modules_tests, where it is actually used.
106 "../sdk/android:libjingle_peerconnection_java",
107 "//testing/android/native_test:native_test_native_code",
108 ]
sakal714dd4e2016-08-15 02:29:11 -0700109 shard_timeout = 900
ehmaldonadof98dc102016-08-03 10:46:47 -0700110 }
kjellander32c4a202016-08-30 02:53:49 -0700111
112 if (is_ios) {
113 deps += [ ":modules_tests_bundle_data" ]
ehmaldonadof98dc102016-08-03 10:46:47 -0700114 }
115
kjellandere40a7ee2016-10-16 23:56:12 -0700116 if (!build_with_chromium && is_clang) {
ehmaldonadof98dc102016-08-03 10:46:47 -0700117 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700118 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonadof98dc102016-08-03 10:46:47 -0700119 }
ehmaldonadof98dc102016-08-03 10:46:47 -0700120 }
121
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700122 modules_unittests_resources = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200123 "../resources/att-downlink.rx",
124 "../resources/att-uplink.rx",
125 "../resources/audio_coding/neteq_opus.rtp",
Henrik Lundine9619f82017-11-27 14:05:27 +0100126 "../resources/audio_coding/neteq_opus_dtx.rtp",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200127 "../resources/audio_coding/neteq_universal_new.rtp",
128 "../resources/audio_coding/speech_mono_16kHz.pcm",
129 "../resources/audio_coding/speech_mono_32_48kHz.pcm",
130 "../resources/audio_coding/testfile32kHz.pcm",
131 "../resources/audio_coding/teststereo32kHz.pcm",
132 "../resources/audio_device/audio_short16.pcm",
133 "../resources/audio_device/audio_short44.pcm",
134 "../resources/audio_device/audio_short48.pcm",
135 "../resources/audio_processing/agc/agc_audio.pcm",
136 "../resources/audio_processing/agc/agc_no_circular_buffer.dat",
137 "../resources/audio_processing/agc/agc_pitch_gain.dat",
138 "../resources/audio_processing/agc/agc_pitch_lag.dat",
139 "../resources/audio_processing/agc/agc_spectral_peak.dat",
140 "../resources/audio_processing/agc/agc_vad.dat",
141 "../resources/audio_processing/agc/agc_voicing_prob.dat",
142 "../resources/audio_processing/agc/agc_with_circular_buffer.dat",
143 "../resources/audio_processing/output_data_fixed.pb",
144 "../resources/audio_processing/output_data_float.pb",
145 "../resources/audio_processing/output_data_mac.pb",
146 "../resources/audio_processing/transient/ajm-macbook-1-spke16m.pcm",
147 "../resources/audio_processing/transient/audio16kHz.pcm",
148 "../resources/audio_processing/transient/audio32kHz.pcm",
149 "../resources/audio_processing/transient/audio48kHz.pcm",
150 "../resources/audio_processing/transient/audio8kHz.pcm",
151 "../resources/audio_processing/transient/detect16kHz.dat",
152 "../resources/audio_processing/transient/detect32kHz.dat",
153 "../resources/audio_processing/transient/detect48kHz.dat",
154 "../resources/audio_processing/transient/detect8kHz.dat",
155 "../resources/audio_processing/transient/double-utils.dat",
156 "../resources/audio_processing/transient/float-utils.dat",
157 "../resources/audio_processing/transient/suppressed16kHz.pcm",
158 "../resources/audio_processing/transient/suppressed32kHz.pcm",
159 "../resources/audio_processing/transient/suppressed8kHz.pcm",
160 "../resources/audio_processing/transient/wpd0.dat",
161 "../resources/audio_processing/transient/wpd1.dat",
162 "../resources/audio_processing/transient/wpd2.dat",
163 "../resources/audio_processing/transient/wpd3.dat",
164 "../resources/audio_processing/transient/wpd4.dat",
165 "../resources/audio_processing/transient/wpd5.dat",
166 "../resources/audio_processing/transient/wpd6.dat",
167 "../resources/audio_processing/transient/wpd7.dat",
168 "../resources/deflicker_before_cif_short.yuv",
169 "../resources/far16_stereo.pcm",
170 "../resources/far32_stereo.pcm",
171 "../resources/far44_stereo.pcm",
172 "../resources/far48_stereo.pcm",
173 "../resources/far8_stereo.pcm",
174 "../resources/foremanColorEnhanced_cif_short.yuv",
175 "../resources/foreman_cif.yuv",
176 "../resources/foreman_cif_short.yuv",
177 "../resources/near16_stereo.pcm",
178 "../resources/near32_stereo.pcm",
179 "../resources/near44_stereo.pcm",
180 "../resources/near48_stereo.pcm",
181 "../resources/near8_stereo.pcm",
182 "../resources/ref03.aecdump",
183 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin",
184 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin",
185 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin",
186 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin",
187 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin",
188 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin",
189 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin",
190 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin",
191 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin",
192 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin",
193 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin",
194 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin",
195 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin",
196 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin",
197 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin",
198 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin",
199 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin",
200 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin",
201 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin",
202 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin",
203 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin",
204 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin",
205 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin",
206 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin",
207 "../resources/short_mixed_mono_48.dat",
208 "../resources/short_mixed_mono_48_arm.dat",
209 "../resources/short_mixed_mono_48.pcm",
210 "../resources/short_mixed_stereo_48.dat",
211 "../resources/short_mixed_stereo_48.pcm",
212 "../resources/sprint-downlink.rx",
213 "../resources/sprint-uplink.rx",
214 "../resources/synthetic-trace.rx",
215 "../resources/tmobile-downlink.rx",
216 "../resources/tmobile-uplink.rx",
217 "../resources/verizon3g-downlink.rx",
218 "../resources/verizon3g-uplink.rx",
219 "../resources/verizon4g-downlink.rx",
220 "../resources/verizon4g-uplink.rx",
221 "../resources/voice_engine/audio_tiny48.wav",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700222 ]
kjellander32c4a202016-08-30 02:53:49 -0700223 if (is_ios) {
224 bundle_data("modules_unittests_bundle_data") {
225 testonly = true
226 sources = modules_unittests_resources
227 outputs = [
228 "{{bundle_resources_dir}}/{{source_file_part}}",
229 ]
230 }
231 }
232
ehmaldonado36268652017-01-19 08:27:11 -0800233 rtc_test("modules_unittests") {
minyue4aec1d42016-09-21 23:01:26 -0700234 testonly = true
ehmaldonado36268652017-01-19 08:27:11 -0800235 defines = []
minyue4aec1d42016-09-21 23:01:26 -0700236 sources = [
ehmaldonado36268652017-01-19 08:27:11 -0800237 "module_common_types_unittest.cc",
minyue4aec1d42016-09-21 23:01:26 -0700238 ]
ehmaldonado36268652017-01-19 08:27:11 -0800239
kjellandere40a7ee2016-10-16 23:56:12 -0700240 if (!build_with_chromium && is_clang) {
minyue4aec1d42016-09-21 23:01:26 -0700241 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
242 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
243 }
kjellanderfb114242016-06-13 00:19:48 -0700244
mbonadei1140f972017-04-26 03:38:35 -0700245 deps = [
246 ":module_api",
ehmaldonado26bddb92016-11-30 06:12:01 -0800247 "../test:test_main",
ehmaldonado36268652017-01-19 08:27:11 -0800248 "audio_coding:audio_coding_unittests",
249 "audio_device:audio_device_unittests",
250 "audio_mixer:audio_mixer_unittests",
251 "audio_processing:audio_processing_unittests",
252 "bitrate_controller:bitrate_controller_unittests",
253 "congestion_controller:congestion_controller_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800254 "pacing:pacing_unittests",
255 "remote_bitrate_estimator:remote_bitrate_estimator_unittests",
256 "rtp_rtcp:rtp_rtcp_unittests",
257 "utility:utility_unittests",
258 "video_coding:video_coding_unittests",
259 "video_processing:video_processing_unittests",
kjellanderfb114242016-06-13 00:19:48 -0700260 ]
261
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100262 if (rtc_desktop_capture_supported) {
263 deps += [ "desktop_capture:desktop_capture_unittests" ]
264 }
265
Dan Minor9c686132018-01-15 10:20:00 -0500266 if (!build_with_mozilla) {
267 deps += [ "video_capture" ]
268 }
269
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700270 data = modules_unittests_resources
271
kjellanderfb114242016-06-13 00:19:48 -0700272 if (is_android) {
sakalbd59c712016-08-11 00:59:15 -0700273 deps += [
jianjun.zhuc0247402017-07-11 06:20:45 -0700274 "../sdk/android:libjingle_peerconnection_java",
sakalbd59c712016-08-11 00:59:15 -0700275 "//testing/android/native_test:native_test_support",
sakalbd59c712016-08-11 00:59:15 -0700276 ]
kjellander28a0ffd2016-08-24 07:48:42 -0700277 shard_timeout = 900
278 }
kjellanderfb114242016-06-13 00:19:48 -0700279 if (is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700280 info_plist = "../test/ios/Info.plist"
kjellander32c4a202016-08-30 02:53:49 -0700281 deps += [ ":modules_unittests_bundle_data" ]
ehmaldonado36268652017-01-19 08:27:11 -0800282 configs += [ "..:common_objc" ]
kjellanderfb114242016-06-13 00:19:48 -0700283 ldflags = [ "-ObjC" ]
kjellanderfb114242016-06-13 00:19:48 -0700284 }
285 }
kjellanderfb114242016-06-13 00:19:48 -0700286}