blob: f6f44bd4b36f34d3eec22f714430ce99cca7fe3a [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",
kjellander6ceab082016-10-28 05:44:03 -070018 "congestion_controller",
kjellander6ceab082016-10-28 05:44:03 -070019 "pacing",
20 "remote_bitrate_estimator",
kjellanderfb114242016-06-13 00:19:48 -070021 "rtp_rtcp",
22 "utility",
23 "video_coding",
24 "video_processing",
25 ]
Joachim Bauch75f18fc2017-12-20 21:25:47 +010026
27 if (rtc_desktop_capture_supported) {
28 deps += [ "desktop_capture" ]
29 }
kjellanderfb114242016-06-13 00:19:48 -070030}
31
Ilya Nikolaevskiy558cabf2017-11-14 10:32:15 +010032rtc_source_set("module_api_public") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010033 sources = [ "include/module_common_types_public.h" ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +020034 deps = [ "..:webrtc_common" ]
35 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
Ilya Nikolaevskiy558cabf2017-11-14 10:32:15 +010036}
37
Mirko Bonadei86d053c2019-10-17 21:32:04 +020038rtc_library("module_api") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000039 visibility = [ "*" ]
mbonadei1140f972017-04-26 03:38:35 -070040 sources = [
41 "include/module.h",
Danil Chapovalovdb128562018-09-17 13:11:50 +020042 "include/module_common_types.cc",
mbonadei1140f972017-04-26 03:38:35 -070043 "include/module_common_types.h",
44 ]
45 deps = [
Danil Chapovalovdb128562018-09-17 13:11:50 +020046 "../rtc_base:safe_conversions",
Mirko Bonadei276827c2018-10-16 14:13:50 +020047 "../rtc_base/system:rtc_export",
mbonadei1140f972017-04-26 03:38:35 -070048 ]
49}
50
Ying Wang0dd1b0a2018-02-20 12:50:27 +010051rtc_source_set("module_fec_api") {
52 visibility = [ "*" ]
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010053 sources = [ "include/module_fec_types.h" ]
Ying Wang0dd1b0a2018-02-20 12:50:27 +010054}
55
kjellanderfb114242016-06-13 00:19:48 -070056if (rtc_include_tests) {
ehmaldonado3a7f35b2016-09-14 05:10:01 -070057 modules_tests_resources = [
Alessio Bazzicaa7382f72020-02-27 13:46:51 +010058 "../resources/audio_coding/testfile16kHz.pcm",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020059 "../resources/audio_coding/testfile32kHz.pcm",
60 "../resources/audio_coding/teststereo32kHz.pcm",
61 "../resources/foreman_cif.yuv",
ehmaldonado3a7f35b2016-09-14 05:10:01 -070062 ]
kjellander32c4a202016-08-30 02:53:49 -070063
64 if (is_ios) {
65 bundle_data("modules_tests_bundle_data") {
66 testonly = true
67 sources = modules_tests_resources
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010068 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
kjellander32c4a202016-08-30 02:53:49 -070069 }
70 }
71
ehmaldonado38a21322016-09-02 04:10:34 -070072 rtc_test("modules_tests") {
ehmaldonadof98dc102016-08-03 10:46:47 -070073 testonly = true
74
ehmaldonadof98dc102016-08-03 10:46:47 -070075 deps = [
ehmaldonado26bddb92016-11-30 06:12:01 -080076 "../test:test_main",
ehmaldonado656610f2017-02-06 02:21:11 -080077 "../test:video_test_common",
ehmaldonado9cbb0a12017-01-30 03:07:03 -080078 "audio_coding:audio_coding_modules_tests",
ehmaldonado9cbb0a12017-01-30 03:07:03 -080079 "rtp_rtcp:rtp_rtcp_modules_tests",
80 "video_coding:video_coding_modules_tests",
ehmaldonadof98dc102016-08-03 10:46:47 -070081 "//testing/gtest",
82 ]
83
Joachim Bauch75f18fc2017-12-20 21:25:47 +010084 if (rtc_desktop_capture_supported) {
85 deps += [ "desktop_capture:desktop_capture_modules_tests" ]
86 }
87
ehmaldonado3a7f35b2016-09-14 05:10:01 -070088 data = modules_tests_resources
89
ehmaldonadof98dc102016-08-03 10:46:47 -070090 if (is_android) {
brandtrdf232992017-09-07 07:50:06 -070091 deps += [
92 # NOTE(brandtr): Including Java classes seems only to be possible from
93 # rtc_test targets. Therefore we include this target here, instead of
94 # in video_coding_modules_tests, where it is actually used.
95 "../sdk/android:libjingle_peerconnection_java",
96 "//testing/android/native_test:native_test_native_code",
97 ]
sakal714dd4e2016-08-15 02:29:11 -070098 shard_timeout = 900
ehmaldonadof98dc102016-08-03 10:46:47 -070099 }
kjellander32c4a202016-08-30 02:53:49 -0700100
101 if (is_ios) {
102 deps += [ ":modules_tests_bundle_data" ]
ehmaldonadof98dc102016-08-03 10:46:47 -0700103 }
ehmaldonadof98dc102016-08-03 10:46:47 -0700104 }
105
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700106 modules_unittests_resources = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200107 "../resources/audio_coding/neteq_opus.rtp",
Henrik Lundine9619f82017-11-27 14:05:27 +0100108 "../resources/audio_coding/neteq_opus_dtx.rtp",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200109 "../resources/audio_coding/neteq_universal_new.rtp",
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100110 "../resources/audio_coding/speech_4_channels_48k_one_second.wav",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200111 "../resources/audio_coding/speech_mono_16kHz.pcm",
112 "../resources/audio_coding/speech_mono_32_48kHz.pcm",
Alessio Bazzicaa7382f72020-02-27 13:46:51 +0100113 "../resources/audio_coding/testfile16kHz.pcm",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200114 "../resources/audio_coding/testfile32kHz.pcm",
Alex Loiko65438812019-02-22 10:13:44 +0100115 "../resources/audio_coding/testfile_fake_stereo_32kHz.pcm",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200116 "../resources/audio_coding/teststereo32kHz.pcm",
117 "../resources/audio_device/audio_short16.pcm",
118 "../resources/audio_device/audio_short44.pcm",
119 "../resources/audio_device/audio_short48.pcm",
120 "../resources/audio_processing/agc/agc_audio.pcm",
121 "../resources/audio_processing/agc/agc_no_circular_buffer.dat",
122 "../resources/audio_processing/agc/agc_pitch_gain.dat",
123 "../resources/audio_processing/agc/agc_pitch_lag.dat",
124 "../resources/audio_processing/agc/agc_spectral_peak.dat",
125 "../resources/audio_processing/agc/agc_vad.dat",
126 "../resources/audio_processing/agc/agc_voicing_prob.dat",
127 "../resources/audio_processing/agc/agc_with_circular_buffer.dat",
128 "../resources/audio_processing/output_data_fixed.pb",
129 "../resources/audio_processing/output_data_float.pb",
130 "../resources/audio_processing/output_data_mac.pb",
131 "../resources/audio_processing/transient/ajm-macbook-1-spke16m.pcm",
132 "../resources/audio_processing/transient/audio16kHz.pcm",
133 "../resources/audio_processing/transient/audio32kHz.pcm",
134 "../resources/audio_processing/transient/audio48kHz.pcm",
135 "../resources/audio_processing/transient/audio8kHz.pcm",
136 "../resources/audio_processing/transient/detect16kHz.dat",
137 "../resources/audio_processing/transient/detect32kHz.dat",
138 "../resources/audio_processing/transient/detect48kHz.dat",
139 "../resources/audio_processing/transient/detect8kHz.dat",
140 "../resources/audio_processing/transient/double-utils.dat",
141 "../resources/audio_processing/transient/float-utils.dat",
142 "../resources/audio_processing/transient/suppressed16kHz.pcm",
143 "../resources/audio_processing/transient/suppressed32kHz.pcm",
144 "../resources/audio_processing/transient/suppressed8kHz.pcm",
145 "../resources/audio_processing/transient/wpd0.dat",
146 "../resources/audio_processing/transient/wpd1.dat",
147 "../resources/audio_processing/transient/wpd2.dat",
148 "../resources/audio_processing/transient/wpd3.dat",
149 "../resources/audio_processing/transient/wpd4.dat",
150 "../resources/audio_processing/transient/wpd5.dat",
151 "../resources/audio_processing/transient/wpd6.dat",
152 "../resources/audio_processing/transient/wpd7.dat",
153 "../resources/deflicker_before_cif_short.yuv",
154 "../resources/far16_stereo.pcm",
155 "../resources/far32_stereo.pcm",
156 "../resources/far44_stereo.pcm",
157 "../resources/far48_stereo.pcm",
158 "../resources/far8_stereo.pcm",
159 "../resources/foremanColorEnhanced_cif_short.yuv",
160 "../resources/foreman_cif.yuv",
161 "../resources/foreman_cif_short.yuv",
162 "../resources/near16_stereo.pcm",
163 "../resources/near32_stereo.pcm",
164 "../resources/near44_stereo.pcm",
165 "../resources/near48_stereo.pcm",
166 "../resources/near8_stereo.pcm",
167 "../resources/ref03.aecdump",
168 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin",
169 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin",
170 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin",
171 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin",
172 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin",
173 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin",
174 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin",
175 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin",
176 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin",
177 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin",
178 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin",
179 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin",
180 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin",
181 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin",
182 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin",
183 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin",
184 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin",
185 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin",
186 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin",
187 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin",
188 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin",
189 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin",
190 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin",
191 "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin",
192 "../resources/short_mixed_mono_48.dat",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200193 "../resources/short_mixed_mono_48.pcm",
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100194 "../resources/short_mixed_mono_48_arm.dat",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200195 "../resources/short_mixed_stereo_48.dat",
196 "../resources/short_mixed_stereo_48.pcm",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200197 "../resources/voice_engine/audio_tiny48.wav",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700198 ]
kjellander32c4a202016-08-30 02:53:49 -0700199 if (is_ios) {
200 bundle_data("modules_unittests_bundle_data") {
201 testonly = true
202 sources = modules_unittests_resources
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100203 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
kjellander32c4a202016-08-30 02:53:49 -0700204 }
205 }
206
ehmaldonado36268652017-01-19 08:27:11 -0800207 rtc_test("modules_unittests") {
minyue4aec1d42016-09-21 23:01:26 -0700208 testonly = true
ehmaldonado36268652017-01-19 08:27:11 -0800209 defines = []
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100210 sources = [ "module_common_types_unittest.cc" ]
ehmaldonado36268652017-01-19 08:27:11 -0800211
mbonadei1140f972017-04-26 03:38:35 -0700212 deps = [
213 ":module_api",
Yves Gerey3e707812018-11-28 16:47:49 +0100214 ":module_api_public",
ehmaldonado26bddb92016-11-30 06:12:01 -0800215 "../test:test_main",
Artem Titov40a7a352018-10-15 15:25:34 +0200216 "../test:test_support",
ehmaldonado36268652017-01-19 08:27:11 -0800217 "audio_coding:audio_coding_unittests",
218 "audio_device:audio_device_unittests",
219 "audio_mixer:audio_mixer_unittests",
220 "audio_processing:audio_processing_unittests",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100221 "audio_processing/aec3:aec3_unittests",
Per Ã…hgren0cbb58e2019-10-29 22:59:44 +0100222 "audio_processing/ns:ns_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800223 "congestion_controller:congestion_controller_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800224 "pacing:pacing_unittests",
225 "remote_bitrate_estimator:remote_bitrate_estimator_unittests",
226 "rtp_rtcp:rtp_rtcp_unittests",
227 "utility:utility_unittests",
228 "video_coding:video_coding_unittests",
229 "video_processing:video_processing_unittests",
kjellanderfb114242016-06-13 00:19:48 -0700230 ]
231
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100232 if (rtc_desktop_capture_supported) {
233 deps += [ "desktop_capture:desktop_capture_unittests" ]
234 }
235
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700236 data = modules_unittests_resources
237
kjellanderfb114242016-06-13 00:19:48 -0700238 if (is_android) {
sakalbd59c712016-08-11 00:59:15 -0700239 deps += [
jianjun.zhuc0247402017-07-11 06:20:45 -0700240 "../sdk/android:libjingle_peerconnection_java",
sakalbd59c712016-08-11 00:59:15 -0700241 "//testing/android/native_test:native_test_support",
sakalbd59c712016-08-11 00:59:15 -0700242 ]
kjellander28a0ffd2016-08-24 07:48:42 -0700243 shard_timeout = 900
244 }
kjellanderfb114242016-06-13 00:19:48 -0700245 if (is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700246 info_plist = "../test/ios/Info.plist"
kjellander32c4a202016-08-30 02:53:49 -0700247 deps += [ ":modules_unittests_bundle_data" ]
ehmaldonado36268652017-01-19 08:27:11 -0800248 configs += [ "..:common_objc" ]
kjellanderfb114242016-06-13 00:19:48 -0700249 ldflags = [ "-ObjC" ]
kjellanderfb114242016-06-13 00:19:48 -0700250 }
251 }
kjellanderfb114242016-06-13 00:19:48 -0700252}