blob: b6978258daa4abf020cc788d0f4cf1f57ba7dd83 [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") {
kjellander705ecc52016-09-15 00:53:26 -070013 public_deps = [
kjellanderfb114242016-06-13 00:19:48 -070014 "audio_coding",
15 "audio_conference_mixer",
16 "audio_device",
kjellander6ceab082016-10-28 05:44:03 -070017 "audio_mixer",
kjellanderfb114242016-06-13 00:19:48 -070018 "audio_processing",
19 "bitrate_controller",
kjellander6ceab082016-10-28 05:44:03 -070020 "congestion_controller",
kjellanderfb114242016-06-13 00:19:48 -070021 "desktop_capture",
22 "media_file",
kjellander6ceab082016-10-28 05:44:03 -070023 "pacing",
24 "remote_bitrate_estimator",
kjellanderfb114242016-06-13 00:19:48 -070025 "rtp_rtcp",
26 "utility",
27 "video_coding",
28 "video_processing",
29 ]
30}
31
mbonadei1140f972017-04-26 03:38:35 -070032rtc_source_set("module_api") {
33 sources = [
34 "include/module.h",
35 "include/module_common_types.h",
36 ]
37 deps = [
38 "..:webrtc_common",
39 "../api:video_frame_api",
40 "../base:rtc_base_approved",
41 ]
42}
43
kjellanderfb114242016-06-13 00:19:48 -070044if (rtc_include_tests) {
ehmaldonado3a7f35b2016-09-14 05:10:01 -070045 modules_tests_resources = [
46 "//resources/audio_coding/testfile32kHz.pcm",
47 "//resources/audio_coding/teststereo32kHz.pcm",
48 "//resources/foreman_cif.yuv",
49 "//resources/paris_qcif.yuv",
50 ]
kjellander32c4a202016-08-30 02:53:49 -070051
52 if (is_ios) {
53 bundle_data("modules_tests_bundle_data") {
54 testonly = true
55 sources = modules_tests_resources
56 outputs = [
57 "{{bundle_resources_dir}}/{{source_file_part}}",
58 ]
59 }
60 }
61
ehmaldonado38a21322016-09-02 04:10:34 -070062 rtc_test("modules_tests") {
ehmaldonadof98dc102016-08-03 10:46:47 -070063 testonly = true
64
ehmaldonadof98dc102016-08-03 10:46:47 -070065 deps = [
ehmaldonado26bddb92016-11-30 06:12:01 -080066 "../test:test_main",
ehmaldonado656610f2017-02-06 02:21:11 -080067 "../test:video_test_common",
ehmaldonado9cbb0a12017-01-30 03:07:03 -080068 "audio_coding:audio_coding_modules_tests",
69 "desktop_capture:desktop_capture_modules_tests",
70 "rtp_rtcp:rtp_rtcp_modules_tests",
71 "video_coding:video_coding_modules_tests",
zijiehe6be0a652016-10-27 16:50:35 -070072 "//testing/gmock",
ehmaldonadof98dc102016-08-03 10:46:47 -070073 "//testing/gtest",
74 ]
75
ehmaldonado3a7f35b2016-09-14 05:10:01 -070076 data = modules_tests_resources
77
ehmaldonadof98dc102016-08-03 10:46:47 -070078 if (is_android) {
79 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -070080 shard_timeout = 900
ehmaldonadof98dc102016-08-03 10:46:47 -070081 }
kjellander32c4a202016-08-30 02:53:49 -070082
83 if (is_ios) {
84 deps += [ ":modules_tests_bundle_data" ]
ehmaldonadof98dc102016-08-03 10:46:47 -070085 }
86
kjellandere40a7ee2016-10-16 23:56:12 -070087 if (!build_with_chromium && is_clang) {
ehmaldonadof98dc102016-08-03 10:46:47 -070088 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070089 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonadof98dc102016-08-03 10:46:47 -070090 }
91 if (is_win) {
92 cflags = [
93 # TODO(phoglund): get rid of 4373 supression when
94 # http://code.google.com/p/webrtc/issues/detail?id=261 is solved.
95 # legacy warning for ignoring const / volatile in signatures.
96 "/wd4373",
97 ]
98 }
99 }
100
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700101 modules_unittests_resources = [
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700102 "//resources/att-downlink.rx",
103 "//resources/att-uplink.rx",
104 "//resources/audio_coding/neteq_opus.rtp",
105 "//resources/audio_coding/neteq_universal_new.rtp",
106 "//resources/audio_coding/speech_mono_16kHz.pcm",
107 "//resources/audio_coding/speech_mono_32_48kHz.pcm",
108 "//resources/audio_coding/testfile32kHz.pcm",
109 "//resources/audio_coding/teststereo32kHz.pcm",
110 "//resources/audio_device/audio_short16.pcm",
111 "//resources/audio_device/audio_short44.pcm",
112 "//resources/audio_device/audio_short48.pcm",
113 "//resources/audio_processing/agc/agc_audio.pcm",
114 "//resources/audio_processing/agc/agc_no_circular_buffer.dat",
115 "//resources/audio_processing/agc/agc_pitch_gain.dat",
116 "//resources/audio_processing/agc/agc_pitch_lag.dat",
117 "//resources/audio_processing/agc/agc_spectral_peak.dat",
118 "//resources/audio_processing/agc/agc_vad.dat",
119 "//resources/audio_processing/agc/agc_voicing_prob.dat",
120 "//resources/audio_processing/agc/agc_with_circular_buffer.dat",
ehmaldonadodedaf1c2016-11-18 04:52:22 -0800121 "//resources/audio_processing/output_data_fixed.pb",
122 "//resources/audio_processing/output_data_float.pb",
123 "//resources/audio_processing/output_data_mac.pb",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700124 "//resources/audio_processing/transient/ajm-macbook-1-spke16m.pcm",
125 "//resources/audio_processing/transient/audio16kHz.pcm",
126 "//resources/audio_processing/transient/audio32kHz.pcm",
127 "//resources/audio_processing/transient/audio48kHz.pcm",
128 "//resources/audio_processing/transient/audio8kHz.pcm",
129 "//resources/audio_processing/transient/detect16kHz.dat",
130 "//resources/audio_processing/transient/detect32kHz.dat",
131 "//resources/audio_processing/transient/detect48kHz.dat",
132 "//resources/audio_processing/transient/detect8kHz.dat",
133 "//resources/audio_processing/transient/double-utils.dat",
134 "//resources/audio_processing/transient/float-utils.dat",
135 "//resources/audio_processing/transient/suppressed16kHz.pcm",
136 "//resources/audio_processing/transient/suppressed32kHz.pcm",
137 "//resources/audio_processing/transient/suppressed8kHz.pcm",
138 "//resources/audio_processing/transient/wpd0.dat",
139 "//resources/audio_processing/transient/wpd1.dat",
140 "//resources/audio_processing/transient/wpd2.dat",
141 "//resources/audio_processing/transient/wpd3.dat",
142 "//resources/audio_processing/transient/wpd4.dat",
143 "//resources/audio_processing/transient/wpd5.dat",
144 "//resources/audio_processing/transient/wpd6.dat",
145 "//resources/audio_processing/transient/wpd7.dat",
146 "//resources/deflicker_before_cif_short.yuv",
147 "//resources/far16_stereo.pcm",
148 "//resources/far32_stereo.pcm",
149 "//resources/far44_stereo.pcm",
150 "//resources/far48_stereo.pcm",
151 "//resources/far8_stereo.pcm",
152 "//resources/foremanColorEnhanced_cif_short.yuv",
153 "//resources/foreman_cif.yuv",
154 "//resources/foreman_cif_short.yuv",
155 "//resources/near16_stereo.pcm",
156 "//resources/near32_stereo.pcm",
157 "//resources/near44_stereo.pcm",
158 "//resources/near48_stereo.pcm",
159 "//resources/near8_stereo.pcm",
160 "//resources/ref03.aecdump",
161 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin",
162 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin",
163 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin",
164 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin",
165 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin",
166 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin",
167 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin",
168 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin",
169 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin",
170 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin",
171 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin",
172 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin",
173 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin",
174 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin",
175 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin",
176 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin",
177 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin",
178 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin",
179 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin",
180 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin",
181 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin",
182 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin",
183 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin",
184 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin",
185 "//resources/short_mixed_mono_48.dat",
186 "//resources/short_mixed_mono_48_arm.dat",
187 "//resources/short_mixed_mono_48.pcm",
188 "//resources/short_mixed_stereo_48.dat",
189 "//resources/short_mixed_stereo_48.pcm",
190 "//resources/sprint-downlink.rx",
191 "//resources/sprint-uplink.rx",
192 "//resources/synthetic-trace.rx",
193 "//resources/tmobile-downlink.rx",
194 "//resources/tmobile-uplink.rx",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700195 "//resources/verizon3g-downlink.rx",
196 "//resources/verizon3g-uplink.rx",
197 "//resources/verizon4g-downlink.rx",
198 "//resources/verizon4g-uplink.rx",
ehmaldonadod661e9c2016-11-22 10:42:59 -0800199 "//resources/voice_engine/audio_tiny48.wav",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700200 ]
kjellander32c4a202016-08-30 02:53:49 -0700201
202 if (is_ios) {
203 bundle_data("modules_unittests_bundle_data") {
204 testonly = true
205 sources = modules_unittests_resources
206 outputs = [
207 "{{bundle_resources_dir}}/{{source_file_part}}",
208 ]
209 }
210 }
211
ehmaldonado36268652017-01-19 08:27:11 -0800212 rtc_test("modules_unittests") {
minyue4aec1d42016-09-21 23:01:26 -0700213 testonly = true
ehmaldonado36268652017-01-19 08:27:11 -0800214 defines = []
minyue4aec1d42016-09-21 23:01:26 -0700215 sources = [
ehmaldonado36268652017-01-19 08:27:11 -0800216 "module_common_types_unittest.cc",
minyue4aec1d42016-09-21 23:01:26 -0700217 ]
ehmaldonado36268652017-01-19 08:27:11 -0800218
kjellandere40a7ee2016-10-16 23:56:12 -0700219 if (!build_with_chromium && is_clang) {
minyue4aec1d42016-09-21 23:01:26 -0700220 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
221 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
222 }
kjellanderfb114242016-06-13 00:19:48 -0700223
mbonadei1140f972017-04-26 03:38:35 -0700224 deps = [
225 ":module_api",
ehmaldonado26bddb92016-11-30 06:12:01 -0800226 "../test:test_main",
ehmaldonado36268652017-01-19 08:27:11 -0800227 "audio_coding:audio_coding_unittests",
ehmaldonado9410b512017-01-19 11:57:56 -0800228 "audio_conference_mixer:audio_conference_mixer_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800229 "audio_device:audio_device_unittests",
230 "audio_mixer:audio_mixer_unittests",
231 "audio_processing:audio_processing_unittests",
232 "bitrate_controller:bitrate_controller_unittests",
233 "congestion_controller:congestion_controller_unittests",
234 "desktop_capture:desktop_capture_unittests",
235 "media_file:media_file_unittests",
236 "pacing:pacing_unittests",
237 "remote_bitrate_estimator:remote_bitrate_estimator_unittests",
238 "rtp_rtcp:rtp_rtcp_unittests",
239 "utility:utility_unittests",
ehmaldonado656610f2017-02-06 02:21:11 -0800240 "video_capture",
ehmaldonado36268652017-01-19 08:27:11 -0800241 "video_coding:video_coding_unittests",
242 "video_processing:video_processing_unittests",
kjellanderfb114242016-06-13 00:19:48 -0700243 ]
244
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700245 data = modules_unittests_resources
246
kjellanderfb114242016-06-13 00:19:48 -0700247 if (is_android) {
sakalbd59c712016-08-11 00:59:15 -0700248 deps += [
249 "//testing/android/native_test:native_test_support",
magjed768c6482016-12-06 04:29:37 -0800250 "//webrtc/sdk/android:libjingle_peerconnection_java",
sakalbd59c712016-08-11 00:59:15 -0700251 ]
kjellander28a0ffd2016-08-24 07:48:42 -0700252 shard_timeout = 900
253 }
kjellanderfb114242016-06-13 00:19:48 -0700254 if (is_ios) {
kthelgasonc37e9832016-09-22 08:00:52 -0700255 info_plist = "//webrtc/test/ios/Info.plist"
kjellander32c4a202016-08-30 02:53:49 -0700256 deps += [ ":modules_unittests_bundle_data" ]
ehmaldonado36268652017-01-19 08:27:11 -0800257 configs += [ "..:common_objc" ]
kjellanderfb114242016-06-13 00:19:48 -0700258 ldflags = [ "-ObjC" ]
kjellanderfb114242016-06-13 00:19:48 -0700259 }
260 }
kjellanderfb114242016-06-13 00:19:48 -0700261}