blob: 84593858e7b053f9445bf908d90c1d0627ac50e8 [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 = [
17 "audio_receive_stream.cc",
18 "audio_receive_stream.h",
solenbergc7a8b082015-10-16 21:35:0719 "audio_send_stream.cc",
20 "audio_send_stream.h",
solenberg566ef242015-11-06 23:34:4921 "audio_state.cc",
22 "audio_state.h",
Fredrik Solenberg2a877972017-12-15 15:42:1523 "audio_transport_impl.cc",
24 "audio_transport_impl.h",
Fredrik Solenberg4f4ec0a2015-10-22 08:49:2725 "conversion.h",
henrika5f6bf242017-11-01 10:06:5626 "null_audio_poller.cc",
27 "null_audio_poller.h",
Fredrik Solenberg4f4ec0a2015-10-22 08:49:2728 "scoped_voe_interface.h",
sazac58f8c02017-07-19 07:39:1929 "time_interval.cc",
30 "time_interval.h",
Peter Boström5c389d32015-09-25 11:58:3031 ]
32
kjellandere40a7ee2016-10-17 06:56:1233 if (!build_with_chromium && is_clang) {
34 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 11:10:3435 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström5c389d32015-09-25 11:58:3036 }
37
38 deps = [
39 "..:webrtc_common",
aleloiaed581a2016-10-20 13:32:3940 "../api:audio_mixer_api",
kjellander676e08f2016-12-07 16:23:2741 "../api:call_api",
kwiberg84f6a3f2017-09-05 15:43:1342 "../api:optional",
ossueb1fde42017-05-02 13:46:3043 "../api/audio_codecs:audio_codecs_api",
44 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadei245660a2017-10-10 12:38:1145 "../call:bitrate_allocator",
ossuf515ab82016-12-07 12:52:5846 "../call:call_interfaces",
nissed76b7b22017-06-01 11:02:3547 "../call:rtp_interfaces",
aleloi04c07222016-11-22 14:42:5348 "../common_audio",
ossu20a4b3f2017-04-27 09:08:5249 "../modules/audio_coding:cng",
aleloidd310712016-11-17 14:28:5950 "../modules/audio_device",
51 "../modules/audio_processing",
stefan7de8d642017-02-07 15:14:0852 "../modules/bitrate_controller:bitrate_controller",
kjellander676e08f2016-12-07 16:23:2753 "../modules/congestion_controller:congestion_controller",
54 "../modules/pacing:pacing",
55 "../modules/remote_bitrate_estimator:remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 06:51:3356 "../modules/rtp_rtcp",
Patrik Höglunda8005cf2017-12-13 15:05:4257 "../rtc_base:checks",
henrika5f6bf242017-11-01 10:06:5658 "../rtc_base:rtc_base",
ehmaldonadof6a861a2017-07-19 17:40:4759 "../rtc_base:rtc_base_approved",
60 "../rtc_base:rtc_task_queue",
Peter Boström5c389d32015-09-25 11:58:3061 "../system_wrappers",
Alex Narestcedd3512017-12-07 19:54:5562 "../system_wrappers:field_trial_api",
Tommif888bb52015-12-12 00:37:0163 "../voice_engine",
Fredrik Solenberg2a877972017-12-15 15:42:1564 "../voice_engine:audio_level",
65 "utility:audio_frame_operations",
Peter Boström5c389d32015-09-25 11:58:3066 ]
67}
Peter Boström02083222016-06-14 10:52:5468if (rtc_include_tests) {
Fredrik Solenberg73276ad2017-09-14 12:46:4769 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 11:10:3490 rtc_source_set("audio_tests") {
Peter Boström02083222016-06-14 10:52:5491 testonly = true
kjellander676e08f2016-12-07 16:23:2792
Peter Boström02083222016-06-14 10:52:5493 sources = [
94 "audio_receive_stream_unittest.cc",
solenberg18f54272017-09-15 16:56:0895 "audio_send_stream_tests.cc",
Peter Boström02083222016-06-14 10:52:5496 "audio_send_stream_unittest.cc",
97 "audio_state_unittest.cc",
sazac58f8c02017-07-19 07:39:1998 "time_interval_unittest.cc",
Peter Boström02083222016-06-14 10:52:5499 ]
100 deps = [
101 ":audio",
Fredrik Solenberg73276ad2017-09-14 12:46:47102 ":audio_end_to_end_test",
aleloi04c07222016-11-22 14:42:53103 "../api:mock_audio_mixer",
Fredrik Solenberg2a877972017-12-15 15:42:15104 "../call:mock_call_interfaces",
Patrik Höglundc0e68042017-11-13 16:04:05105 "../call:mock_rtp_interfaces",
106 "../call:rtp_interfaces",
nisse0f15f922017-06-21 08:05:22107 "../call:rtp_receiver",
aleloidd310712016-11-17 14:28:59108 "../modules/audio_device:mock_audio_device",
aleloi04c07222016-11-22 14:42:53109 "../modules/audio_mixer:audio_mixer_impl",
Ivo Creusen56d460902017-11-24 16:29:59110 "../modules/audio_processing:audio_processing_statistics",
kjellander676e08f2016-12-07 16:23:27111 "../modules/congestion_controller:congestion_controller",
zstein7cb69d52017-05-08 18:52:38112 "../modules/congestion_controller:mock_congestion_controller",
Patrik Höglundc0e68042017-11-13 16:04:05113 "../modules/pacing:mock_paced_sender",
kjellander676e08f2016-12-07 16:23:27114 "../modules/pacing:pacing",
Patrik Höglundc0e68042017-11-13 16:04:05115 "../modules/rtp_rtcp:mock_rtp_rtcp",
116 "../modules/rtp_rtcp:rtp_rtcp_format",
ehmaldonadof6a861a2017-07-19 17:40:47117 "../rtc_base:rtc_base_approved",
Patrik Höglundc0e68042017-11-13 16:04:05118 "../rtc_base:rtc_base_tests_utils",
ehmaldonadof6a861a2017-07-19 17:40:47119 "../rtc_base:rtc_task_queue",
Patrik Höglunda8005cf2017-12-13 15:05:42120 "../rtc_base:safe_compare",
Patrik Höglundc0e68042017-11-13 16:04:05121 "../system_wrappers:system_wrappers",
122 "../test:audio_codec_mocks",
123 "../test:rtp_test_utils",
aleloi10111bc2016-11-17 14:48:48124 "../test:test_common",
aleloi6321b492016-12-05 09:46:09125 "../test:test_support",
Patrik Höglundc0e68042017-11-13 16:04:05126 "../voice_engine",
ehmaldonado894c2bb2017-01-05 14:03:24127 "utility:utility_tests",
Peter Boström02083222016-06-14 10:52:54128 "//testing/gmock",
129 "//testing/gtest",
130 ]
oprypin5e1ca782017-03-20 09:06:18131
Fredrik Solenberg73276ad2017-09-14 12:46:47132 if (!rtc_use_memcheck) {
133 # This test is timing dependent, which rules out running on memcheck bots.
134 sources += [ "test/audio_stats_test.cc" ]
135 }
136
kjellandere40a7ee2016-10-17 06:56:12137 if (!build_with_chromium && is_clang) {
138 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 11:10:34139 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström02083222016-06-14 10:52:54140 }
141 }
kjellander8f8d1a02017-03-06 12:01:16142
143 if (rtc_enable_protobuf) {
oprypin6d305ba2017-03-30 11:01:30144 rtc_test("low_bandwidth_audio_test") {
kjellander8f8d1a02017-03-06 12:01:16145 testonly = true
146
147 sources = [
148 "test/low_bandwidth_audio_test.cc",
149 ]
150
oprypin92220ff2017-03-23 10:40:03151 deps = [
Fredrik Solenberg73276ad2017-09-14 12:46:47152 ":audio_end_to_end_test",
oprypin92220ff2017-03-23 10:40:03153 "../common_audio",
oprypin9b2f20c2017-08-29 12:51:57154 "../rtc_base:rtc_base_approved",
oprypin92220ff2017-03-23 10:40:03155 "../system_wrappers",
156 "../test:fake_audio_device",
oprypin92220ff2017-03-23 10:40:03157 "../test:test_common",
158 "../test:test_main",
tschumim9d117642017-07-17 08:41:41159 "//testing/gmock",
160 "//testing/gtest",
oprypin92220ff2017-03-23 10:40:03161 ]
kjellander8f8d1a02017-03-06 12:01:16162 if (is_android) {
oprypin92220ff2017-03-23 10:40:03163 deps += [ "//testing/android/native_test:native_test_native_code" ]
164 }
165
166 data = [
Edward Lemur20110752017-09-28 14:14:37167 "../resources/voice_engine/audio_dtx16.wav",
Mirko Bonadei92ea95e2017-09-15 04:47:31168 "../resources/voice_engine/audio_tiny16.wav",
169 "../resources/voice_engine/audio_tiny48.wav",
Edward Lemur20110752017-09-28 14:14:37170 "test/low_bandwidth_audio_test.py",
oprypin92220ff2017-03-23 10:40:03171 ]
Edward Lemur20110752017-09-28 14:14:37172 if (is_linux) {
173 data += [
174 "../tools_webrtc/audio_quality/linux/PolqaOem64",
175 "../tools_webrtc/audio_quality/linux/pesq",
176 ]
177 }
178 if (is_win) {
179 data += [
180 "../tools_webrtc/audio_quality/win/PolqaOem64.dll",
181 "../tools_webrtc/audio_quality/win/PolqaOem64.exe",
182 "../tools_webrtc/audio_quality/win/pesq.exe",
183 "../tools_webrtc/audio_quality/win/vcomp120.dll",
184 ]
185 }
186 if (is_mac) {
187 data += [ "../tools_webrtc/audio_quality/mac/pesq" ]
188 }
oprypin92220ff2017-03-23 10:40:03189
190 if (!build_with_chromium && is_clang) {
191 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163)
192 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander8f8d1a02017-03-06 12:01:16193 }
194 }
195 }
tschumim9d117642017-07-17 08:41:41196
197 rtc_source_set("audio_perf_tests") {
198 testonly = true
199
tschumim9d117642017-07-17 08:41:41200 sources = [
201 "test/audio_bwe_integration_test.cc",
202 "test/audio_bwe_integration_test.h",
203 ]
204 deps = [
tschumim9d117642017-07-17 08:41:41205 "../common_audio",
ehmaldonadof6a861a2017-07-19 17:40:47206 "../rtc_base:rtc_base_approved",
tschumim9d117642017-07-17 08:41:41207 "../system_wrappers",
208 "../test:fake_audio_device",
209 "../test:field_trial",
eladalon413ee9a2017-08-22 11:02:52210 "../test:single_threaded_task_queue",
tschumim9d117642017-07-17 08:41:41211 "../test:test_common",
212 "../test:test_main",
213 "//testing/gmock",
214 "//testing/gtest",
tschumim9d117642017-07-17 08:41:41215 ]
216
217 data = [
218 "//resources/voice_engine/audio_dtx16.wav",
219 ]
220
221 if (!build_with_chromium && is_clang) {
222 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
223 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
224 }
225 }
Peter Boström02083222016-06-14 10:52:54226}