blob: 035df66fe66b87db6331a8423f8a7c9a661a8907 [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",
Danil Chapovalov196100e2018-06-21 10:17:24 +020040 "//third_party/abseil-cpp/absl/types:optional",
Ilya Nikolaevskiy558cabf2017-11-14 10:32:15 +010041 ]
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",
Sebastian Janssonc6c44262018-05-09 10:33:39 +020056 "../api/transport:network_control",
Niels Möllerc6ce9c52018-05-11 11:15:30 +020057 "../api/video:video_frame",
58 "../api/video:video_frame_i420",
philipel1a4746a2018-07-09 15:52:29 +020059 "../modules/rtp_rtcp:rtp_video_header",
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",
Danil Chapovalov196100e2018-06-21 10:17:24 +020063 "//third_party/abseil-cpp/absl/types:optional",
mbonadei1140f972017-04-26 03:38:35 -070064 ]
65}
66
Ying Wang0dd1b0a2018-02-20 12:50:27 +010067rtc_source_set("module_fec_api") {
68 visibility = [ "*" ]
69 sources = [
70 "include/module_fec_types.h",
71 ]
72}
73
kjellanderfb114242016-06-13 00:19:48 -070074if (rtc_include_tests) {
ehmaldonado3a7f35b2016-09-14 05:10:01 -070075 modules_tests_resources = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020076 "../resources/audio_coding/testfile32kHz.pcm",
77 "../resources/audio_coding/teststereo32kHz.pcm",
78 "../resources/foreman_cif.yuv",
ehmaldonado3a7f35b2016-09-14 05:10:01 -070079 ]
kjellander32c4a202016-08-30 02:53:49 -070080
81 if (is_ios) {
82 bundle_data("modules_tests_bundle_data") {
83 testonly = true
84 sources = modules_tests_resources
85 outputs = [
86 "{{bundle_resources_dir}}/{{source_file_part}}",
87 ]
88 }
89 }
90
ehmaldonado38a21322016-09-02 04:10:34 -070091 rtc_test("modules_tests") {
ehmaldonadof98dc102016-08-03 10:46:47 -070092 testonly = true
93
ehmaldonadof98dc102016-08-03 10:46:47 -070094 deps = [
ehmaldonado26bddb92016-11-30 06:12:01 -080095 "../test:test_main",
ehmaldonado656610f2017-02-06 02:21:11 -080096 "../test:video_test_common",
ehmaldonado9cbb0a12017-01-30 03:07:03 -080097 "audio_coding:audio_coding_modules_tests",
ehmaldonado9cbb0a12017-01-30 03:07:03 -080098 "rtp_rtcp:rtp_rtcp_modules_tests",
99 "video_coding:video_coding_modules_tests",
ehmaldonadof98dc102016-08-03 10:46:47 -0700100 "//testing/gtest",
101 ]
102
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100103 if (rtc_desktop_capture_supported) {
104 deps += [ "desktop_capture:desktop_capture_modules_tests" ]
105 }
106
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700107 data = modules_tests_resources
108
ehmaldonadof98dc102016-08-03 10:46:47 -0700109 if (is_android) {
brandtrdf232992017-09-07 07:50:06 -0700110 deps += [
111 # NOTE(brandtr): Including Java classes seems only to be possible from
112 # rtc_test targets. Therefore we include this target here, instead of
113 # in video_coding_modules_tests, where it is actually used.
114 "../sdk/android:libjingle_peerconnection_java",
115 "//testing/android/native_test:native_test_native_code",
116 ]
sakal714dd4e2016-08-15 02:29:11 -0700117 shard_timeout = 900
ehmaldonadof98dc102016-08-03 10:46:47 -0700118 }
kjellander32c4a202016-08-30 02:53:49 -0700119
120 if (is_ios) {
121 deps += [ ":modules_tests_bundle_data" ]
ehmaldonadof98dc102016-08-03 10:46:47 -0700122 }
123
kjellandere40a7ee2016-10-16 23:56:12 -0700124 if (!build_with_chromium && is_clang) {
ehmaldonadof98dc102016-08-03 10:46:47 -0700125 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700126 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonadof98dc102016-08-03 10:46:47 -0700127 }
ehmaldonadof98dc102016-08-03 10:46:47 -0700128 }
129
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700130 modules_unittests_resources = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200131 "../resources/att-downlink.rx",
132 "../resources/att-uplink.rx",
133 "../resources/audio_coding/neteq_opus.rtp",
Henrik Lundine9619f82017-11-27 14:05:27 +0100134 "../resources/audio_coding/neteq_opus_dtx.rtp",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200135 "../resources/audio_coding/neteq_universal_new.rtp",
136 "../resources/audio_coding/speech_mono_16kHz.pcm",
137 "../resources/audio_coding/speech_mono_32_48kHz.pcm",
138 "../resources/audio_coding/testfile32kHz.pcm",
139 "../resources/audio_coding/teststereo32kHz.pcm",
140 "../resources/audio_device/audio_short16.pcm",
141 "../resources/audio_device/audio_short44.pcm",
142 "../resources/audio_device/audio_short48.pcm",
143 "../resources/audio_processing/agc/agc_audio.pcm",
144 "../resources/audio_processing/agc/agc_no_circular_buffer.dat",
145 "../resources/audio_processing/agc/agc_pitch_gain.dat",
146 "../resources/audio_processing/agc/agc_pitch_lag.dat",
147 "../resources/audio_processing/agc/agc_spectral_peak.dat",
148 "../resources/audio_processing/agc/agc_vad.dat",
149 "../resources/audio_processing/agc/agc_voicing_prob.dat",
150 "../resources/audio_processing/agc/agc_with_circular_buffer.dat",
151 "../resources/audio_processing/output_data_fixed.pb",
152 "../resources/audio_processing/output_data_float.pb",
153 "../resources/audio_processing/output_data_mac.pb",
154 "../resources/audio_processing/transient/ajm-macbook-1-spke16m.pcm",
155 "../resources/audio_processing/transient/audio16kHz.pcm",
156 "../resources/audio_processing/transient/audio32kHz.pcm",
157 "../resources/audio_processing/transient/audio48kHz.pcm",
158 "../resources/audio_processing/transient/audio8kHz.pcm",
159 "../resources/audio_processing/transient/detect16kHz.dat",
160 "../resources/audio_processing/transient/detect32kHz.dat",
161 "../resources/audio_processing/transient/detect48kHz.dat",
162 "../resources/audio_processing/transient/detect8kHz.dat",
163 "../resources/audio_processing/transient/double-utils.dat",
164 "../resources/audio_processing/transient/float-utils.dat",
165 "../resources/audio_processing/transient/suppressed16kHz.pcm",
166 "../resources/audio_processing/transient/suppressed32kHz.pcm",
167 "../resources/audio_processing/transient/suppressed8kHz.pcm",
168 "../resources/audio_processing/transient/wpd0.dat",
169 "../resources/audio_processing/transient/wpd1.dat",
170 "../resources/audio_processing/transient/wpd2.dat",
171 "../resources/audio_processing/transient/wpd3.dat",
172 "../resources/audio_processing/transient/wpd4.dat",
173 "../resources/audio_processing/transient/wpd5.dat",
174 "../resources/audio_processing/transient/wpd6.dat",
175 "../resources/audio_processing/transient/wpd7.dat",
176 "../resources/deflicker_before_cif_short.yuv",
177 "../resources/far16_stereo.pcm",
178 "../resources/far32_stereo.pcm",
179 "../resources/far44_stereo.pcm",
180 "../resources/far48_stereo.pcm",
181 "../resources/far8_stereo.pcm",
182 "../resources/foremanColorEnhanced_cif_short.yuv",
183 "../resources/foreman_cif.yuv",
184 "../resources/foreman_cif_short.yuv",
185 "../resources/near16_stereo.pcm",
186 "../resources/near32_stereo.pcm",
187 "../resources/near44_stereo.pcm",
188 "../resources/near48_stereo.pcm",
189 "../resources/near8_stereo.pcm",
190 "../resources/ref03.aecdump",
191 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin",
192 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin",
193 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin",
194 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin",
195 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin",
196 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin",
197 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin",
198 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin",
199 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin",
200 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin",
201 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin",
202 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin",
203 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin",
204 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin",
205 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin",
206 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin",
207 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin",
208 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin",
209 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin",
210 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin",
211 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin",
212 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin",
213 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin",
214 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin",
215 "../resources/short_mixed_mono_48.dat",
216 "../resources/short_mixed_mono_48_arm.dat",
217 "../resources/short_mixed_mono_48.pcm",
218 "../resources/short_mixed_stereo_48.dat",
219 "../resources/short_mixed_stereo_48.pcm",
220 "../resources/sprint-downlink.rx",
221 "../resources/sprint-uplink.rx",
222 "../resources/synthetic-trace.rx",
223 "../resources/tmobile-downlink.rx",
224 "../resources/tmobile-uplink.rx",
225 "../resources/verizon3g-downlink.rx",
226 "../resources/verizon3g-uplink.rx",
227 "../resources/verizon4g-downlink.rx",
228 "../resources/verizon4g-uplink.rx",
229 "../resources/voice_engine/audio_tiny48.wav",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700230 ]
kjellander32c4a202016-08-30 02:53:49 -0700231 if (is_ios) {
232 bundle_data("modules_unittests_bundle_data") {
233 testonly = true
234 sources = modules_unittests_resources
235 outputs = [
236 "{{bundle_resources_dir}}/{{source_file_part}}",
237 ]
238 }
239 }
240
ehmaldonado36268652017-01-19 08:27:11 -0800241 rtc_test("modules_unittests") {
minyue4aec1d42016-09-21 23:01:26 -0700242 testonly = true
ehmaldonado36268652017-01-19 08:27:11 -0800243 defines = []
minyue4aec1d42016-09-21 23:01:26 -0700244 sources = [
ehmaldonado36268652017-01-19 08:27:11 -0800245 "module_common_types_unittest.cc",
minyue4aec1d42016-09-21 23:01:26 -0700246 ]
ehmaldonado36268652017-01-19 08:27:11 -0800247
kjellandere40a7ee2016-10-16 23:56:12 -0700248 if (!build_with_chromium && is_clang) {
minyue4aec1d42016-09-21 23:01:26 -0700249 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
250 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
251 }
kjellanderfb114242016-06-13 00:19:48 -0700252
mbonadei1140f972017-04-26 03:38:35 -0700253 deps = [
254 ":module_api",
ehmaldonado26bddb92016-11-30 06:12:01 -0800255 "../test:test_main",
ehmaldonado36268652017-01-19 08:27:11 -0800256 "audio_coding:audio_coding_unittests",
257 "audio_device:audio_device_unittests",
258 "audio_mixer:audio_mixer_unittests",
259 "audio_processing:audio_processing_unittests",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100260 "audio_processing/aec3:aec3_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800261 "bitrate_controller:bitrate_controller_unittests",
262 "congestion_controller:congestion_controller_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800263 "pacing:pacing_unittests",
264 "remote_bitrate_estimator:remote_bitrate_estimator_unittests",
265 "rtp_rtcp:rtp_rtcp_unittests",
266 "utility:utility_unittests",
267 "video_coding:video_coding_unittests",
268 "video_processing:video_processing_unittests",
kjellanderfb114242016-06-13 00:19:48 -0700269 ]
270
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100271 if (rtc_desktop_capture_supported) {
272 deps += [ "desktop_capture:desktop_capture_unittests" ]
273 }
274
Dan Minor9c686132018-01-15 10:20:00 -0500275 if (!build_with_mozilla) {
276 deps += [ "video_capture" ]
277 }
278
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700279 data = modules_unittests_resources
280
kjellanderfb114242016-06-13 00:19:48 -0700281 if (is_android) {
sakalbd59c712016-08-11 00:59:15 -0700282 deps += [
jianjun.zhuc0247402017-07-11 06:20:45 -0700283 "../sdk/android:libjingle_peerconnection_java",
sakalbd59c712016-08-11 00:59:15 -0700284 "//testing/android/native_test:native_test_support",
sakalbd59c712016-08-11 00:59:15 -0700285 ]
kjellander28a0ffd2016-08-24 07:48:42 -0700286 shard_timeout = 900
287 }
kjellanderfb114242016-06-13 00:19:48 -0700288 if (is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700289 info_plist = "../test/ios/Info.plist"
kjellander32c4a202016-08-30 02:53:49 -0700290 deps += [ ":modules_unittests_bundle_data" ]
ehmaldonado36268652017-01-19 08:27:11 -0800291 configs += [ "..:common_objc" ]
kjellanderfb114242016-06-13 00:19:48 -0700292 ldflags = [ "-ObjC" ]
kjellanderfb114242016-06-13 00:19:48 -0700293 }
294 }
kjellanderfb114242016-06-13 00:19:48 -0700295}