blob: 91cece93cb9aae50ab51aba645391de535d153d1 [file] [log] [blame]
Peter Boström5c389d32015-09-25 11:58:301# Copyright (c) 2015 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 14:58:229import("../webrtc.gni")
kjellander8f8d1a02017-03-06 12:01:1610if (is_android) {
11 import("//build/config/android/config.gni")
12 import("//build/config/android/rules.gni")
13}
Peter Boström5c389d32015-09-25 11:58:3014
kjellanderb62dbbe2016-09-23 07:38:5215rtc_static_library("audio") {
Peter Boström5c389d32015-09-25 11:58:3016 sources = [
Fredrik Solenberga8b7c7f2018-01-17 10:18:3117 "audio_level.cc",
18 "audio_level.h",
Peter Boström5c389d32015-09-25 11:58:3019 "audio_receive_stream.cc",
20 "audio_receive_stream.h",
solenbergc7a8b082015-10-16 21:35:0721 "audio_send_stream.cc",
22 "audio_send_stream.h",
solenberg566ef242015-11-06 23:34:4923 "audio_state.cc",
24 "audio_state.h",
Fredrik Solenberg2a877972017-12-15 15:42:1525 "audio_transport_impl.cc",
26 "audio_transport_impl.h",
Niels Möller530ead42018-10-04 12:28:3927 "channel_receive.cc",
28 "channel_receive.h",
Niels Möllerb222f492018-10-03 14:50:0829 "channel_receive_proxy.cc",
30 "channel_receive_proxy.h",
Niels Möller530ead42018-10-04 12:28:3931 "channel_send.cc",
32 "channel_send.h",
Niels Möllerb222f492018-10-03 14:50:0833 "channel_send_proxy.cc",
34 "channel_send_proxy.h",
Fredrik Solenberg4f4ec0a2015-10-22 08:49:2735 "conversion.h",
henrika5f6bf242017-11-01 10:06:5636 "null_audio_poller.cc",
37 "null_audio_poller.h",
Fredrik Solenberga8b7c7f2018-01-17 10:18:3138 "remix_resample.cc",
39 "remix_resample.h",
sazac58f8c02017-07-19 07:39:1940 "time_interval.cc",
41 "time_interval.h",
Fredrik Solenberga8b7c7f2018-01-17 10:18:3142 "transport_feedback_packet_loss_tracker.cc",
43 "transport_feedback_packet_loss_tracker.h",
Peter Boström5c389d32015-09-25 11:58:3044 ]
45
kjellandere40a7ee2016-10-17 06:56:1246 if (!build_with_chromium && is_clang) {
47 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 11:10:3448 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström5c389d32015-09-25 11:58:3049 }
50
51 deps = [
52 "..:webrtc_common",
Fredrik Solenberga8b7c7f2018-01-17 10:18:3153 "../api:array_view",
kjellander676e08f2016-12-07 16:23:2754 "../api:call_api",
Fredrik Solenberga8b7c7f2018-01-17 10:18:3155 "../api:libjingle_peerconnection_api",
Fredrik Solenberga8b7c7f2018-01-17 10:18:3156 "../api:transport_api",
Gustaf Ullbergf35c6662018-02-23 12:18:2957 "../api/audio:aec3_factory",
Fredrik Solenbergbbf21a32018-04-12 20:44:0958 "../api/audio:audio_frame_api",
Gustaf Ullberg2ae140a2018-02-16 12:43:4959 "../api/audio:audio_mixer_api",
ossueb1fde42017-05-02 13:46:3060 "../api/audio_codecs:audio_codecs_api",
Mirko Bonadei245660a2017-10-10 12:38:1161 "../call:bitrate_allocator",
ossuf515ab82016-12-07 12:52:5862 "../call:call_interfaces",
nissed76b7b22017-06-01 11:02:3563 "../call:rtp_interfaces",
aleloi04c07222016-11-22 14:42:5364 "../common_audio",
Mirko Bonadeidbbb33c2018-02-05 14:50:4165 "../common_audio:common_audio_c",
Qingsi Wang970b0882018-02-01 19:04:4666 "../logging:rtc_event_audio",
Fredrik Solenberga8b7c7f2018-01-17 10:18:3167 "../logging:rtc_event_log_api",
Fredrik Solenberga8b7c7f2018-01-17 10:18:3168 "../modules/audio_coding",
69 "../modules/audio_coding:audio_format_conversion",
70 "../modules/audio_coding:audio_network_adaptor_config",
ossu20a4b3f2017-04-27 09:08:5271 "../modules/audio_coding:cng",
aleloidd310712016-11-17 14:28:5972 "../modules/audio_device",
73 "../modules/audio_processing",
stefan7de8d642017-02-07 15:14:0874 "../modules/bitrate_controller:bitrate_controller",
kjellander676e08f2016-12-07 16:23:2775 "../modules/pacing:pacing",
76 "../modules/remote_bitrate_estimator:remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 06:51:3377 "../modules/rtp_rtcp",
Fredrik Solenberga8b7c7f2018-01-17 10:18:3178 "../modules/rtp_rtcp:rtp_rtcp_format",
79 "../modules/utility",
Jonas Olssonabbe8412018-04-03 11:40:0580 "../rtc_base:audio_format_to_string",
Patrik Höglunda8005cf2017-12-13 15:05:4281 "../rtc_base:checks",
Fredrik Solenberga8b7c7f2018-01-17 10:18:3182 "../rtc_base:rate_limiter",
henrika5f6bf242017-11-01 10:06:5683 "../rtc_base:rtc_base",
ehmaldonadof6a861a2017-07-19 17:40:4784 "../rtc_base:rtc_base_approved",
85 "../rtc_base:rtc_task_queue",
Karl Wiberg12edf4c2018-03-07 13:18:5686 "../rtc_base:safe_minmax",
Tommifef05002018-02-27 12:51:0887 "../rtc_base:stringutils",
Peter Boström5c389d32015-09-25 11:58:3088 "../system_wrappers",
Mirko Bonadei17f48782018-09-28 06:51:1089 "../system_wrappers:field_trial",
90 "../system_wrappers:metrics",
Fredrik Solenberg2a877972017-12-15 15:42:1591 "utility:audio_frame_operations",
Karl Wiberg918f50c2018-07-05 09:40:3392 "//third_party/abseil-cpp/absl/memory",
Danil Chapovalovb9b146c2018-06-15 10:28:0793 "//third_party/abseil-cpp/absl/types:optional",
Peter Boström5c389d32015-09-25 11:58:3094 ]
95}
Peter Boström02083222016-06-14 10:52:5496if (rtc_include_tests) {
Fredrik Solenberg73276ad2017-09-14 12:46:4797 rtc_source_set("audio_end_to_end_test") {
98 testonly = true
99
100 sources = [
101 "test/audio_end_to_end_test.cc",
102 "test/audio_end_to_end_test.h",
103 ]
104 deps = [
105 ":audio",
Artem Titov46c4e602018-08-17 12:26:54106 "../api:simulated_network_api",
Artem Titov4e199e92018-08-20 11:30:39107 "../call:fake_network",
108 "../call:simulated_network",
Fredrik Solenberg73276ad2017-09-14 12:46:47109 "../system_wrappers:system_wrappers",
Fredrik Solenberg73276ad2017-09-14 12:46:47110 "../test:test_common",
111 "../test:test_support",
112 ]
113
114 if (!build_with_chromium && is_clang) {
115 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
116 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
117 }
118 }
119
ehmaldonado38a21322016-09-02 11:10:34120 rtc_source_set("audio_tests") {
Peter Boström02083222016-06-14 10:52:54121 testonly = true
kjellander676e08f2016-12-07 16:23:27122
Peter Boström02083222016-06-14 10:52:54123 sources = [
124 "audio_receive_stream_unittest.cc",
solenberg18f54272017-09-15 16:56:08125 "audio_send_stream_tests.cc",
Peter Boström02083222016-06-14 10:52:54126 "audio_send_stream_unittest.cc",
127 "audio_state_unittest.cc",
Fredrik Solenberga8b7c7f2018-01-17 10:18:31128 "mock_voe_channel_proxy.h",
129 "remix_resample_unittest.cc",
Mirko Bonadei264bee82018-08-07 06:53:41130 "test/audio_stats_test.cc",
sazac58f8c02017-07-19 07:39:19131 "time_interval_unittest.cc",
Fredrik Solenberga8b7c7f2018-01-17 10:18:31132 "transport_feedback_packet_loss_tracker_unittest.cc",
Peter Boström02083222016-06-14 10:52:54133 ]
134 deps = [
135 ":audio",
Fredrik Solenberg73276ad2017-09-14 12:46:47136 ":audio_end_to_end_test",
aleloi04c07222016-11-22 14:42:53137 "../api:mock_audio_mixer",
Fredrik Solenbergbbf21a32018-04-12 20:44:09138 "../api/audio:audio_frame_api",
Sebastian Jansson5f83cf02018-05-08 12:52:22139 "../api/units:time_delta",
Fredrik Solenberg2a877972017-12-15 15:42:15140 "../call:mock_call_interfaces",
Sebastian Janssonef9daee2018-02-22 13:49:02141 "../call:mock_rtp_interfaces",
Patrik Höglundc0e68042017-11-13 16:04:05142 "../call:rtp_interfaces",
nisse0f15f922017-06-21 08:05:22143 "../call:rtp_receiver",
Fredrik Solenberga8b7c7f2018-01-17 10:18:31144 "../common_audio",
Patrik Höglund731082c2018-01-03 08:08:20145 "../logging:mocks",
aleloidd310712016-11-17 14:28:59146 "../modules/audio_device:mock_audio_device",
aleloi04c07222016-11-22 14:42:53147 "../modules/audio_mixer:audio_mixer_impl",
Ivo Creusen56d460902017-11-24 16:29:59148 "../modules/audio_processing:audio_processing_statistics",
Patrik Höglund62139292017-12-19 15:44:45149 "../modules/audio_processing:mocks",
Patrik Höglund94dc1772018-01-02 13:20:17150 "../modules/bitrate_controller:mocks",
kjellander676e08f2016-12-07 16:23:27151 "../modules/pacing:pacing",
Patrik Höglundc0e68042017-11-13 16:04:05152 "../modules/rtp_rtcp:mock_rtp_rtcp",
153 "../modules/rtp_rtcp:rtp_rtcp_format",
Fredrik Solenberga8b7c7f2018-01-17 10:18:31154 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 17:40:47155 "../rtc_base:rtc_base_approved",
Patrik Höglundc0e68042017-11-13 16:04:05156 "../rtc_base:rtc_base_tests_utils",
ehmaldonadof6a861a2017-07-19 17:40:47157 "../rtc_base:rtc_task_queue",
Patrik Höglunda8005cf2017-12-13 15:05:42158 "../rtc_base:safe_compare",
Patrik Höglundc0e68042017-11-13 16:04:05159 "../system_wrappers:system_wrappers",
160 "../test:audio_codec_mocks",
161 "../test:rtp_test_utils",
aleloi10111bc2016-11-17 14:48:48162 "../test:test_common",
aleloi6321b492016-12-05 09:46:09163 "../test:test_support",
ehmaldonado894c2bb2017-01-05 14:03:24164 "utility:utility_tests",
Peter Boström02083222016-06-14 10:52:54165 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 09:40:33166 "//third_party/abseil-cpp/absl/memory",
Peter Boström02083222016-06-14 10:52:54167 ]
oprypin5e1ca782017-03-20 09:06:18168
kjellandere40a7ee2016-10-17 06:56:12169 if (!build_with_chromium && is_clang) {
170 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 11:10:34171 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström02083222016-06-14 10:52:54172 }
173 }
kjellander8f8d1a02017-03-06 12:01:16174
175 if (rtc_enable_protobuf) {
oprypin6d305ba2017-03-30 11:01:30176 rtc_test("low_bandwidth_audio_test") {
kjellander8f8d1a02017-03-06 12:01:16177 testonly = true
178
179 sources = [
180 "test/low_bandwidth_audio_test.cc",
181 ]
182
oprypin92220ff2017-03-23 10:40:03183 deps = [
Fredrik Solenberg73276ad2017-09-14 12:46:47184 ":audio_end_to_end_test",
Artem Titov46c4e602018-08-17 12:26:54185 "../api:simulated_network_api",
oprypin92220ff2017-03-23 10:40:03186 "../common_audio",
oprypin9b2f20c2017-08-29 12:51:57187 "../rtc_base:rtc_base_approved",
oprypin92220ff2017-03-23 10:40:03188 "../system_wrappers",
Patrik Höglund7696bef2018-03-15 14:05:39189 "../test:fileutils",
oprypin92220ff2017-03-23 10:40:03190 "../test:test_common",
191 "../test:test_main",
tschumim9d117642017-07-17 08:41:41192 "//testing/gtest",
oprypin92220ff2017-03-23 10:40:03193 ]
kjellander8f8d1a02017-03-06 12:01:16194 if (is_android) {
oprypin92220ff2017-03-23 10:40:03195 deps += [ "//testing/android/native_test:native_test_native_code" ]
196 }
197
198 data = [
Oleh Prypin8cf0a872018-03-18 21:31:06199 "../resources/voice_engine/audio_tiny16.wav",
Oleh Prypin9c1ee362018-03-19 14:58:08200 "../resources/voice_engine/audio_tiny48.wav",
Oleh Prypin8cf0a872018-03-18 21:31:06201 ]
202
203 if (!build_with_chromium && is_clang) {
204 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163)
205 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
206 }
207 }
208
209 group("low_bandwidth_audio_perf_test") {
210 testonly = true
211
212 deps = [
213 ":low_bandwidth_audio_test",
214 ]
215
216 data = [
217 "test/low_bandwidth_audio_test.py",
Mirko Bonadei92ea95e2017-09-15 04:47:31218 "../resources/voice_engine/audio_tiny16.wav",
219 "../resources/voice_engine/audio_tiny48.wav",
oprypin92220ff2017-03-23 10:40:03220 ]
Oleh Prypin7b2676f2018-03-19 10:33:03221 if (is_win) {
222 data += [ "${root_out_dir}/low_bandwidth_audio_test.exe" ]
223 } else {
224 data += [ "${root_out_dir}/low_bandwidth_audio_test" ]
225 }
226
Edward Lemur98d40362018-01-15 16:37:04227 if (is_linux || is_android) {
Edward Lemur20110752017-09-28 14:14:37228 data += [
229 "../tools_webrtc/audio_quality/linux/PolqaOem64",
230 "../tools_webrtc/audio_quality/linux/pesq",
231 ]
232 }
233 if (is_win) {
234 data += [
235 "../tools_webrtc/audio_quality/win/PolqaOem64.dll",
236 "../tools_webrtc/audio_quality/win/PolqaOem64.exe",
237 "../tools_webrtc/audio_quality/win/pesq.exe",
238 "../tools_webrtc/audio_quality/win/vcomp120.dll",
239 ]
240 }
241 if (is_mac) {
242 data += [ "../tools_webrtc/audio_quality/mac/pesq" ]
243 }
Oleh Prypin650a8262018-03-15 13:52:41244
Oleh Prypin8cf0a872018-03-18 21:31:06245 write_runtime_deps = "${root_out_dir}/${target_name}.runtime_deps"
kjellander8f8d1a02017-03-06 12:01:16246 }
247 }
tschumim9d117642017-07-17 08:41:41248
249 rtc_source_set("audio_perf_tests") {
250 testonly = true
251
tschumim9d117642017-07-17 08:41:41252 sources = [
253 "test/audio_bwe_integration_test.cc",
254 "test/audio_bwe_integration_test.h",
255 ]
256 deps = [
Artem Titov46c4e602018-08-17 12:26:54257 "../api:simulated_network_api",
Artem Titov4e199e92018-08-20 11:30:39258 "../call:fake_network",
259 "../call:simulated_network",
tschumim9d117642017-07-17 08:41:41260 "../common_audio",
ehmaldonadof6a861a2017-07-19 17:40:47261 "../rtc_base:rtc_base_approved",
tschumim9d117642017-07-17 08:41:41262 "../system_wrappers",
tschumim9d117642017-07-17 08:41:41263 "../test:field_trial",
Patrik Höglund7696bef2018-03-15 14:05:39264 "../test:fileutils",
eladalon413ee9a2017-08-22 11:02:52265 "../test:single_threaded_task_queue",
tschumim9d117642017-07-17 08:41:41266 "../test:test_common",
267 "../test:test_main",
tschumim9d117642017-07-17 08:41:41268 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 09:40:33269 "//third_party/abseil-cpp/absl/memory",
tschumim9d117642017-07-17 08:41:41270 ]
271
272 data = [
273 "//resources/voice_engine/audio_dtx16.wav",
274 ]
275
276 if (!build_with_chromium && is_clang) {
277 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
278 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
279 }
280 }
Peter Boström02083222016-06-14 10:52:54281}