blob: 33394f41330c1adc6d0315ceeecac15b25c6ba34 [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 "desktop_capture",
21 "media_file",
kjellander6ceab082016-10-28 05:44:03 -070022 "pacing",
23 "remote_bitrate_estimator",
kjellanderfb114242016-06-13 00:19:48 -070024 "rtp_rtcp",
25 "utility",
26 "video_coding",
27 "video_processing",
28 ]
29}
30
Ilya Nikolaevskiy558cabf2017-11-14 10:32:15 +010031rtc_source_set("module_api_public") {
32 sources = [
33 "include/module_common_types_public.h",
34 ]
35 deps = [
36 "..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +010037 "../:typedefs",
Ilya Nikolaevskiy558cabf2017-11-14 10:32:15 +010038 "../api:optional",
39 ]
40}
41
mbonadei1140f972017-04-26 03:38:35 -070042rtc_source_set("module_api") {
43 sources = [
44 "include/module.h",
45 "include/module_common_types.h",
46 ]
47 deps = [
Ilya Nikolaevskiy558cabf2017-11-14 10:32:15 +010048 ":module_api_public",
mbonadei1140f972017-04-26 03:38:35 -070049 "..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +010050 "../:typedefs",
51 "../api:libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -070052 "../api:optional",
mbonadei1140f972017-04-26 03:38:35 -070053 "../api:video_frame_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +010054 "../api:video_frame_api_i420",
Patrik Höglund3e113432017-12-15 14:40:10 +010055 "../rtc_base:deprecation",
ehmaldonadof6a861a2017-07-19 10:40:47 -070056 "../rtc_base:rtc_base_approved",
charujaincb728ea2017-09-18 03:08:08 -070057 "video_coding:codec_globals_headers",
mbonadei1140f972017-04-26 03:38:35 -070058 ]
59}
60
kjellanderfb114242016-06-13 00:19:48 -070061if (rtc_include_tests) {
ehmaldonado3a7f35b2016-09-14 05:10:01 -070062 modules_tests_resources = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020063 "../resources/audio_coding/testfile32kHz.pcm",
64 "../resources/audio_coding/teststereo32kHz.pcm",
65 "../resources/foreman_cif.yuv",
66 "../resources/paris_qcif.yuv",
ehmaldonado3a7f35b2016-09-14 05:10:01 -070067 ]
kjellander32c4a202016-08-30 02:53:49 -070068
69 if (is_ios) {
70 bundle_data("modules_tests_bundle_data") {
71 testonly = true
72 sources = modules_tests_resources
73 outputs = [
74 "{{bundle_resources_dir}}/{{source_file_part}}",
75 ]
76 }
77 }
78
ehmaldonado38a21322016-09-02 04:10:34 -070079 rtc_test("modules_tests") {
ehmaldonadof98dc102016-08-03 10:46:47 -070080 testonly = true
81
ehmaldonadof98dc102016-08-03 10:46:47 -070082 deps = [
ehmaldonado26bddb92016-11-30 06:12:01 -080083 "../test:test_main",
ehmaldonado656610f2017-02-06 02:21:11 -080084 "../test:video_test_common",
ehmaldonado9cbb0a12017-01-30 03:07:03 -080085 "audio_coding:audio_coding_modules_tests",
86 "desktop_capture:desktop_capture_modules_tests",
87 "rtp_rtcp:rtp_rtcp_modules_tests",
88 "video_coding:video_coding_modules_tests",
zijiehe6be0a652016-10-27 16:50:35 -070089 "//testing/gmock",
ehmaldonadof98dc102016-08-03 10:46:47 -070090 "//testing/gtest",
91 ]
92
ehmaldonado3a7f35b2016-09-14 05:10:01 -070093 data = modules_tests_resources
94
ehmaldonadof98dc102016-08-03 10:46:47 -070095 if (is_android) {
brandtrdf232992017-09-07 07:50:06 -070096 deps += [
97 # NOTE(brandtr): Including Java classes seems only to be possible from
98 # rtc_test targets. Therefore we include this target here, instead of
99 # in video_coding_modules_tests, where it is actually used.
100 "../sdk/android:libjingle_peerconnection_java",
101 "//testing/android/native_test:native_test_native_code",
102 ]
sakal714dd4e2016-08-15 02:29:11 -0700103 shard_timeout = 900
ehmaldonadof98dc102016-08-03 10:46:47 -0700104 }
kjellander32c4a202016-08-30 02:53:49 -0700105
106 if (is_ios) {
107 deps += [ ":modules_tests_bundle_data" ]
ehmaldonadof98dc102016-08-03 10:46:47 -0700108 }
109
kjellandere40a7ee2016-10-16 23:56:12 -0700110 if (!build_with_chromium && is_clang) {
ehmaldonadof98dc102016-08-03 10:46:47 -0700111 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700112 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonadof98dc102016-08-03 10:46:47 -0700113 }
114 if (is_win) {
115 cflags = [
116 # TODO(phoglund): get rid of 4373 supression when
117 # http://code.google.com/p/webrtc/issues/detail?id=261 is solved.
118 # legacy warning for ignoring const / volatile in signatures.
119 "/wd4373",
120 ]
121 }
122 }
123
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700124 modules_unittests_resources = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200125 "../resources/att-downlink.rx",
126 "../resources/att-uplink.rx",
127 "../resources/audio_coding/neteq_opus.rtp",
Henrik Lundine9619f82017-11-27 14:05:27 +0100128 "../resources/audio_coding/neteq_opus_dtx.rtp",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200129 "../resources/audio_coding/neteq_universal_new.rtp",
130 "../resources/audio_coding/speech_mono_16kHz.pcm",
131 "../resources/audio_coding/speech_mono_32_48kHz.pcm",
132 "../resources/audio_coding/testfile32kHz.pcm",
133 "../resources/audio_coding/teststereo32kHz.pcm",
134 "../resources/audio_device/audio_short16.pcm",
135 "../resources/audio_device/audio_short44.pcm",
136 "../resources/audio_device/audio_short48.pcm",
137 "../resources/audio_processing/agc/agc_audio.pcm",
138 "../resources/audio_processing/agc/agc_no_circular_buffer.dat",
139 "../resources/audio_processing/agc/agc_pitch_gain.dat",
140 "../resources/audio_processing/agc/agc_pitch_lag.dat",
141 "../resources/audio_processing/agc/agc_spectral_peak.dat",
142 "../resources/audio_processing/agc/agc_vad.dat",
143 "../resources/audio_processing/agc/agc_voicing_prob.dat",
144 "../resources/audio_processing/agc/agc_with_circular_buffer.dat",
145 "../resources/audio_processing/output_data_fixed.pb",
146 "../resources/audio_processing/output_data_float.pb",
147 "../resources/audio_processing/output_data_mac.pb",
148 "../resources/audio_processing/transient/ajm-macbook-1-spke16m.pcm",
149 "../resources/audio_processing/transient/audio16kHz.pcm",
150 "../resources/audio_processing/transient/audio32kHz.pcm",
151 "../resources/audio_processing/transient/audio48kHz.pcm",
152 "../resources/audio_processing/transient/audio8kHz.pcm",
153 "../resources/audio_processing/transient/detect16kHz.dat",
154 "../resources/audio_processing/transient/detect32kHz.dat",
155 "../resources/audio_processing/transient/detect48kHz.dat",
156 "../resources/audio_processing/transient/detect8kHz.dat",
157 "../resources/audio_processing/transient/double-utils.dat",
158 "../resources/audio_processing/transient/float-utils.dat",
159 "../resources/audio_processing/transient/suppressed16kHz.pcm",
160 "../resources/audio_processing/transient/suppressed32kHz.pcm",
161 "../resources/audio_processing/transient/suppressed8kHz.pcm",
162 "../resources/audio_processing/transient/wpd0.dat",
163 "../resources/audio_processing/transient/wpd1.dat",
164 "../resources/audio_processing/transient/wpd2.dat",
165 "../resources/audio_processing/transient/wpd3.dat",
166 "../resources/audio_processing/transient/wpd4.dat",
167 "../resources/audio_processing/transient/wpd5.dat",
168 "../resources/audio_processing/transient/wpd6.dat",
169 "../resources/audio_processing/transient/wpd7.dat",
170 "../resources/deflicker_before_cif_short.yuv",
171 "../resources/far16_stereo.pcm",
172 "../resources/far32_stereo.pcm",
173 "../resources/far44_stereo.pcm",
174 "../resources/far48_stereo.pcm",
175 "../resources/far8_stereo.pcm",
176 "../resources/foremanColorEnhanced_cif_short.yuv",
177 "../resources/foreman_cif.yuv",
178 "../resources/foreman_cif_short.yuv",
179 "../resources/near16_stereo.pcm",
180 "../resources/near32_stereo.pcm",
181 "../resources/near44_stereo.pcm",
182 "../resources/near48_stereo.pcm",
183 "../resources/near8_stereo.pcm",
184 "../resources/ref03.aecdump",
185 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin",
186 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin",
187 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin",
188 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin",
189 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin",
190 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin",
191 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin",
192 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin",
193 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin",
194 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin",
195 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin",
196 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin",
197 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin",
198 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin",
199 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin",
200 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin",
201 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin",
202 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin",
203 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin",
204 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin",
205 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin",
206 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin",
207 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin",
208 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin",
209 "../resources/short_mixed_mono_48.dat",
210 "../resources/short_mixed_mono_48_arm.dat",
211 "../resources/short_mixed_mono_48.pcm",
212 "../resources/short_mixed_stereo_48.dat",
213 "../resources/short_mixed_stereo_48.pcm",
214 "../resources/sprint-downlink.rx",
215 "../resources/sprint-uplink.rx",
216 "../resources/synthetic-trace.rx",
217 "../resources/tmobile-downlink.rx",
218 "../resources/tmobile-uplink.rx",
219 "../resources/verizon3g-downlink.rx",
220 "../resources/verizon3g-uplink.rx",
221 "../resources/verizon4g-downlink.rx",
222 "../resources/verizon4g-uplink.rx",
223 "../resources/voice_engine/audio_tiny48.wav",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700224 ]
kjellander32c4a202016-08-30 02:53:49 -0700225 if (is_ios) {
226 bundle_data("modules_unittests_bundle_data") {
227 testonly = true
228 sources = modules_unittests_resources
229 outputs = [
230 "{{bundle_resources_dir}}/{{source_file_part}}",
231 ]
232 }
233 }
234
ehmaldonado36268652017-01-19 08:27:11 -0800235 rtc_test("modules_unittests") {
minyue4aec1d42016-09-21 23:01:26 -0700236 testonly = true
ehmaldonado36268652017-01-19 08:27:11 -0800237 defines = []
minyue4aec1d42016-09-21 23:01:26 -0700238 sources = [
ehmaldonado36268652017-01-19 08:27:11 -0800239 "module_common_types_unittest.cc",
minyue4aec1d42016-09-21 23:01:26 -0700240 ]
ehmaldonado36268652017-01-19 08:27:11 -0800241
kjellandere40a7ee2016-10-16 23:56:12 -0700242 if (!build_with_chromium && is_clang) {
minyue4aec1d42016-09-21 23:01:26 -0700243 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
244 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
245 }
kjellanderfb114242016-06-13 00:19:48 -0700246
mbonadei1140f972017-04-26 03:38:35 -0700247 deps = [
248 ":module_api",
ehmaldonado26bddb92016-11-30 06:12:01 -0800249 "../test:test_main",
ehmaldonado36268652017-01-19 08:27:11 -0800250 "audio_coding:audio_coding_unittests",
251 "audio_device:audio_device_unittests",
252 "audio_mixer:audio_mixer_unittests",
253 "audio_processing:audio_processing_unittests",
254 "bitrate_controller:bitrate_controller_unittests",
255 "congestion_controller:congestion_controller_unittests",
256 "desktop_capture:desktop_capture_unittests",
257 "media_file:media_file_unittests",
258 "pacing:pacing_unittests",
259 "remote_bitrate_estimator:remote_bitrate_estimator_unittests",
260 "rtp_rtcp:rtp_rtcp_unittests",
261 "utility:utility_unittests",
ehmaldonado656610f2017-02-06 02:21:11 -0800262 "video_capture",
ehmaldonado36268652017-01-19 08:27:11 -0800263 "video_coding:video_coding_unittests",
264 "video_processing:video_processing_unittests",
kjellanderfb114242016-06-13 00:19:48 -0700265 ]
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}