blob: a75d8ef4dcc95542ec2f38411b5a090d20b5124f [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",
26 "scoped_voe_interface.h",
sazac58f8c02017-07-19 00:39:19 -070027 "time_interval.cc",
28 "time_interval.h",
Peter Boström5c389d32015-09-25 13:58:30 +020029 ]
30
kjellandere40a7ee2016-10-16 23:56:12 -070031 if (!build_with_chromium && is_clang) {
32 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070033 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström5c389d32015-09-25 13:58:30 +020034 }
35
36 deps = [
37 "..:webrtc_common",
aleloiaed581a2016-10-20 06:32:39 -070038 "../api:audio_mixer_api",
kjellander676e08f2016-12-07 08:23:27 -080039 "../api:call_api",
ossueb1fde42017-05-02 06:46:30 -070040 "../api/audio_codecs:audio_codecs_api",
41 "../api/audio_codecs:builtin_audio_encoder_factory",
ossuf515ab82016-12-07 04:52:58 -080042 "../call:call_interfaces",
nissed76b7b22017-06-01 04:02:35 -070043 "../call:rtp_interfaces",
aleloi04c07222016-11-22 06:42:53 -080044 "../common_audio",
ossu20a4b3f2017-04-27 02:08:52 -070045 "../modules/audio_coding:cng",
aleloidd310712016-11-17 06:28:59 -080046 "../modules/audio_device",
47 "../modules/audio_processing",
stefan7de8d642017-02-07 07:14:08 -080048 "../modules/bitrate_controller:bitrate_controller",
kjellander676e08f2016-12-07 08:23:27 -080049 "../modules/congestion_controller:congestion_controller",
50 "../modules/pacing:pacing",
51 "../modules/remote_bitrate_estimator:remote_bitrate_estimator",
52 "../modules/rtp_rtcp:rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -070053 "../rtc_base:rtc_base_approved",
54 "../rtc_base:rtc_task_queue",
Peter Boström5c389d32015-09-25 13:58:30 +020055 "../system_wrappers",
Tommif888bb52015-12-12 01:37:01 +010056 "../voice_engine",
Peter Boström5c389d32015-09-25 13:58:30 +020057 ]
58}
Peter Boström02083222016-06-14 12:52:54 +020059if (rtc_include_tests) {
ehmaldonado38a21322016-09-02 04:10:34 -070060 rtc_source_set("audio_tests") {
Peter Boström02083222016-06-14 12:52:54 +020061 testonly = true
kjellander676e08f2016-12-07 08:23:27 -080062
kjellandere0629c02017-04-25 04:04:50 -070063 # Skip restricting visibility on mobile platforms since the tests on those
64 # gets additional generated targets which would require many lines here to
65 # cover (which would be confusing to read and hard to maintain).
66 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -070067 visibility = [ "..:video_engine_tests" ]
kjellandere0629c02017-04-25 04:04:50 -070068 }
69
kjellander676e08f2016-12-07 08:23:27 -080070 # TODO(kjellander): Remove (bugs.webrtc.org/6828)
71 # This needs remote_bitrate_estimator to be moved to webrtc/api first.
72 check_includes = false
73
Peter Boström02083222016-06-14 12:52:54 +020074 sources = [
75 "audio_receive_stream_unittest.cc",
76 "audio_send_stream_unittest.cc",
77 "audio_state_unittest.cc",
sazac58f8c02017-07-19 00:39:19 -070078 "time_interval_unittest.cc",
Peter Boström02083222016-06-14 12:52:54 +020079 ]
80 deps = [
81 ":audio",
aleloi04c07222016-11-22 06:42:53 -080082 "../api:mock_audio_mixer",
nisse0f15f922017-06-21 01:05:22 -070083 "../call:rtp_receiver",
aleloidd310712016-11-17 06:28:59 -080084 "../modules/audio_device:mock_audio_device",
aleloi04c07222016-11-22 06:42:53 -080085 "../modules/audio_mixer:audio_mixer_impl",
kjellander676e08f2016-12-07 08:23:27 -080086 "../modules/congestion_controller:congestion_controller",
zstein7cb69d52017-05-08 11:52:38 -070087 "../modules/congestion_controller:mock_congestion_controller",
kjellander676e08f2016-12-07 08:23:27 -080088 "../modules/pacing:pacing",
ehmaldonadof6a861a2017-07-19 10:40:47 -070089 "../rtc_base:rtc_base_approved",
90 "../rtc_base:rtc_task_queue",
aleloi10111bc2016-11-17 06:48:48 -080091 "../test:test_common",
aleloi6321b492016-12-05 01:46:09 -080092 "../test:test_support",
ehmaldonado894c2bb2017-01-05 06:03:24 -080093 "utility:utility_tests",
Peter Boström02083222016-06-14 12:52:54 +020094 "//testing/gmock",
95 "//testing/gtest",
96 ]
oprypin5e1ca782017-03-20 02:06:18 -070097
kjellandere40a7ee2016-10-16 23:56:12 -070098 if (!build_with_chromium && is_clang) {
99 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700100 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström02083222016-06-14 12:52:54 +0200101 }
102 }
kjellander8f8d1a02017-03-06 04:01:16 -0800103
104 if (rtc_enable_protobuf) {
oprypin6d305ba2017-03-30 04:01:30 -0700105 rtc_test("low_bandwidth_audio_test") {
kjellander8f8d1a02017-03-06 04:01:16 -0800106 testonly = true
107
108 sources = [
109 "test/low_bandwidth_audio_test.cc",
oprypin92220ff2017-03-23 03:40:03 -0700110 "test/low_bandwidth_audio_test.h",
kjellander8f8d1a02017-03-06 04:01:16 -0800111 ]
112
oprypin92220ff2017-03-23 03:40:03 -0700113 deps = [
114 "../common_audio",
115 "../system_wrappers",
116 "../test:fake_audio_device",
oprypin92220ff2017-03-23 03:40:03 -0700117 "../test:test_common",
118 "../test:test_main",
tschumim9d117642017-07-17 01:41:41 -0700119 "//testing/gmock",
120 "//testing/gtest",
oprypinf2501002017-04-12 05:00:56 -0700121 "//third_party/gflags",
oprypin92220ff2017-03-23 03:40:03 -0700122 ]
kjellander8f8d1a02017-03-06 04:01:16 -0800123 if (is_android) {
oprypin92220ff2017-03-23 03:40:03 -0700124 deps += [ "//testing/android/native_test:native_test_native_code" ]
125 }
126
127 data = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700128 "../../resources/voice_engine/audio_tiny16.wav",
129 "../../resources/voice_engine/audio_tiny48.wav",
tschumim9d117642017-07-17 01:41:41 -0700130 "../../resources/voice_engine/audio_dtx16.wav",
oprypin92220ff2017-03-23 03:40:03 -0700131 ]
132
133 if (!build_with_chromium && is_clang) {
134 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163)
135 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander8f8d1a02017-03-06 04:01:16 -0800136 }
137 }
138 }
tschumim9d117642017-07-17 01:41:41 -0700139
140 rtc_source_set("audio_perf_tests") {
141 testonly = true
142
143 # Skip restricting visibility on mobile platforms since the tests on those
144 # gets additional generated targets which would require many lines here to
145 # cover (which would be confusing to read and hard to maintain).
146 if (!is_android && !is_ios) {
147 visibility = [ "//webrtc:webrtc_perf_tests" ]
148 }
149 sources = [
150 "test/audio_bwe_integration_test.cc",
151 "test/audio_bwe_integration_test.h",
152 ]
153 deps = [
tschumim9d117642017-07-17 01:41:41 -0700154 "../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700155 "../rtc_base:rtc_base_approved",
tschumim9d117642017-07-17 01:41:41 -0700156 "../system_wrappers",
157 "../test:fake_audio_device",
158 "../test:field_trial",
159 "../test:test_common",
160 "../test:test_main",
161 "//testing/gmock",
162 "//testing/gtest",
163 "//third_party/gflags",
164 ]
165
166 data = [
167 "//resources/voice_engine/audio_dtx16.wav",
168 ]
169
170 if (!build_with_chromium && is_clang) {
171 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
172 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
173 }
174 }
Peter Boström02083222016-06-14 12:52:54 +0200175}