blob: ef132cc55d6849706c343c7cb1930eb8598fd7e0 [file] [log] [blame]
Peter Boström5c389d32015-09-25 13:58:30 +02001# 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 06:58:22 -08009import("../webrtc.gni")
kjellander8f8d1a02017-03-06 04:01:16 -080010if (is_android) {
11 import("//build/config/android/config.gni")
12 import("//build/config/android/rules.gni")
13}
Peter Boström5c389d32015-09-25 13:58:30 +020014
kjellanderb62dbbe2016-09-23 00:38:52 -070015rtc_static_library("audio") {
Peter Boström5c389d32015-09-25 13:58:30 +020016 sources = [
17 "audio_receive_stream.cc",
18 "audio_receive_stream.h",
solenbergc7a8b082015-10-16 14:35:07 -070019 "audio_send_stream.cc",
20 "audio_send_stream.h",
solenberg566ef242015-11-06 15:34:49 -080021 "audio_state.cc",
22 "audio_state.h",
aleloidd310712016-11-17 06:28:59 -080023 "audio_transport_proxy.cc",
24 "audio_transport_proxy.h",
Fredrik Solenberg4f4ec0a2015-10-22 10:49:27 +020025 "conversion.h",
henrika5f6bf242017-11-01 11:06:56 +010026 "null_audio_poller.cc",
27 "null_audio_poller.h",
Fredrik Solenberg4f4ec0a2015-10-22 10:49:27 +020028 "scoped_voe_interface.h",
sazac58f8c02017-07-19 00:39:19 -070029 "time_interval.cc",
30 "time_interval.h",
Peter Boström5c389d32015-09-25 13:58:30 +020031 ]
32
kjellandere40a7ee2016-10-16 23:56:12 -070033 if (!build_with_chromium && is_clang) {
34 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070035 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström5c389d32015-09-25 13:58:30 +020036 }
37
38 deps = [
39 "..:webrtc_common",
aleloiaed581a2016-10-20 06:32:39 -070040 "../api:audio_mixer_api",
kjellander676e08f2016-12-07 08:23:27 -080041 "../api:call_api",
kwiberg84f6a3f2017-09-05 08:43:13 -070042 "../api:optional",
ossueb1fde42017-05-02 06:46:30 -070043 "../api/audio_codecs:audio_codecs_api",
44 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadei245660a2017-10-10 14:38:11 +020045 "../call:bitrate_allocator",
ossuf515ab82016-12-07 04:52:58 -080046 "../call:call_interfaces",
nissed76b7b22017-06-01 04:02:35 -070047 "../call:rtp_interfaces",
aleloi04c07222016-11-22 06:42:53 -080048 "../common_audio",
ossu20a4b3f2017-04-27 02:08:52 -070049 "../modules/audio_coding:cng",
aleloidd310712016-11-17 06:28:59 -080050 "../modules/audio_device",
51 "../modules/audio_processing",
stefan7de8d642017-02-07 07:14:08 -080052 "../modules/bitrate_controller:bitrate_controller",
kjellander676e08f2016-12-07 08:23:27 -080053 "../modules/congestion_controller:congestion_controller",
54 "../modules/pacing:pacing",
55 "../modules/remote_bitrate_estimator:remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +010056 "../modules/rtp_rtcp",
henrika5f6bf242017-11-01 11:06:56 +010057 "../rtc_base:rtc_base",
ehmaldonadof6a861a2017-07-19 10:40:47 -070058 "../rtc_base:rtc_base_approved",
59 "../rtc_base:rtc_task_queue",
Peter Boström5c389d32015-09-25 13:58:30 +020060 "../system_wrappers",
Alex Narestcedd3512017-12-07 20:54:55 +010061 "../system_wrappers:field_trial_api",
Tommif888bb52015-12-12 01:37:01 +010062 "../voice_engine",
Peter Boström5c389d32015-09-25 13:58:30 +020063 ]
64}
Peter Boström02083222016-06-14 12:52:54 +020065if (rtc_include_tests) {
Fredrik Solenberg73276ad2017-09-14 14:46:47 +020066 rtc_source_set("audio_end_to_end_test") {
67 testonly = true
68
69 sources = [
70 "test/audio_end_to_end_test.cc",
71 "test/audio_end_to_end_test.h",
72 ]
73 deps = [
74 ":audio",
75 "../system_wrappers:system_wrappers",
76 "../test:fake_audio_device",
77 "../test:test_common",
78 "../test:test_support",
79 ]
80
81 if (!build_with_chromium && is_clang) {
82 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
83 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
84 }
85 }
86
ehmaldonado38a21322016-09-02 04:10:34 -070087 rtc_source_set("audio_tests") {
Peter Boström02083222016-06-14 12:52:54 +020088 testonly = true
kjellander676e08f2016-12-07 08:23:27 -080089
Peter Boström02083222016-06-14 12:52:54 +020090 sources = [
91 "audio_receive_stream_unittest.cc",
solenberg18f54272017-09-15 09:56:08 -070092 "audio_send_stream_tests.cc",
Peter Boström02083222016-06-14 12:52:54 +020093 "audio_send_stream_unittest.cc",
94 "audio_state_unittest.cc",
sazac58f8c02017-07-19 00:39:19 -070095 "time_interval_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +020096 ]
97 deps = [
98 ":audio",
Fredrik Solenberg73276ad2017-09-14 14:46:47 +020099 ":audio_end_to_end_test",
aleloi04c07222016-11-22 06:42:53 -0800100 "../api:mock_audio_mixer",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100101 "../call:mock_rtp_interfaces",
102 "../call:rtp_interfaces",
nisse0f15f922017-06-21 01:05:22 -0700103 "../call:rtp_receiver",
aleloidd310712016-11-17 06:28:59 -0800104 "../modules/audio_device:mock_audio_device",
aleloi04c07222016-11-22 06:42:53 -0800105 "../modules/audio_mixer:audio_mixer_impl",
Ivo Creusen56d46092017-11-24 17:29:59 +0100106 "../modules/audio_processing:audio_processing_statistics",
kjellander676e08f2016-12-07 08:23:27 -0800107 "../modules/congestion_controller:congestion_controller",
zstein7cb69d52017-05-08 11:52:38 -0700108 "../modules/congestion_controller:mock_congestion_controller",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100109 "../modules/pacing:mock_paced_sender",
kjellander676e08f2016-12-07 08:23:27 -0800110 "../modules/pacing:pacing",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100111 "../modules/rtp_rtcp:mock_rtp_rtcp",
112 "../modules/rtp_rtcp:rtp_rtcp_format",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700113 "../rtc_base:rtc_base_approved",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100114 "../rtc_base:rtc_base_tests_utils",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700115 "../rtc_base:rtc_task_queue",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100116 "../system_wrappers:system_wrappers",
117 "../test:audio_codec_mocks",
118 "../test:rtp_test_utils",
aleloi10111bc2016-11-17 06:48:48 -0800119 "../test:test_common",
aleloi6321b492016-12-05 01:46:09 -0800120 "../test:test_support",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100121 "../voice_engine",
ehmaldonado894c2bb2017-01-05 06:03:24 -0800122 "utility:utility_tests",
Peter Boström02083222016-06-14 12:52:54 +0200123 "//testing/gmock",
124 "//testing/gtest",
125 ]
oprypin5e1ca782017-03-20 02:06:18 -0700126
Fredrik Solenberg73276ad2017-09-14 14:46:47 +0200127 if (!rtc_use_memcheck) {
128 # This test is timing dependent, which rules out running on memcheck bots.
129 sources += [ "test/audio_stats_test.cc" ]
130 }
131
kjellandere40a7ee2016-10-16 23:56:12 -0700132 if (!build_with_chromium && is_clang) {
133 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700134 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström02083222016-06-14 12:52:54 +0200135 }
136 }
kjellander8f8d1a02017-03-06 04:01:16 -0800137
138 if (rtc_enable_protobuf) {
oprypin6d305ba2017-03-30 04:01:30 -0700139 rtc_test("low_bandwidth_audio_test") {
kjellander8f8d1a02017-03-06 04:01:16 -0800140 testonly = true
141
142 sources = [
143 "test/low_bandwidth_audio_test.cc",
144 ]
145
oprypin92220ff2017-03-23 03:40:03 -0700146 deps = [
Fredrik Solenberg73276ad2017-09-14 14:46:47 +0200147 ":audio_end_to_end_test",
oprypin92220ff2017-03-23 03:40:03 -0700148 "../common_audio",
oprypin9b2f20c2017-08-29 05:51:57 -0700149 "../rtc_base:rtc_base_approved",
oprypin92220ff2017-03-23 03:40:03 -0700150 "../system_wrappers",
151 "../test:fake_audio_device",
oprypin92220ff2017-03-23 03:40:03 -0700152 "../test:test_common",
153 "../test:test_main",
tschumim9d117642017-07-17 01:41:41 -0700154 "//testing/gmock",
155 "//testing/gtest",
oprypin92220ff2017-03-23 03:40:03 -0700156 ]
kjellander8f8d1a02017-03-06 04:01:16 -0800157 if (is_android) {
oprypin92220ff2017-03-23 03:40:03 -0700158 deps += [ "//testing/android/native_test:native_test_native_code" ]
159 }
160
161 data = [
Edward Lemur20110752017-09-28 16:14:37 +0200162 "../resources/voice_engine/audio_dtx16.wav",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200163 "../resources/voice_engine/audio_tiny16.wav",
164 "../resources/voice_engine/audio_tiny48.wav",
Edward Lemur20110752017-09-28 16:14:37 +0200165 "test/low_bandwidth_audio_test.py",
oprypin92220ff2017-03-23 03:40:03 -0700166 ]
Edward Lemur20110752017-09-28 16:14:37 +0200167 if (is_linux) {
168 data += [
169 "../tools_webrtc/audio_quality/linux/PolqaOem64",
170 "../tools_webrtc/audio_quality/linux/pesq",
171 ]
172 }
173 if (is_win) {
174 data += [
175 "../tools_webrtc/audio_quality/win/PolqaOem64.dll",
176 "../tools_webrtc/audio_quality/win/PolqaOem64.exe",
177 "../tools_webrtc/audio_quality/win/pesq.exe",
178 "../tools_webrtc/audio_quality/win/vcomp120.dll",
179 ]
180 }
181 if (is_mac) {
182 data += [ "../tools_webrtc/audio_quality/mac/pesq" ]
183 }
oprypin92220ff2017-03-23 03:40:03 -0700184
185 if (!build_with_chromium && is_clang) {
186 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163)
187 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander8f8d1a02017-03-06 04:01:16 -0800188 }
189 }
190 }
tschumim9d117642017-07-17 01:41:41 -0700191
192 rtc_source_set("audio_perf_tests") {
193 testonly = true
194
tschumim9d117642017-07-17 01:41:41 -0700195 sources = [
196 "test/audio_bwe_integration_test.cc",
197 "test/audio_bwe_integration_test.h",
198 ]
199 deps = [
tschumim9d117642017-07-17 01:41:41 -0700200 "../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700201 "../rtc_base:rtc_base_approved",
tschumim9d117642017-07-17 01:41:41 -0700202 "../system_wrappers",
203 "../test:fake_audio_device",
204 "../test:field_trial",
eladalon413ee9a2017-08-22 04:02:52 -0700205 "../test:single_threaded_task_queue",
tschumim9d117642017-07-17 01:41:41 -0700206 "../test:test_common",
207 "../test:test_main",
208 "//testing/gmock",
209 "//testing/gtest",
tschumim9d117642017-07-17 01:41:41 -0700210 ]
211
212 data = [
213 "//resources/voice_engine/audio_dtx16.wav",
214 ]
215
216 if (!build_with_chromium && is_clang) {
217 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
218 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
219 }
220 }
Peter Boström02083222016-06-14 12:52:54 +0200221}