blob: 65e3050b3469819b13214b419054107861060485 [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",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010057 "../rtc_base:checks",
henrika5f6bf242017-11-01 11:06:56 +010058 "../rtc_base:rtc_base",
ehmaldonadof6a861a2017-07-19 10:40:47 -070059 "../rtc_base:rtc_base_approved",
60 "../rtc_base:rtc_task_queue",
Peter Boström5c389d32015-09-25 13:58:30 +020061 "../system_wrappers",
Alex Narestcedd3512017-12-07 20:54:55 +010062 "../system_wrappers:field_trial_api",
Tommif888bb52015-12-12 01:37:01 +010063 "../voice_engine",
Peter Boström5c389d32015-09-25 13:58:30 +020064 ]
65}
Peter Boström02083222016-06-14 12:52:54 +020066if (rtc_include_tests) {
Fredrik Solenberg73276ad2017-09-14 14:46:47 +020067 rtc_source_set("audio_end_to_end_test") {
68 testonly = true
69
70 sources = [
71 "test/audio_end_to_end_test.cc",
72 "test/audio_end_to_end_test.h",
73 ]
74 deps = [
75 ":audio",
76 "../system_wrappers:system_wrappers",
77 "../test:fake_audio_device",
78 "../test:test_common",
79 "../test:test_support",
80 ]
81
82 if (!build_with_chromium && is_clang) {
83 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
84 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
85 }
86 }
87
ehmaldonado38a21322016-09-02 04:10:34 -070088 rtc_source_set("audio_tests") {
Peter Boström02083222016-06-14 12:52:54 +020089 testonly = true
kjellander676e08f2016-12-07 08:23:27 -080090
Peter Boström02083222016-06-14 12:52:54 +020091 sources = [
92 "audio_receive_stream_unittest.cc",
solenberg18f54272017-09-15 09:56:08 -070093 "audio_send_stream_tests.cc",
Peter Boström02083222016-06-14 12:52:54 +020094 "audio_send_stream_unittest.cc",
95 "audio_state_unittest.cc",
sazac58f8c02017-07-19 00:39:19 -070096 "time_interval_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +020097 ]
98 deps = [
99 ":audio",
Fredrik Solenberg73276ad2017-09-14 14:46:47 +0200100 ":audio_end_to_end_test",
aleloi04c07222016-11-22 06:42:53 -0800101 "../api:mock_audio_mixer",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100102 "../call:mock_rtp_interfaces",
103 "../call:rtp_interfaces",
nisse0f15f922017-06-21 01:05:22 -0700104 "../call:rtp_receiver",
aleloidd310712016-11-17 06:28:59 -0800105 "../modules/audio_device:mock_audio_device",
aleloi04c07222016-11-22 06:42:53 -0800106 "../modules/audio_mixer:audio_mixer_impl",
Ivo Creusen56d46092017-11-24 17:29:59 +0100107 "../modules/audio_processing:audio_processing_statistics",
kjellander676e08f2016-12-07 08:23:27 -0800108 "../modules/congestion_controller:congestion_controller",
zstein7cb69d52017-05-08 11:52:38 -0700109 "../modules/congestion_controller:mock_congestion_controller",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100110 "../modules/pacing:mock_paced_sender",
kjellander676e08f2016-12-07 08:23:27 -0800111 "../modules/pacing:pacing",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100112 "../modules/rtp_rtcp:mock_rtp_rtcp",
113 "../modules/rtp_rtcp:rtp_rtcp_format",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700114 "../rtc_base:rtc_base_approved",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100115 "../rtc_base:rtc_base_tests_utils",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700116 "../rtc_base:rtc_task_queue",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100117 "../rtc_base:safe_compare",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100118 "../system_wrappers:system_wrappers",
119 "../test:audio_codec_mocks",
120 "../test:rtp_test_utils",
aleloi10111bc2016-11-17 06:48:48 -0800121 "../test:test_common",
aleloi6321b492016-12-05 01:46:09 -0800122 "../test:test_support",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100123 "../voice_engine",
ehmaldonado894c2bb2017-01-05 06:03:24 -0800124 "utility:utility_tests",
Peter Boström02083222016-06-14 12:52:54 +0200125 "//testing/gmock",
126 "//testing/gtest",
127 ]
oprypin5e1ca782017-03-20 02:06:18 -0700128
Fredrik Solenberg73276ad2017-09-14 14:46:47 +0200129 if (!rtc_use_memcheck) {
130 # This test is timing dependent, which rules out running on memcheck bots.
131 sources += [ "test/audio_stats_test.cc" ]
132 }
133
kjellandere40a7ee2016-10-16 23:56:12 -0700134 if (!build_with_chromium && is_clang) {
135 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700136 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström02083222016-06-14 12:52:54 +0200137 }
138 }
kjellander8f8d1a02017-03-06 04:01:16 -0800139
140 if (rtc_enable_protobuf) {
oprypin6d305ba2017-03-30 04:01:30 -0700141 rtc_test("low_bandwidth_audio_test") {
kjellander8f8d1a02017-03-06 04:01:16 -0800142 testonly = true
143
144 sources = [
145 "test/low_bandwidth_audio_test.cc",
146 ]
147
oprypin92220ff2017-03-23 03:40:03 -0700148 deps = [
Fredrik Solenberg73276ad2017-09-14 14:46:47 +0200149 ":audio_end_to_end_test",
oprypin92220ff2017-03-23 03:40:03 -0700150 "../common_audio",
oprypin9b2f20c2017-08-29 05:51:57 -0700151 "../rtc_base:rtc_base_approved",
oprypin92220ff2017-03-23 03:40:03 -0700152 "../system_wrappers",
153 "../test:fake_audio_device",
oprypin92220ff2017-03-23 03:40:03 -0700154 "../test:test_common",
155 "../test:test_main",
tschumim9d117642017-07-17 01:41:41 -0700156 "//testing/gmock",
157 "//testing/gtest",
oprypin92220ff2017-03-23 03:40:03 -0700158 ]
kjellander8f8d1a02017-03-06 04:01:16 -0800159 if (is_android) {
oprypin92220ff2017-03-23 03:40:03 -0700160 deps += [ "//testing/android/native_test:native_test_native_code" ]
161 }
162
163 data = [
Edward Lemur20110752017-09-28 16:14:37 +0200164 "../resources/voice_engine/audio_dtx16.wav",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200165 "../resources/voice_engine/audio_tiny16.wav",
166 "../resources/voice_engine/audio_tiny48.wav",
Edward Lemur20110752017-09-28 16:14:37 +0200167 "test/low_bandwidth_audio_test.py",
oprypin92220ff2017-03-23 03:40:03 -0700168 ]
Edward Lemur20110752017-09-28 16:14:37 +0200169 if (is_linux) {
170 data += [
171 "../tools_webrtc/audio_quality/linux/PolqaOem64",
172 "../tools_webrtc/audio_quality/linux/pesq",
173 ]
174 }
175 if (is_win) {
176 data += [
177 "../tools_webrtc/audio_quality/win/PolqaOem64.dll",
178 "../tools_webrtc/audio_quality/win/PolqaOem64.exe",
179 "../tools_webrtc/audio_quality/win/pesq.exe",
180 "../tools_webrtc/audio_quality/win/vcomp120.dll",
181 ]
182 }
183 if (is_mac) {
184 data += [ "../tools_webrtc/audio_quality/mac/pesq" ]
185 }
oprypin92220ff2017-03-23 03:40:03 -0700186
187 if (!build_with_chromium && is_clang) {
188 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163)
189 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander8f8d1a02017-03-06 04:01:16 -0800190 }
191 }
192 }
tschumim9d117642017-07-17 01:41:41 -0700193
194 rtc_source_set("audio_perf_tests") {
195 testonly = true
196
tschumim9d117642017-07-17 01:41:41 -0700197 sources = [
198 "test/audio_bwe_integration_test.cc",
199 "test/audio_bwe_integration_test.h",
200 ]
201 deps = [
tschumim9d117642017-07-17 01:41:41 -0700202 "../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700203 "../rtc_base:rtc_base_approved",
tschumim9d117642017-07-17 01:41:41 -0700204 "../system_wrappers",
205 "../test:fake_audio_device",
206 "../test:field_trial",
eladalon413ee9a2017-08-22 04:02:52 -0700207 "../test:single_threaded_task_queue",
tschumim9d117642017-07-17 01:41:41 -0700208 "../test:test_common",
209 "../test:test_main",
210 "//testing/gmock",
211 "//testing/gtest",
tschumim9d117642017-07-17 01:41:41 -0700212 ]
213
214 data = [
215 "//resources/voice_engine/audio_dtx16.wav",
216 ]
217
218 if (!build_with_chromium && is_clang) {
219 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
220 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
221 }
222 }
Peter Boström02083222016-06-14 12:52:54 +0200223}