Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [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 14:58:22 | [diff] [blame] | 9 | import("../webrtc.gni") |
kjellander | 8f8d1a0 | 2017-03-06 12:01:16 | [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 11:58:30 | [diff] [blame] | 14 | |
kjellander | b62dbbe | 2016-09-23 07:38:52 | [diff] [blame] | 15 | rtc_static_library("audio") { |
Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [diff] [blame] | 16 | sources = [ |
| 17 | "audio_receive_stream.cc", |
| 18 | "audio_receive_stream.h", |
solenberg | c7a8b08 | 2015-10-16 21:35:07 | [diff] [blame] | 19 | "audio_send_stream.cc", |
| 20 | "audio_send_stream.h", |
solenberg | 566ef24 | 2015-11-06 23:34:49 | [diff] [blame] | 21 | "audio_state.cc", |
| 22 | "audio_state.h", |
Fredrik Solenberg | 2a87797 | 2017-12-15 15:42:15 | [diff] [blame] | 23 | "audio_transport_impl.cc", |
| 24 | "audio_transport_impl.h", |
Fredrik Solenberg | 4f4ec0a | 2015-10-22 08:49:27 | [diff] [blame] | 25 | "conversion.h", |
henrika | 5f6bf24 | 2017-11-01 10:06:56 | [diff] [blame] | 26 | "null_audio_poller.cc", |
| 27 | "null_audio_poller.h", |
Fredrik Solenberg | 4f4ec0a | 2015-10-22 08:49:27 | [diff] [blame] | 28 | "scoped_voe_interface.h", |
saza | c58f8c0 | 2017-07-19 07:39:19 | [diff] [blame] | 29 | "time_interval.cc", |
| 30 | "time_interval.h", |
Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [diff] [blame] | 31 | ] |
| 32 | |
kjellander | e40a7ee | 2016-10-17 06:56:12 | [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 11:10:34 | [diff] [blame] | 35 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | deps = [ |
| 39 | "..:webrtc_common", |
aleloi | aed581a | 2016-10-20 13:32:39 | [diff] [blame] | 40 | "../api:audio_mixer_api", |
kjellander | 676e08f | 2016-12-07 16:23:27 | [diff] [blame] | 41 | "../api:call_api", |
kwiberg | 84f6a3f | 2017-09-05 15:43:13 | [diff] [blame] | 42 | "../api:optional", |
ossu | eb1fde4 | 2017-05-02 13:46:30 | [diff] [blame] | 43 | "../api/audio_codecs:audio_codecs_api", |
| 44 | "../api/audio_codecs:builtin_audio_encoder_factory", |
Mirko Bonadei | 245660a | 2017-10-10 12:38:11 | [diff] [blame] | 45 | "../call:bitrate_allocator", |
ossu | f515ab8 | 2016-12-07 12:52:58 | [diff] [blame] | 46 | "../call:call_interfaces", |
nisse | d76b7b2 | 2017-06-01 11:02:35 | [diff] [blame] | 47 | "../call:rtp_interfaces", |
aleloi | 04c0722 | 2016-11-22 14:42:53 | [diff] [blame] | 48 | "../common_audio", |
ossu | 20a4b3f | 2017-04-27 09:08:52 | [diff] [blame] | 49 | "../modules/audio_coding:cng", |
aleloi | dd31071 | 2016-11-17 14:28:59 | [diff] [blame] | 50 | "../modules/audio_device", |
| 51 | "../modules/audio_processing", |
stefan | 7de8d64 | 2017-02-07 15:14:08 | [diff] [blame] | 52 | "../modules/bitrate_controller:bitrate_controller", |
kjellander | 676e08f | 2016-12-07 16:23:27 | [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 06:51:33 | [diff] [blame] | 56 | "../modules/rtp_rtcp", |
Patrik Höglund | a8005cf | 2017-12-13 15:05:42 | [diff] [blame] | 57 | "../rtc_base:checks", |
henrika | 5f6bf24 | 2017-11-01 10:06:56 | [diff] [blame] | 58 | "../rtc_base:rtc_base", |
ehmaldonado | f6a861a | 2017-07-19 17:40:47 | [diff] [blame] | 59 | "../rtc_base:rtc_base_approved", |
| 60 | "../rtc_base:rtc_task_queue", |
Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [diff] [blame] | 61 | "../system_wrappers", |
Alex Narest | cedd351 | 2017-12-07 19:54:55 | [diff] [blame] | 62 | "../system_wrappers:field_trial_api", |
Tommi | f888bb5 | 2015-12-12 00:37:01 | [diff] [blame] | 63 | "../voice_engine", |
Fredrik Solenberg | 2a87797 | 2017-12-15 15:42:15 | [diff] [blame] | 64 | "../voice_engine:audio_level", |
| 65 | "utility:audio_frame_operations", |
Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [diff] [blame] | 66 | ] |
| 67 | } |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 68 | if (rtc_include_tests) { |
Fredrik Solenberg | 73276ad | 2017-09-14 12:46:47 | [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 11:10:34 | [diff] [blame] | 90 | rtc_source_set("audio_tests") { |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 91 | testonly = true |
kjellander | 676e08f | 2016-12-07 16:23:27 | [diff] [blame] | 92 | |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 93 | sources = [ |
| 94 | "audio_receive_stream_unittest.cc", |
solenberg | 18f5427 | 2017-09-15 16:56:08 | [diff] [blame] | 95 | "audio_send_stream_tests.cc", |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 96 | "audio_send_stream_unittest.cc", |
| 97 | "audio_state_unittest.cc", |
saza | c58f8c0 | 2017-07-19 07:39:19 | [diff] [blame] | 98 | "time_interval_unittest.cc", |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 99 | ] |
| 100 | deps = [ |
| 101 | ":audio", |
Fredrik Solenberg | 73276ad | 2017-09-14 12:46:47 | [diff] [blame] | 102 | ":audio_end_to_end_test", |
aleloi | 04c0722 | 2016-11-22 14:42:53 | [diff] [blame] | 103 | "../api:mock_audio_mixer", |
Fredrik Solenberg | 2a87797 | 2017-12-15 15:42:15 | [diff] [blame] | 104 | "../call:mock_call_interfaces", |
Patrik Höglund | c0e6804 | 2017-11-13 16:04:05 | [diff] [blame] | 105 | "../call:mock_rtp_interfaces", |
| 106 | "../call:rtp_interfaces", |
nisse | 0f15f92 | 2017-06-21 08:05:22 | [diff] [blame] | 107 | "../call:rtp_receiver", |
Patrik Höglund | 731082c | 2018-01-03 08:08:20 | [diff] [blame^] | 108 | "../logging:mocks", |
aleloi | dd31071 | 2016-11-17 14:28:59 | [diff] [blame] | 109 | "../modules/audio_device:mock_audio_device", |
aleloi | 04c0722 | 2016-11-22 14:42:53 | [diff] [blame] | 110 | "../modules/audio_mixer:audio_mixer_impl", |
Ivo Creusen | 56d46090 | 2017-11-24 16:29:59 | [diff] [blame] | 111 | "../modules/audio_processing:audio_processing_statistics", |
Patrik Höglund | 6213929 | 2017-12-19 15:44:45 | [diff] [blame] | 112 | "../modules/audio_processing:mocks", |
Patrik Höglund | 94dc177 | 2018-01-02 13:20:17 | [diff] [blame] | 113 | "../modules/bitrate_controller:mocks", |
kjellander | 676e08f | 2016-12-07 16:23:27 | [diff] [blame] | 114 | "../modules/congestion_controller:congestion_controller", |
zstein | 7cb69d5 | 2017-05-08 18:52:38 | [diff] [blame] | 115 | "../modules/congestion_controller:mock_congestion_controller", |
Patrik Höglund | c0e6804 | 2017-11-13 16:04:05 | [diff] [blame] | 116 | "../modules/pacing:mock_paced_sender", |
kjellander | 676e08f | 2016-12-07 16:23:27 | [diff] [blame] | 117 | "../modules/pacing:pacing", |
Patrik Höglund | c0e6804 | 2017-11-13 16:04:05 | [diff] [blame] | 118 | "../modules/rtp_rtcp:mock_rtp_rtcp", |
| 119 | "../modules/rtp_rtcp:rtp_rtcp_format", |
ehmaldonado | f6a861a | 2017-07-19 17:40:47 | [diff] [blame] | 120 | "../rtc_base:rtc_base_approved", |
Patrik Höglund | c0e6804 | 2017-11-13 16:04:05 | [diff] [blame] | 121 | "../rtc_base:rtc_base_tests_utils", |
ehmaldonado | f6a861a | 2017-07-19 17:40:47 | [diff] [blame] | 122 | "../rtc_base:rtc_task_queue", |
Patrik Höglund | a8005cf | 2017-12-13 15:05:42 | [diff] [blame] | 123 | "../rtc_base:safe_compare", |
Patrik Höglund | c0e6804 | 2017-11-13 16:04:05 | [diff] [blame] | 124 | "../system_wrappers:system_wrappers", |
| 125 | "../test:audio_codec_mocks", |
| 126 | "../test:rtp_test_utils", |
aleloi | 10111bc | 2016-11-17 14:48:48 | [diff] [blame] | 127 | "../test:test_common", |
aleloi | 6321b49 | 2016-12-05 09:46:09 | [diff] [blame] | 128 | "../test:test_support", |
Patrik Höglund | c0e6804 | 2017-11-13 16:04:05 | [diff] [blame] | 129 | "../voice_engine", |
ehmaldonado | 894c2bb | 2017-01-05 14:03:24 | [diff] [blame] | 130 | "utility:utility_tests", |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 131 | "//testing/gmock", |
| 132 | "//testing/gtest", |
| 133 | ] |
oprypin | 5e1ca78 | 2017-03-20 09:06:18 | [diff] [blame] | 134 | |
Fredrik Solenberg | 73276ad | 2017-09-14 12:46:47 | [diff] [blame] | 135 | 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 | |
kjellander | e40a7ee | 2016-10-17 06:56:12 | [diff] [blame] | 140 | if (!build_with_chromium && is_clang) { |
| 141 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 11:10:34 | [diff] [blame] | 142 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 143 | } |
| 144 | } |
kjellander | 8f8d1a0 | 2017-03-06 12:01:16 | [diff] [blame] | 145 | |
| 146 | if (rtc_enable_protobuf) { |
oprypin | 6d305ba | 2017-03-30 11:01:30 | [diff] [blame] | 147 | rtc_test("low_bandwidth_audio_test") { |
kjellander | 8f8d1a0 | 2017-03-06 12:01:16 | [diff] [blame] | 148 | testonly = true |
| 149 | |
| 150 | sources = [ |
| 151 | "test/low_bandwidth_audio_test.cc", |
| 152 | ] |
| 153 | |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 154 | deps = [ |
Fredrik Solenberg | 73276ad | 2017-09-14 12:46:47 | [diff] [blame] | 155 | ":audio_end_to_end_test", |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 156 | "../common_audio", |
oprypin | 9b2f20c | 2017-08-29 12:51:57 | [diff] [blame] | 157 | "../rtc_base:rtc_base_approved", |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 158 | "../system_wrappers", |
| 159 | "../test:fake_audio_device", |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 160 | "../test:test_common", |
| 161 | "../test:test_main", |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 162 | "//testing/gmock", |
| 163 | "//testing/gtest", |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 164 | ] |
kjellander | 8f8d1a0 | 2017-03-06 12:01:16 | [diff] [blame] | 165 | if (is_android) { |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 166 | deps += [ "//testing/android/native_test:native_test_native_code" ] |
| 167 | } |
| 168 | |
| 169 | data = [ |
Edward Lemur | 2011075 | 2017-09-28 14:14:37 | [diff] [blame] | 170 | "../resources/voice_engine/audio_dtx16.wav", |
Mirko Bonadei | 92ea95e | 2017-09-15 04:47:31 | [diff] [blame] | 171 | "../resources/voice_engine/audio_tiny16.wav", |
| 172 | "../resources/voice_engine/audio_tiny48.wav", |
Edward Lemur | 2011075 | 2017-09-28 14:14:37 | [diff] [blame] | 173 | "test/low_bandwidth_audio_test.py", |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 174 | ] |
Edward Lemur | 2011075 | 2017-09-28 14:14:37 | [diff] [blame] | 175 | 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 | } |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 192 | |
| 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" ] |
kjellander | 8f8d1a0 | 2017-03-06 12:01:16 | [diff] [blame] | 196 | } |
| 197 | } |
| 198 | } |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 199 | |
| 200 | rtc_source_set("audio_perf_tests") { |
| 201 | testonly = true |
| 202 | |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 203 | sources = [ |
| 204 | "test/audio_bwe_integration_test.cc", |
| 205 | "test/audio_bwe_integration_test.h", |
| 206 | ] |
| 207 | deps = [ |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 208 | "../common_audio", |
ehmaldonado | f6a861a | 2017-07-19 17:40:47 | [diff] [blame] | 209 | "../rtc_base:rtc_base_approved", |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 210 | "../system_wrappers", |
| 211 | "../test:fake_audio_device", |
| 212 | "../test:field_trial", |
eladalon | 413ee9a | 2017-08-22 11:02:52 | [diff] [blame] | 213 | "../test:single_threaded_task_queue", |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 214 | "../test:test_common", |
| 215 | "../test:test_main", |
| 216 | "//testing/gmock", |
| 217 | "//testing/gtest", |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 218 | ] |
| 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öm | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 229 | } |