Peter Boström | 5c389d3 | 2015-09-25 13:58:30 +0200 | [diff] [blame] | 1 | # 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 | |
mbonadei | 9aa3f0a | 2017-01-24 06:58:22 -0800 | [diff] [blame] | 9 | import("../webrtc.gni") |
kjellander | 8f8d1a0 | 2017-03-06 04:01:16 -0800 | [diff] [blame] | 10 | if (is_android) { |
| 11 | import("//build/config/android/config.gni") |
| 12 | import("//build/config/android/rules.gni") |
| 13 | } |
Peter Boström | 5c389d3 | 2015-09-25 13:58:30 +0200 | [diff] [blame] | 14 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 15 | rtc_static_library("audio") { |
Peter Boström | 5c389d3 | 2015-09-25 13:58:30 +0200 | [diff] [blame] | 16 | sources = [ |
| 17 | "audio_receive_stream.cc", |
| 18 | "audio_receive_stream.h", |
solenberg | c7a8b08 | 2015-10-16 14:35:07 -0700 | [diff] [blame] | 19 | "audio_send_stream.cc", |
| 20 | "audio_send_stream.h", |
solenberg | 566ef24 | 2015-11-06 15:34:49 -0800 | [diff] [blame] | 21 | "audio_state.cc", |
| 22 | "audio_state.h", |
aleloi | dd31071 | 2016-11-17 06:28:59 -0800 | [diff] [blame] | 23 | "audio_transport_proxy.cc", |
| 24 | "audio_transport_proxy.h", |
Fredrik Solenberg | 4f4ec0a | 2015-10-22 10:49:27 +0200 | [diff] [blame] | 25 | "conversion.h", |
henrika | 5f6bf24 | 2017-11-01 11:06:56 +0100 | [diff] [blame^] | 26 | "null_audio_poller.cc", |
| 27 | "null_audio_poller.h", |
Fredrik Solenberg | 4f4ec0a | 2015-10-22 10:49:27 +0200 | [diff] [blame] | 28 | "scoped_voe_interface.h", |
saza | c58f8c0 | 2017-07-19 00:39:19 -0700 | [diff] [blame] | 29 | "time_interval.cc", |
| 30 | "time_interval.h", |
Peter Boström | 5c389d3 | 2015-09-25 13:58:30 +0200 | [diff] [blame] | 31 | ] |
| 32 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 33 | if (!build_with_chromium && is_clang) { |
| 34 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 35 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
Peter Boström | 5c389d3 | 2015-09-25 13:58:30 +0200 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | deps = [ |
| 39 | "..:webrtc_common", |
aleloi | aed581a | 2016-10-20 06:32:39 -0700 | [diff] [blame] | 40 | "../api:audio_mixer_api", |
kjellander | 676e08f | 2016-12-07 08:23:27 -0800 | [diff] [blame] | 41 | "../api:call_api", |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 42 | "../api:optional", |
ossu | eb1fde4 | 2017-05-02 06:46:30 -0700 | [diff] [blame] | 43 | "../api/audio_codecs:audio_codecs_api", |
| 44 | "../api/audio_codecs:builtin_audio_encoder_factory", |
Mirko Bonadei | 245660a | 2017-10-10 14:38:11 +0200 | [diff] [blame] | 45 | "../call:bitrate_allocator", |
ossu | f515ab8 | 2016-12-07 04:52:58 -0800 | [diff] [blame] | 46 | "../call:call_interfaces", |
nisse | d76b7b2 | 2017-06-01 04:02:35 -0700 | [diff] [blame] | 47 | "../call:rtp_interfaces", |
aleloi | 04c0722 | 2016-11-22 06:42:53 -0800 | [diff] [blame] | 48 | "../common_audio", |
ossu | 20a4b3f | 2017-04-27 02:08:52 -0700 | [diff] [blame] | 49 | "../modules/audio_coding:cng", |
aleloi | dd31071 | 2016-11-17 06:28:59 -0800 | [diff] [blame] | 50 | "../modules/audio_device", |
| 51 | "../modules/audio_processing", |
stefan | 7de8d64 | 2017-02-07 07:14:08 -0800 | [diff] [blame] | 52 | "../modules/bitrate_controller:bitrate_controller", |
kjellander | 676e08f | 2016-12-07 08:23:27 -0800 | [diff] [blame] | 53 | "../modules/congestion_controller:congestion_controller", |
| 54 | "../modules/pacing:pacing", |
| 55 | "../modules/remote_bitrate_estimator:remote_bitrate_estimator", |
| 56 | "../modules/rtp_rtcp:rtp_rtcp", |
henrika | 5f6bf24 | 2017-11-01 11:06:56 +0100 | [diff] [blame^] | 57 | "../rtc_base:rtc_base", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 58 | "../rtc_base:rtc_base_approved", |
| 59 | "../rtc_base:rtc_task_queue", |
Peter Boström | 5c389d3 | 2015-09-25 13:58:30 +0200 | [diff] [blame] | 60 | "../system_wrappers", |
Tommi | f888bb5 | 2015-12-12 01:37:01 +0100 | [diff] [blame] | 61 | "../voice_engine", |
Peter Boström | 5c389d3 | 2015-09-25 13:58:30 +0200 | [diff] [blame] | 62 | ] |
| 63 | } |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 64 | if (rtc_include_tests) { |
Fredrik Solenberg | 73276ad | 2017-09-14 14:46:47 +0200 | [diff] [blame] | 65 | 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 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 86 | rtc_source_set("audio_tests") { |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 87 | testonly = true |
kjellander | 676e08f | 2016-12-07 08:23:27 -0800 | [diff] [blame] | 88 | |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 89 | # Skip restricting visibility on mobile platforms since the tests on those |
| 90 | # gets additional generated targets which would require many lines here to |
| 91 | # cover (which would be confusing to read and hard to maintain). |
| 92 | if (!is_android && !is_ios) { |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 93 | visibility = [ "..:video_engine_tests" ] |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 94 | } |
| 95 | |
kjellander | 676e08f | 2016-12-07 08:23:27 -0800 | [diff] [blame] | 96 | # TODO(kjellander): Remove (bugs.webrtc.org/6828) |
| 97 | # This needs remote_bitrate_estimator to be moved to webrtc/api first. |
| 98 | check_includes = false |
| 99 | |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 100 | sources = [ |
| 101 | "audio_receive_stream_unittest.cc", |
solenberg | 18f5427 | 2017-09-15 09:56:08 -0700 | [diff] [blame] | 102 | "audio_send_stream_tests.cc", |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 103 | "audio_send_stream_unittest.cc", |
| 104 | "audio_state_unittest.cc", |
saza | c58f8c0 | 2017-07-19 00:39:19 -0700 | [diff] [blame] | 105 | "time_interval_unittest.cc", |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 106 | ] |
| 107 | deps = [ |
| 108 | ":audio", |
Fredrik Solenberg | 73276ad | 2017-09-14 14:46:47 +0200 | [diff] [blame] | 109 | ":audio_end_to_end_test", |
aleloi | 04c0722 | 2016-11-22 06:42:53 -0800 | [diff] [blame] | 110 | "../api:mock_audio_mixer", |
nisse | 0f15f92 | 2017-06-21 01:05:22 -0700 | [diff] [blame] | 111 | "../call:rtp_receiver", |
aleloi | dd31071 | 2016-11-17 06:28:59 -0800 | [diff] [blame] | 112 | "../modules/audio_device:mock_audio_device", |
aleloi | 04c0722 | 2016-11-22 06:42:53 -0800 | [diff] [blame] | 113 | "../modules/audio_mixer:audio_mixer_impl", |
kjellander | 676e08f | 2016-12-07 08:23:27 -0800 | [diff] [blame] | 114 | "../modules/congestion_controller:congestion_controller", |
zstein | 7cb69d5 | 2017-05-08 11:52:38 -0700 | [diff] [blame] | 115 | "../modules/congestion_controller:mock_congestion_controller", |
kjellander | 676e08f | 2016-12-07 08:23:27 -0800 | [diff] [blame] | 116 | "../modules/pacing:pacing", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 117 | "../rtc_base:rtc_base_approved", |
| 118 | "../rtc_base:rtc_task_queue", |
aleloi | 10111bc | 2016-11-17 06:48:48 -0800 | [diff] [blame] | 119 | "../test:test_common", |
aleloi | 6321b49 | 2016-12-05 01:46:09 -0800 | [diff] [blame] | 120 | "../test:test_support", |
ehmaldonado | 894c2bb | 2017-01-05 06:03:24 -0800 | [diff] [blame] | 121 | "utility:utility_tests", |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 122 | "//testing/gmock", |
| 123 | "//testing/gtest", |
| 124 | ] |
oprypin | 5e1ca78 | 2017-03-20 02:06:18 -0700 | [diff] [blame] | 125 | |
Fredrik Solenberg | 73276ad | 2017-09-14 14:46:47 +0200 | [diff] [blame] | 126 | 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 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 131 | if (!build_with_chromium && is_clang) { |
| 132 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 133 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 134 | } |
| 135 | } |
kjellander | 8f8d1a0 | 2017-03-06 04:01:16 -0800 | [diff] [blame] | 136 | |
| 137 | if (rtc_enable_protobuf) { |
oprypin | 6d305ba | 2017-03-30 04:01:30 -0700 | [diff] [blame] | 138 | rtc_test("low_bandwidth_audio_test") { |
kjellander | 8f8d1a0 | 2017-03-06 04:01:16 -0800 | [diff] [blame] | 139 | testonly = true |
| 140 | |
| 141 | sources = [ |
| 142 | "test/low_bandwidth_audio_test.cc", |
| 143 | ] |
| 144 | |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 145 | deps = [ |
Fredrik Solenberg | 73276ad | 2017-09-14 14:46:47 +0200 | [diff] [blame] | 146 | ":audio_end_to_end_test", |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 147 | "../common_audio", |
oprypin | 9b2f20c | 2017-08-29 05:51:57 -0700 | [diff] [blame] | 148 | "../rtc_base:rtc_base_approved", |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 149 | "../system_wrappers", |
| 150 | "../test:fake_audio_device", |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 151 | "../test:test_common", |
| 152 | "../test:test_main", |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 153 | "//testing/gmock", |
| 154 | "//testing/gtest", |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 155 | ] |
kjellander | 8f8d1a0 | 2017-03-06 04:01:16 -0800 | [diff] [blame] | 156 | if (is_android) { |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 157 | deps += [ "//testing/android/native_test:native_test_native_code" ] |
| 158 | } |
| 159 | |
| 160 | data = [ |
Edward Lemur | 2011075 | 2017-09-28 16:14:37 +0200 | [diff] [blame] | 161 | "../resources/voice_engine/audio_dtx16.wav", |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 162 | "../resources/voice_engine/audio_tiny16.wav", |
| 163 | "../resources/voice_engine/audio_tiny48.wav", |
Edward Lemur | 2011075 | 2017-09-28 16:14:37 +0200 | [diff] [blame] | 164 | "test/low_bandwidth_audio_test.py", |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 165 | ] |
Edward Lemur | 2011075 | 2017-09-28 16:14:37 +0200 | [diff] [blame] | 166 | 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 | } |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 183 | |
| 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" ] |
kjellander | 8f8d1a0 | 2017-03-06 04:01:16 -0800 | [diff] [blame] | 187 | } |
| 188 | } |
| 189 | } |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 190 | |
| 191 | rtc_source_set("audio_perf_tests") { |
| 192 | testonly = true |
| 193 | |
| 194 | # Skip restricting visibility on mobile platforms since the tests on those |
| 195 | # gets additional generated targets which would require many lines here to |
| 196 | # cover (which would be confusing to read and hard to maintain). |
| 197 | if (!is_android && !is_ios) { |
Jianjun Zhu | 037f3e4 | 2017-08-15 21:48:37 +0800 | [diff] [blame] | 198 | visibility = [ "..:webrtc_perf_tests" ] |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 199 | } |
| 200 | sources = [ |
| 201 | "test/audio_bwe_integration_test.cc", |
| 202 | "test/audio_bwe_integration_test.h", |
| 203 | ] |
| 204 | deps = [ |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 205 | "../common_audio", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 206 | "../rtc_base:rtc_base_approved", |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 207 | "../system_wrappers", |
| 208 | "../test:fake_audio_device", |
| 209 | "../test:field_trial", |
eladalon | 413ee9a | 2017-08-22 04:02:52 -0700 | [diff] [blame] | 210 | "../test:single_threaded_task_queue", |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 211 | "../test:test_common", |
| 212 | "../test:test_main", |
| 213 | "//testing/gmock", |
| 214 | "//testing/gtest", |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 215 | ] |
| 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öm | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 226 | } |