blob: 0fd0ac8746aa967c0b9317cf466f29107f49de91 [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",
Fredrik Solenberg2a877972017-12-15 16:42:15 +010023 "audio_transport_impl.cc",
24 "audio_transport_impl.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",
Fredrik Solenberg2a877972017-12-15 16:42:15 +010064 "../voice_engine:audio_level",
65 "utility:audio_frame_operations",
Peter Boström5c389d32015-09-25 13:58:30 +020066 ]
67}
Peter Boström02083222016-06-14 12:52:54 +020068if (rtc_include_tests) {
Fredrik Solenberg73276ad2017-09-14 14:46:47 +020069 rtc_source_set("audio_end_to_end_test") {
70 testonly = true
71
72 sources = [
73 "test/audio_end_to_end_test.cc",
74 "test/audio_end_to_end_test.h",
75 ]
76 deps = [
77 ":audio",
78 "../system_wrappers:system_wrappers",
79 "../test:fake_audio_device",
80 "../test:test_common",
81 "../test:test_support",
82 ]
83
84 if (!build_with_chromium && is_clang) {
85 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
86 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
87 }
88 }
89
ehmaldonado38a21322016-09-02 04:10:34 -070090 rtc_source_set("audio_tests") {
Peter Boström02083222016-06-14 12:52:54 +020091 testonly = true
kjellander676e08f2016-12-07 08:23:27 -080092
Peter Boström02083222016-06-14 12:52:54 +020093 sources = [
94 "audio_receive_stream_unittest.cc",
solenberg18f54272017-09-15 09:56:08 -070095 "audio_send_stream_tests.cc",
Peter Boström02083222016-06-14 12:52:54 +020096 "audio_send_stream_unittest.cc",
97 "audio_state_unittest.cc",
sazac58f8c02017-07-19 00:39:19 -070098 "time_interval_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +020099 ]
100 deps = [
101 ":audio",
Fredrik Solenberg73276ad2017-09-14 14:46:47 +0200102 ":audio_end_to_end_test",
aleloi04c07222016-11-22 06:42:53 -0800103 "../api:mock_audio_mixer",
Fredrik Solenberg2a877972017-12-15 16:42:15 +0100104 "../call:mock_call_interfaces",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100105 "../call:mock_rtp_interfaces",
106 "../call:rtp_interfaces",
nisse0f15f922017-06-21 01:05:22 -0700107 "../call:rtp_receiver",
Patrik Höglund731082c2018-01-03 09:08:20 +0100108 "../logging:mocks",
aleloidd310712016-11-17 06:28:59 -0800109 "../modules/audio_device:mock_audio_device",
aleloi04c07222016-11-22 06:42:53 -0800110 "../modules/audio_mixer:audio_mixer_impl",
Ivo Creusen56d46092017-11-24 17:29:59 +0100111 "../modules/audio_processing:audio_processing_statistics",
Patrik Höglund62139292017-12-19 16:44:45 +0100112 "../modules/audio_processing:mocks",
Patrik Höglund94dc1772018-01-02 14:20:17 +0100113 "../modules/bitrate_controller:mocks",
kjellander676e08f2016-12-07 08:23:27 -0800114 "../modules/congestion_controller:congestion_controller",
zstein7cb69d52017-05-08 11:52:38 -0700115 "../modules/congestion_controller:mock_congestion_controller",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100116 "../modules/pacing:mock_paced_sender",
kjellander676e08f2016-12-07 08:23:27 -0800117 "../modules/pacing:pacing",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100118 "../modules/rtp_rtcp:mock_rtp_rtcp",
119 "../modules/rtp_rtcp:rtp_rtcp_format",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700120 "../rtc_base:rtc_base_approved",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100121 "../rtc_base:rtc_base_tests_utils",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700122 "../rtc_base:rtc_task_queue",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100123 "../rtc_base:safe_compare",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100124 "../system_wrappers:system_wrappers",
125 "../test:audio_codec_mocks",
126 "../test:rtp_test_utils",
aleloi10111bc2016-11-17 06:48:48 -0800127 "../test:test_common",
aleloi6321b492016-12-05 01:46:09 -0800128 "../test:test_support",
Patrik Höglundc0e68042017-11-13 17:04:05 +0100129 "../voice_engine",
ehmaldonado894c2bb2017-01-05 06:03:24 -0800130 "utility:utility_tests",
Peter Boström02083222016-06-14 12:52:54 +0200131 "//testing/gmock",
132 "//testing/gtest",
133 ]
oprypin5e1ca782017-03-20 02:06:18 -0700134
Fredrik Solenberg73276ad2017-09-14 14:46:47 +0200135 if (!rtc_use_memcheck) {
136 # This test is timing dependent, which rules out running on memcheck bots.
137 sources += [ "test/audio_stats_test.cc" ]
138 }
139
kjellandere40a7ee2016-10-16 23:56:12 -0700140 if (!build_with_chromium && is_clang) {
141 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700142 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström02083222016-06-14 12:52:54 +0200143 }
144 }
kjellander8f8d1a02017-03-06 04:01:16 -0800145
146 if (rtc_enable_protobuf) {
oprypin6d305ba2017-03-30 04:01:30 -0700147 rtc_test("low_bandwidth_audio_test") {
kjellander8f8d1a02017-03-06 04:01:16 -0800148 testonly = true
149
150 sources = [
151 "test/low_bandwidth_audio_test.cc",
152 ]
153
oprypin92220ff2017-03-23 03:40:03 -0700154 deps = [
Fredrik Solenberg73276ad2017-09-14 14:46:47 +0200155 ":audio_end_to_end_test",
oprypin92220ff2017-03-23 03:40:03 -0700156 "../common_audio",
oprypin9b2f20c2017-08-29 05:51:57 -0700157 "../rtc_base:rtc_base_approved",
oprypin92220ff2017-03-23 03:40:03 -0700158 "../system_wrappers",
159 "../test:fake_audio_device",
oprypin92220ff2017-03-23 03:40:03 -0700160 "../test:test_common",
161 "../test:test_main",
tschumim9d117642017-07-17 01:41:41 -0700162 "//testing/gmock",
163 "//testing/gtest",
oprypin92220ff2017-03-23 03:40:03 -0700164 ]
kjellander8f8d1a02017-03-06 04:01:16 -0800165 if (is_android) {
oprypin92220ff2017-03-23 03:40:03 -0700166 deps += [ "//testing/android/native_test:native_test_native_code" ]
167 }
168
169 data = [
Edward Lemur20110752017-09-28 16:14:37 +0200170 "../resources/voice_engine/audio_dtx16.wav",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200171 "../resources/voice_engine/audio_tiny16.wav",
172 "../resources/voice_engine/audio_tiny48.wav",
Edward Lemur20110752017-09-28 16:14:37 +0200173 "test/low_bandwidth_audio_test.py",
oprypin92220ff2017-03-23 03:40:03 -0700174 ]
Edward Lemur20110752017-09-28 16:14:37 +0200175 if (is_linux) {
176 data += [
177 "../tools_webrtc/audio_quality/linux/PolqaOem64",
178 "../tools_webrtc/audio_quality/linux/pesq",
179 ]
180 }
181 if (is_win) {
182 data += [
183 "../tools_webrtc/audio_quality/win/PolqaOem64.dll",
184 "../tools_webrtc/audio_quality/win/PolqaOem64.exe",
185 "../tools_webrtc/audio_quality/win/pesq.exe",
186 "../tools_webrtc/audio_quality/win/vcomp120.dll",
187 ]
188 }
189 if (is_mac) {
190 data += [ "../tools_webrtc/audio_quality/mac/pesq" ]
191 }
oprypin92220ff2017-03-23 03:40:03 -0700192
193 if (!build_with_chromium && is_clang) {
194 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163)
195 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander8f8d1a02017-03-06 04:01:16 -0800196 }
197 }
198 }
tschumim9d117642017-07-17 01:41:41 -0700199
200 rtc_source_set("audio_perf_tests") {
201 testonly = true
202
tschumim9d117642017-07-17 01:41:41 -0700203 sources = [
204 "test/audio_bwe_integration_test.cc",
205 "test/audio_bwe_integration_test.h",
206 ]
207 deps = [
tschumim9d117642017-07-17 01:41:41 -0700208 "../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700209 "../rtc_base:rtc_base_approved",
tschumim9d117642017-07-17 01:41:41 -0700210 "../system_wrappers",
211 "../test:fake_audio_device",
212 "../test:field_trial",
eladalon413ee9a2017-08-22 04:02:52 -0700213 "../test:single_threaded_task_queue",
tschumim9d117642017-07-17 01:41:41 -0700214 "../test:test_common",
215 "../test:test_main",
216 "//testing/gmock",
217 "//testing/gtest",
tschumim9d117642017-07-17 01:41:41 -0700218 ]
219
220 data = [
221 "//resources/voice_engine/audio_dtx16.wav",
222 ]
223
224 if (!build_with_chromium && is_clang) {
225 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
226 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
227 }
228 }
Peter Boström02083222016-06-14 12:52:54 +0200229}