blob: 2a29ceb22bcfc364381b4ae39793a3c728781fc9 [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",
56 "../modules/rtp_rtcp: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",
Tommif888bb52015-12-12 01:37:01 +010061 "../voice_engine",
Peter Boström5c389d32015-09-25 13:58:30 +020062 ]
63}
Peter Boström02083222016-06-14 12:52:54 +020064if (rtc_include_tests) {
Fredrik Solenberg73276ad2017-09-14 14:46:47 +020065 rtc_source_set("audio_end_to_end_test") {
66 testonly = true
67
68 sources = [
69 "test/audio_end_to_end_test.cc",
70 "test/audio_end_to_end_test.h",
71 ]
72 deps = [
73 ":audio",
74 "../system_wrappers:system_wrappers",
75 "../test:fake_audio_device",
76 "../test:test_common",
77 "../test:test_support",
78 ]
79
80 if (!build_with_chromium && is_clang) {
81 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
82 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
83 }
84 }
85
ehmaldonado38a21322016-09-02 04:10:34 -070086 rtc_source_set("audio_tests") {
Peter Boström02083222016-06-14 12:52:54 +020087 testonly = true
kjellander676e08f2016-12-07 08:23:27 -080088
Peter Boström02083222016-06-14 12:52:54 +020089 sources = [
90 "audio_receive_stream_unittest.cc",
solenberg18f54272017-09-15 09:56:08 -070091 "audio_send_stream_tests.cc",
Peter Boström02083222016-06-14 12:52:54 +020092 "audio_send_stream_unittest.cc",
93 "audio_state_unittest.cc",
sazac58f8c02017-07-19 00:39:19 -070094 "time_interval_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +020095 ]
96 deps = [
97 ":audio",
Fredrik Solenberg73276ad2017-09-14 14:46:47 +020098 ":audio_end_to_end_test",
aleloi04c07222016-11-22 06:42:53 -080099 "../api:mock_audio_mixer",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100100 "../call:mock_rtp_interfaces",
101 "../call:rtp_interfaces",
nisse0f15f922017-06-21 01:05:22 -0700102 "../call:rtp_receiver",
aleloidd310712016-11-17 06:28:59 -0800103 "../modules/audio_device:mock_audio_device",
aleloi04c07222016-11-22 06:42:53 -0800104 "../modules/audio_mixer:audio_mixer_impl",
Ivo Creusen56d46092017-11-24 17:29:59 +0100105 "../modules/audio_processing:audio_processing_statistics",
kjellander676e08f2016-12-07 08:23:27 -0800106 "../modules/congestion_controller:congestion_controller",
zstein7cb69d52017-05-08 11:52:38 -0700107 "../modules/congestion_controller:mock_congestion_controller",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100108 "../modules/pacing:mock_paced_sender",
kjellander676e08f2016-12-07 08:23:27 -0800109 "../modules/pacing:pacing",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100110 "../modules/rtp_rtcp:mock_rtp_rtcp",
111 "../modules/rtp_rtcp:rtp_rtcp_format",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700112 "../rtc_base:rtc_base_approved",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100113 "../rtc_base:rtc_base_tests_utils",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700114 "../rtc_base:rtc_task_queue",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100115 "../system_wrappers:system_wrappers",
116 "../test:audio_codec_mocks",
117 "../test:rtp_test_utils",
aleloi10111bc2016-11-17 06:48:48 -0800118 "../test:test_common",
aleloi6321b492016-12-05 01:46:09 -0800119 "../test:test_support",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100120 "../voice_engine",
ehmaldonado894c2bb2017-01-05 06:03:24 -0800121 "utility:utility_tests",
Peter Boström02083222016-06-14 12:52:54 +0200122 "//testing/gmock",
123 "//testing/gtest",
124 ]
oprypin5e1ca782017-03-20 02:06:18 -0700125
Fredrik Solenberg73276ad2017-09-14 14:46:47 +0200126 if (!rtc_use_memcheck) {
127 # This test is timing dependent, which rules out running on memcheck bots.
128 sources += [ "test/audio_stats_test.cc" ]
129 }
130
kjellandere40a7ee2016-10-16 23:56:12 -0700131 if (!build_with_chromium && is_clang) {
132 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700133 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström02083222016-06-14 12:52:54 +0200134 }
135 }
kjellander8f8d1a02017-03-06 04:01:16 -0800136
137 if (rtc_enable_protobuf) {
oprypin6d305ba2017-03-30 04:01:30 -0700138 rtc_test("low_bandwidth_audio_test") {
kjellander8f8d1a02017-03-06 04:01:16 -0800139 testonly = true
140
141 sources = [
142 "test/low_bandwidth_audio_test.cc",
143 ]
144
oprypin92220ff2017-03-23 03:40:03 -0700145 deps = [
Fredrik Solenberg73276ad2017-09-14 14:46:47 +0200146 ":audio_end_to_end_test",
oprypin92220ff2017-03-23 03:40:03 -0700147 "../common_audio",
oprypin9b2f20c2017-08-29 05:51:57 -0700148 "../rtc_base:rtc_base_approved",
oprypin92220ff2017-03-23 03:40:03 -0700149 "../system_wrappers",
150 "../test:fake_audio_device",
oprypin92220ff2017-03-23 03:40:03 -0700151 "../test:test_common",
152 "../test:test_main",
tschumim9d117642017-07-17 01:41:41 -0700153 "//testing/gmock",
154 "//testing/gtest",
oprypin92220ff2017-03-23 03:40:03 -0700155 ]
kjellander8f8d1a02017-03-06 04:01:16 -0800156 if (is_android) {
oprypin92220ff2017-03-23 03:40:03 -0700157 deps += [ "//testing/android/native_test:native_test_native_code" ]
158 }
159
160 data = [
Edward Lemur20110752017-09-28 16:14:37 +0200161 "../resources/voice_engine/audio_dtx16.wav",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200162 "../resources/voice_engine/audio_tiny16.wav",
163 "../resources/voice_engine/audio_tiny48.wav",
Edward Lemur20110752017-09-28 16:14:37 +0200164 "test/low_bandwidth_audio_test.py",
oprypin92220ff2017-03-23 03:40:03 -0700165 ]
Edward Lemur20110752017-09-28 16:14:37 +0200166 if (is_linux) {
167 data += [
168 "../tools_webrtc/audio_quality/linux/PolqaOem64",
169 "../tools_webrtc/audio_quality/linux/pesq",
170 ]
171 }
172 if (is_win) {
173 data += [
174 "../tools_webrtc/audio_quality/win/PolqaOem64.dll",
175 "../tools_webrtc/audio_quality/win/PolqaOem64.exe",
176 "../tools_webrtc/audio_quality/win/pesq.exe",
177 "../tools_webrtc/audio_quality/win/vcomp120.dll",
178 ]
179 }
180 if (is_mac) {
181 data += [ "../tools_webrtc/audio_quality/mac/pesq" ]
182 }
oprypin92220ff2017-03-23 03:40:03 -0700183
184 if (!build_with_chromium && is_clang) {
185 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163)
186 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander8f8d1a02017-03-06 04:01:16 -0800187 }
188 }
189 }
tschumim9d117642017-07-17 01:41:41 -0700190
191 rtc_source_set("audio_perf_tests") {
192 testonly = true
193
tschumim9d117642017-07-17 01:41:41 -0700194 sources = [
195 "test/audio_bwe_integration_test.cc",
196 "test/audio_bwe_integration_test.h",
197 ]
198 deps = [
tschumim9d117642017-07-17 01:41:41 -0700199 "../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700200 "../rtc_base:rtc_base_approved",
tschumim9d117642017-07-17 01:41:41 -0700201 "../system_wrappers",
202 "../test:fake_audio_device",
203 "../test:field_trial",
eladalon413ee9a2017-08-22 04:02:52 -0700204 "../test:single_threaded_task_queue",
tschumim9d117642017-07-17 01:41:41 -0700205 "../test:test_common",
206 "../test:test_main",
207 "//testing/gmock",
208 "//testing/gtest",
tschumim9d117642017-07-17 01:41:41 -0700209 ]
210
211 data = [
212 "//resources/voice_engine/audio_dtx16.wav",
213 ]
214
215 if (!build_with_chromium && is_clang) {
216 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
217 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
218 }
219 }
Peter Boström02083222016-06-14 12:52:54 +0200220}