blob: dd8e54b68bd376aa8dc4fa8282a8e15bb7f49f99 [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",
kwiberg84f6a3f2017-09-05 08:43:13 -070039 "../api:optional",
mbonadei1140f972017-04-26 03:38:35 -070040 "../api:video_frame_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -070041 "../rtc_base:rtc_base_approved",
mbonadei1140f972017-04-26 03:38:35 -070042 ]
43}
44
kjellanderfb114242016-06-13 00:19:48 -070045if (rtc_include_tests) {
ehmaldonado3a7f35b2016-09-14 05:10:01 -070046 modules_tests_resources = [
jianjun.zhuc0247402017-07-11 06:20:45 -070047 "../../resources/audio_coding/testfile32kHz.pcm",
48 "../../resources/audio_coding/teststereo32kHz.pcm",
49 "../../resources/foreman_cif.yuv",
50 "../../resources/paris_qcif.yuv",
ehmaldonado3a7f35b2016-09-14 05:10:01 -070051 ]
kjellander32c4a202016-08-30 02:53:49 -070052
53 if (is_ios) {
54 bundle_data("modules_tests_bundle_data") {
55 testonly = true
56 sources = modules_tests_resources
57 outputs = [
58 "{{bundle_resources_dir}}/{{source_file_part}}",
59 ]
60 }
61 }
62
ehmaldonado38a21322016-09-02 04:10:34 -070063 rtc_test("modules_tests") {
ehmaldonadof98dc102016-08-03 10:46:47 -070064 testonly = true
65
ehmaldonadof98dc102016-08-03 10:46:47 -070066 deps = [
ehmaldonado26bddb92016-11-30 06:12:01 -080067 "../test:test_main",
ehmaldonado656610f2017-02-06 02:21:11 -080068 "../test:video_test_common",
ehmaldonado9cbb0a12017-01-30 03:07:03 -080069 "audio_coding:audio_coding_modules_tests",
70 "desktop_capture:desktop_capture_modules_tests",
71 "rtp_rtcp:rtp_rtcp_modules_tests",
72 "video_coding:video_coding_modules_tests",
zijiehe6be0a652016-10-27 16:50:35 -070073 "//testing/gmock",
ehmaldonadof98dc102016-08-03 10:46:47 -070074 "//testing/gtest",
75 ]
76
ehmaldonado3a7f35b2016-09-14 05:10:01 -070077 data = modules_tests_resources
78
ehmaldonadof98dc102016-08-03 10:46:47 -070079 if (is_android) {
80 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -070081 shard_timeout = 900
ehmaldonadof98dc102016-08-03 10:46:47 -070082 }
kjellander32c4a202016-08-30 02:53:49 -070083
84 if (is_ios) {
85 deps += [ ":modules_tests_bundle_data" ]
ehmaldonadof98dc102016-08-03 10:46:47 -070086 }
87
kjellandere40a7ee2016-10-16 23:56:12 -070088 if (!build_with_chromium && is_clang) {
ehmaldonadof98dc102016-08-03 10:46:47 -070089 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070090 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonadof98dc102016-08-03 10:46:47 -070091 }
92 if (is_win) {
93 cflags = [
94 # TODO(phoglund): get rid of 4373 supression when
95 # http://code.google.com/p/webrtc/issues/detail?id=261 is solved.
96 # legacy warning for ignoring const / volatile in signatures.
97 "/wd4373",
98 ]
99 }
100 }
101
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700102 modules_unittests_resources = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700103 "../../resources/att-downlink.rx",
104 "../../resources/att-uplink.rx",
105 "../../resources/audio_coding/neteq_opus.rtp",
106 "../../resources/audio_coding/neteq_universal_new.rtp",
107 "../../resources/audio_coding/speech_mono_16kHz.pcm",
108 "../../resources/audio_coding/speech_mono_32_48kHz.pcm",
109 "../../resources/audio_coding/testfile32kHz.pcm",
110 "../../resources/audio_coding/teststereo32kHz.pcm",
111 "../../resources/audio_device/audio_short16.pcm",
112 "../../resources/audio_device/audio_short44.pcm",
113 "../../resources/audio_device/audio_short48.pcm",
114 "../../resources/audio_processing/agc/agc_audio.pcm",
115 "../../resources/audio_processing/agc/agc_no_circular_buffer.dat",
116 "../../resources/audio_processing/agc/agc_pitch_gain.dat",
117 "../../resources/audio_processing/agc/agc_pitch_lag.dat",
118 "../../resources/audio_processing/agc/agc_spectral_peak.dat",
119 "../../resources/audio_processing/agc/agc_vad.dat",
120 "../../resources/audio_processing/agc/agc_voicing_prob.dat",
121 "../../resources/audio_processing/agc/agc_with_circular_buffer.dat",
122 "../../resources/audio_processing/output_data_fixed.pb",
123 "../../resources/audio_processing/output_data_float.pb",
124 "../../resources/audio_processing/output_data_mac.pb",
125 "../../resources/audio_processing/transient/ajm-macbook-1-spke16m.pcm",
126 "../../resources/audio_processing/transient/audio16kHz.pcm",
127 "../../resources/audio_processing/transient/audio32kHz.pcm",
128 "../../resources/audio_processing/transient/audio48kHz.pcm",
129 "../../resources/audio_processing/transient/audio8kHz.pcm",
130 "../../resources/audio_processing/transient/detect16kHz.dat",
131 "../../resources/audio_processing/transient/detect32kHz.dat",
132 "../../resources/audio_processing/transient/detect48kHz.dat",
133 "../../resources/audio_processing/transient/detect8kHz.dat",
134 "../../resources/audio_processing/transient/double-utils.dat",
135 "../../resources/audio_processing/transient/float-utils.dat",
136 "../../resources/audio_processing/transient/suppressed16kHz.pcm",
137 "../../resources/audio_processing/transient/suppressed32kHz.pcm",
138 "../../resources/audio_processing/transient/suppressed8kHz.pcm",
139 "../../resources/audio_processing/transient/wpd0.dat",
140 "../../resources/audio_processing/transient/wpd1.dat",
141 "../../resources/audio_processing/transient/wpd2.dat",
142 "../../resources/audio_processing/transient/wpd3.dat",
143 "../../resources/audio_processing/transient/wpd4.dat",
144 "../../resources/audio_processing/transient/wpd5.dat",
145 "../../resources/audio_processing/transient/wpd6.dat",
146 "../../resources/audio_processing/transient/wpd7.dat",
147 "../../resources/deflicker_before_cif_short.yuv",
148 "../../resources/far16_stereo.pcm",
149 "../../resources/far32_stereo.pcm",
150 "../../resources/far44_stereo.pcm",
151 "../../resources/far48_stereo.pcm",
152 "../../resources/far8_stereo.pcm",
153 "../../resources/foremanColorEnhanced_cif_short.yuv",
154 "../../resources/foreman_cif.yuv",
155 "../../resources/foreman_cif_short.yuv",
156 "../../resources/near16_stereo.pcm",
157 "../../resources/near32_stereo.pcm",
158 "../../resources/near44_stereo.pcm",
159 "../../resources/near48_stereo.pcm",
160 "../../resources/near8_stereo.pcm",
161 "../../resources/ref03.aecdump",
162 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin",
163 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin",
164 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin",
165 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin",
166 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin",
167 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin",
168 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin",
169 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin",
170 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin",
171 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin",
172 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin",
173 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin",
174 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin",
175 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin",
176 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin",
177 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin",
178 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin",
179 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin",
180 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin",
181 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin",
182 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin",
183 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin",
184 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin",
185 "../../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin",
186 "../../resources/short_mixed_mono_48.dat",
187 "../../resources/short_mixed_mono_48_arm.dat",
188 "../../resources/short_mixed_mono_48.pcm",
189 "../../resources/short_mixed_stereo_48.dat",
190 "../../resources/short_mixed_stereo_48.pcm",
191 "../../resources/sprint-downlink.rx",
192 "../../resources/sprint-uplink.rx",
193 "../../resources/synthetic-trace.rx",
194 "../../resources/tmobile-downlink.rx",
195 "../../resources/tmobile-uplink.rx",
196 "../../resources/verizon3g-downlink.rx",
197 "../../resources/verizon3g-uplink.rx",
198 "../../resources/verizon4g-downlink.rx",
199 "../../resources/verizon4g-uplink.rx",
200 "../../resources/voice_engine/audio_tiny48.wav",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700201 ]
kjellander32c4a202016-08-30 02:53:49 -0700202 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 += [
jianjun.zhuc0247402017-07-11 06:20:45 -0700249 "../sdk/android:libjingle_peerconnection_java",
sakalbd59c712016-08-11 00:59:15 -0700250 "//testing/android/native_test:native_test_support",
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) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700255 info_plist = "../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}