blob: aa76b0f475f313207dc470a6b7630c2526b88a7d [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",
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 "../: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",
Gustaf Ullberg2ae140a2018-02-16 13:43:49 +010059 "../api/audio:audio_frame_api",
Patrik Höglund3e113432017-12-15 14:40:10 +010060 "../rtc_base:deprecation",
ehmaldonadof6a861a2017-07-19 10:40:47 -070061 "../rtc_base:rtc_base_approved",
charujaincb728ea2017-09-18 03:08:08 -070062 "video_coding:codec_globals_headers",
mbonadei1140f972017-04-26 03:38:35 -070063 ]
64}
65
Ying Wang0dd1b0a2018-02-20 12:50:27 +010066rtc_source_set("module_fec_api") {
67 visibility = [ "*" ]
68 sources = [
69 "include/module_fec_types.h",
70 ]
71}
72
kjellanderfb114242016-06-13 00:19:48 -070073if (rtc_include_tests) {
ehmaldonado3a7f35b2016-09-14 05:10:01 -070074 modules_tests_resources = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020075 "../resources/audio_coding/testfile32kHz.pcm",
76 "../resources/audio_coding/teststereo32kHz.pcm",
77 "../resources/foreman_cif.yuv",
78 "../resources/paris_qcif.yuv",
Sergey Silkin10d9d592018-02-01 13:25:17 +010079 "../resources/ConferenceMotion_1280_720_50.yuv",
ehmaldonado3a7f35b2016-09-14 05:10:01 -070080 ]
kjellander32c4a202016-08-30 02:53:49 -070081
82 if (is_ios) {
83 bundle_data("modules_tests_bundle_data") {
84 testonly = true
85 sources = modules_tests_resources
86 outputs = [
87 "{{bundle_resources_dir}}/{{source_file_part}}",
88 ]
89 }
90 }
91
ehmaldonado38a21322016-09-02 04:10:34 -070092 rtc_test("modules_tests") {
ehmaldonadof98dc102016-08-03 10:46:47 -070093 testonly = true
94
ehmaldonadof98dc102016-08-03 10:46:47 -070095 deps = [
ehmaldonado26bddb92016-11-30 06:12:01 -080096 "../test:test_main",
ehmaldonado656610f2017-02-06 02:21:11 -080097 "../test:video_test_common",
ehmaldonado9cbb0a12017-01-30 03:07:03 -080098 "audio_coding:audio_coding_modules_tests",
ehmaldonado9cbb0a12017-01-30 03:07:03 -080099 "rtp_rtcp:rtp_rtcp_modules_tests",
100 "video_coding:video_coding_modules_tests",
ehmaldonadof98dc102016-08-03 10:46:47 -0700101 "//testing/gtest",
102 ]
103
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100104 if (rtc_desktop_capture_supported) {
105 deps += [ "desktop_capture:desktop_capture_modules_tests" ]
106 }
107
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700108 data = modules_tests_resources
109
ehmaldonadof98dc102016-08-03 10:46:47 -0700110 if (is_android) {
brandtrdf232992017-09-07 07:50:06 -0700111 deps += [
112 # NOTE(brandtr): Including Java classes seems only to be possible from
113 # rtc_test targets. Therefore we include this target here, instead of
114 # in video_coding_modules_tests, where it is actually used.
115 "../sdk/android:libjingle_peerconnection_java",
116 "//testing/android/native_test:native_test_native_code",
117 ]
sakal714dd4e2016-08-15 02:29:11 -0700118 shard_timeout = 900
ehmaldonadof98dc102016-08-03 10:46:47 -0700119 }
kjellander32c4a202016-08-30 02:53:49 -0700120
121 if (is_ios) {
122 deps += [ ":modules_tests_bundle_data" ]
ehmaldonadof98dc102016-08-03 10:46:47 -0700123 }
124
kjellandere40a7ee2016-10-16 23:56:12 -0700125 if (!build_with_chromium && is_clang) {
ehmaldonadof98dc102016-08-03 10:46:47 -0700126 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700127 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonadof98dc102016-08-03 10:46:47 -0700128 }
ehmaldonadof98dc102016-08-03 10:46:47 -0700129 }
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",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100261 "audio_processing/aec3:aec3_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800262 "bitrate_controller:bitrate_controller_unittests",
263 "congestion_controller:congestion_controller_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800264 "pacing:pacing_unittests",
265 "remote_bitrate_estimator:remote_bitrate_estimator_unittests",
266 "rtp_rtcp:rtp_rtcp_unittests",
267 "utility:utility_unittests",
268 "video_coding:video_coding_unittests",
269 "video_processing:video_processing_unittests",
kjellanderfb114242016-06-13 00:19:48 -0700270 ]
271
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100272 if (rtc_desktop_capture_supported) {
273 deps += [ "desktop_capture:desktop_capture_unittests" ]
274 }
275
Dan Minor9c686132018-01-15 10:20:00 -0500276 if (!build_with_mozilla) {
277 deps += [ "video_capture" ]
278 }
279
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700280 data = modules_unittests_resources
281
kjellanderfb114242016-06-13 00:19:48 -0700282 if (is_android) {
sakalbd59c712016-08-11 00:59:15 -0700283 deps += [
jianjun.zhuc0247402017-07-11 06:20:45 -0700284 "../sdk/android:libjingle_peerconnection_java",
sakalbd59c712016-08-11 00:59:15 -0700285 "//testing/android/native_test:native_test_support",
sakalbd59c712016-08-11 00:59:15 -0700286 ]
kjellander28a0ffd2016-08-24 07:48:42 -0700287 shard_timeout = 900
288 }
kjellanderfb114242016-06-13 00:19:48 -0700289 if (is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700290 info_plist = "../test/ios/Info.plist"
kjellander32c4a202016-08-30 02:53:49 -0700291 deps += [ ":modules_unittests_bundle_data" ]
ehmaldonado36268652017-01-19 08:27:11 -0800292 configs += [ "..:common_objc" ]
kjellanderfb114242016-06-13 00:19:48 -0700293 ldflags = [ "-ObjC" ]
kjellanderfb114242016-06-13 00:19:48 -0700294 }
295 }
kjellanderfb114242016-06-13 00:19:48 -0700296}