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", |
Fredrik Solenberg | 2a87797 | 2017-12-15 16:42:15 +0100 | [diff] [blame] | 23 | "audio_transport_impl.cc", |
| 24 | "audio_transport_impl.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", |
Mirko Bonadei | b5728d9 | 2017-12-06 07:51:33 +0100 | [diff] [blame] | 56 | "../modules/rtp_rtcp", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 57 | "../rtc_base:checks", |
henrika | 5f6bf24 | 2017-11-01 11:06:56 +0100 | [diff] [blame] | 58 | "../rtc_base:rtc_base", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 59 | "../rtc_base:rtc_base_approved", |
| 60 | "../rtc_base:rtc_task_queue", |
Peter Boström | 5c389d3 | 2015-09-25 13:58:30 +0200 | [diff] [blame] | 61 | "../system_wrappers", |
Alex Narest | cedd351 | 2017-12-07 20:54:55 +0100 | [diff] [blame] | 62 | "../system_wrappers:field_trial_api", |
Tommi | f888bb5 | 2015-12-12 01:37:01 +0100 | [diff] [blame] | 63 | "../voice_engine", |
Fredrik Solenberg | 2a87797 | 2017-12-15 16:42:15 +0100 | [diff] [blame] | 64 | "../voice_engine:audio_level", |
| 65 | "utility:audio_frame_operations", |
Peter Boström | 5c389d3 | 2015-09-25 13:58:30 +0200 | [diff] [blame] | 66 | ] |
| 67 | } |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 68 | if (rtc_include_tests) { |
Fredrik Solenberg | 73276ad | 2017-09-14 14:46:47 +0200 | [diff] [blame] | 69 | 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 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 90 | rtc_source_set("audio_tests") { |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 91 | testonly = true |
kjellander | 676e08f | 2016-12-07 08:23:27 -0800 | [diff] [blame] | 92 | |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 93 | sources = [ |
| 94 | "audio_receive_stream_unittest.cc", |
solenberg | 18f5427 | 2017-09-15 09:56:08 -0700 | [diff] [blame] | 95 | "audio_send_stream_tests.cc", |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 96 | "audio_send_stream_unittest.cc", |
| 97 | "audio_state_unittest.cc", |
saza | c58f8c0 | 2017-07-19 00:39:19 -0700 | [diff] [blame] | 98 | "time_interval_unittest.cc", |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 99 | ] |
| 100 | deps = [ |
| 101 | ":audio", |
Fredrik Solenberg | 73276ad | 2017-09-14 14:46:47 +0200 | [diff] [blame] | 102 | ":audio_end_to_end_test", |
aleloi | 04c0722 | 2016-11-22 06:42:53 -0800 | [diff] [blame] | 103 | "../api:mock_audio_mixer", |
Fredrik Solenberg | 2a87797 | 2017-12-15 16:42:15 +0100 | [diff] [blame] | 104 | "../call:mock_call_interfaces", |
Patrik Höglund | c0e6804 | 2017-11-13 17:04:05 +0100 | [diff] [blame] | 105 | "../call:mock_rtp_interfaces", |
| 106 | "../call:rtp_interfaces", |
nisse | 0f15f92 | 2017-06-21 01:05:22 -0700 | [diff] [blame] | 107 | "../call:rtp_receiver", |
aleloi | dd31071 | 2016-11-17 06:28:59 -0800 | [diff] [blame] | 108 | "../modules/audio_device:mock_audio_device", |
aleloi | 04c0722 | 2016-11-22 06:42:53 -0800 | [diff] [blame] | 109 | "../modules/audio_mixer:audio_mixer_impl", |
Ivo Creusen | 56d4609 | 2017-11-24 17:29:59 +0100 | [diff] [blame] | 110 | "../modules/audio_processing:audio_processing_statistics", |
Patrik Höglund | 6213929 | 2017-12-19 16:44:45 +0100 | [diff] [blame] | 111 | "../modules/audio_processing:mocks", |
Patrik Höglund | 94dc177 | 2018-01-02 14:20:17 +0100 | [diff] [blame^] | 112 | "../modules/bitrate_controller:mocks", |
kjellander | 676e08f | 2016-12-07 08:23:27 -0800 | [diff] [blame] | 113 | "../modules/congestion_controller:congestion_controller", |
zstein | 7cb69d5 | 2017-05-08 11:52:38 -0700 | [diff] [blame] | 114 | "../modules/congestion_controller:mock_congestion_controller", |
Patrik Höglund | c0e6804 | 2017-11-13 17:04:05 +0100 | [diff] [blame] | 115 | "../modules/pacing:mock_paced_sender", |
kjellander | 676e08f | 2016-12-07 08:23:27 -0800 | [diff] [blame] | 116 | "../modules/pacing:pacing", |
Patrik Höglund | c0e6804 | 2017-11-13 17:04:05 +0100 | [diff] [blame] | 117 | "../modules/rtp_rtcp:mock_rtp_rtcp", |
| 118 | "../modules/rtp_rtcp:rtp_rtcp_format", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 119 | "../rtc_base:rtc_base_approved", |
Patrik Höglund | c0e6804 | 2017-11-13 17:04:05 +0100 | [diff] [blame] | 120 | "../rtc_base:rtc_base_tests_utils", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 121 | "../rtc_base:rtc_task_queue", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 122 | "../rtc_base:safe_compare", |
Patrik Höglund | c0e6804 | 2017-11-13 17:04:05 +0100 | [diff] [blame] | 123 | "../system_wrappers:system_wrappers", |
| 124 | "../test:audio_codec_mocks", |
| 125 | "../test:rtp_test_utils", |
aleloi | 10111bc | 2016-11-17 06:48:48 -0800 | [diff] [blame] | 126 | "../test:test_common", |
aleloi | 6321b49 | 2016-12-05 01:46:09 -0800 | [diff] [blame] | 127 | "../test:test_support", |
Patrik Höglund | c0e6804 | 2017-11-13 17:04:05 +0100 | [diff] [blame] | 128 | "../voice_engine", |
ehmaldonado | 894c2bb | 2017-01-05 06:03:24 -0800 | [diff] [blame] | 129 | "utility:utility_tests", |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 130 | "//testing/gmock", |
| 131 | "//testing/gtest", |
| 132 | ] |
oprypin | 5e1ca78 | 2017-03-20 02:06:18 -0700 | [diff] [blame] | 133 | |
Fredrik Solenberg | 73276ad | 2017-09-14 14:46:47 +0200 | [diff] [blame] | 134 | if (!rtc_use_memcheck) { |
| 135 | # This test is timing dependent, which rules out running on memcheck bots. |
| 136 | sources += [ "test/audio_stats_test.cc" ] |
| 137 | } |
| 138 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 139 | if (!build_with_chromium && is_clang) { |
| 140 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 141 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 142 | } |
| 143 | } |
kjellander | 8f8d1a0 | 2017-03-06 04:01:16 -0800 | [diff] [blame] | 144 | |
| 145 | if (rtc_enable_protobuf) { |
oprypin | 6d305ba | 2017-03-30 04:01:30 -0700 | [diff] [blame] | 146 | rtc_test("low_bandwidth_audio_test") { |
kjellander | 8f8d1a0 | 2017-03-06 04:01:16 -0800 | [diff] [blame] | 147 | testonly = true |
| 148 | |
| 149 | sources = [ |
| 150 | "test/low_bandwidth_audio_test.cc", |
| 151 | ] |
| 152 | |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 153 | deps = [ |
Fredrik Solenberg | 73276ad | 2017-09-14 14:46:47 +0200 | [diff] [blame] | 154 | ":audio_end_to_end_test", |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 155 | "../common_audio", |
oprypin | 9b2f20c | 2017-08-29 05:51:57 -0700 | [diff] [blame] | 156 | "../rtc_base:rtc_base_approved", |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 157 | "../system_wrappers", |
| 158 | "../test:fake_audio_device", |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 159 | "../test:test_common", |
| 160 | "../test:test_main", |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 161 | "//testing/gmock", |
| 162 | "//testing/gtest", |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 163 | ] |
kjellander | 8f8d1a0 | 2017-03-06 04:01:16 -0800 | [diff] [blame] | 164 | if (is_android) { |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 165 | deps += [ "//testing/android/native_test:native_test_native_code" ] |
| 166 | } |
| 167 | |
| 168 | data = [ |
Edward Lemur | 2011075 | 2017-09-28 16:14:37 +0200 | [diff] [blame] | 169 | "../resources/voice_engine/audio_dtx16.wav", |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 170 | "../resources/voice_engine/audio_tiny16.wav", |
| 171 | "../resources/voice_engine/audio_tiny48.wav", |
Edward Lemur | 2011075 | 2017-09-28 16:14:37 +0200 | [diff] [blame] | 172 | "test/low_bandwidth_audio_test.py", |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 173 | ] |
Edward Lemur | 2011075 | 2017-09-28 16:14:37 +0200 | [diff] [blame] | 174 | if (is_linux) { |
| 175 | data += [ |
| 176 | "../tools_webrtc/audio_quality/linux/PolqaOem64", |
| 177 | "../tools_webrtc/audio_quality/linux/pesq", |
| 178 | ] |
| 179 | } |
| 180 | if (is_win) { |
| 181 | data += [ |
| 182 | "../tools_webrtc/audio_quality/win/PolqaOem64.dll", |
| 183 | "../tools_webrtc/audio_quality/win/PolqaOem64.exe", |
| 184 | "../tools_webrtc/audio_quality/win/pesq.exe", |
| 185 | "../tools_webrtc/audio_quality/win/vcomp120.dll", |
| 186 | ] |
| 187 | } |
| 188 | if (is_mac) { |
| 189 | data += [ "../tools_webrtc/audio_quality/mac/pesq" ] |
| 190 | } |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 191 | |
| 192 | if (!build_with_chromium && is_clang) { |
| 193 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) |
| 194 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 8f8d1a0 | 2017-03-06 04:01:16 -0800 | [diff] [blame] | 195 | } |
| 196 | } |
| 197 | } |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 198 | |
| 199 | rtc_source_set("audio_perf_tests") { |
| 200 | testonly = true |
| 201 | |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 202 | sources = [ |
| 203 | "test/audio_bwe_integration_test.cc", |
| 204 | "test/audio_bwe_integration_test.h", |
| 205 | ] |
| 206 | deps = [ |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 207 | "../common_audio", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 208 | "../rtc_base:rtc_base_approved", |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 209 | "../system_wrappers", |
| 210 | "../test:fake_audio_device", |
| 211 | "../test:field_trial", |
eladalon | 413ee9a | 2017-08-22 04:02:52 -0700 | [diff] [blame] | 212 | "../test:single_threaded_task_queue", |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 213 | "../test:test_common", |
| 214 | "../test:test_main", |
| 215 | "//testing/gmock", |
| 216 | "//testing/gtest", |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 217 | ] |
| 218 | |
| 219 | data = [ |
| 220 | "//resources/voice_engine/audio_dtx16.wav", |
| 221 | ] |
| 222 | |
| 223 | if (!build_with_chromium && is_clang) { |
| 224 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 225 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 226 | } |
| 227 | } |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 228 | } |