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", |
aleloi | dd31071 | 2016-11-17 14:28:59 | [diff] [blame] | 23 | "audio_transport_proxy.cc", |
| 24 | "audio_transport_proxy.h", |
Fredrik Solenberg | 4f4ec0a | 2015-10-22 08:49:27 | [diff] [blame] | 25 | "conversion.h", |
| 26 | "scoped_voe_interface.h", |
saza | c58f8c0 | 2017-07-19 07:39:19 | [diff] [blame] | 27 | "time_interval.cc", |
| 28 | "time_interval.h", |
Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [diff] [blame] | 29 | ] |
| 30 | |
kjellander | e40a7ee | 2016-10-17 06:56:12 | [diff] [blame] | 31 | if (!build_with_chromium && is_clang) { |
| 32 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 11:10:34 | [diff] [blame] | 33 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | deps = [ |
| 37 | "..:webrtc_common", |
aleloi | aed581a | 2016-10-20 13:32:39 | [diff] [blame] | 38 | "../api:audio_mixer_api", |
kjellander | 676e08f | 2016-12-07 16:23:27 | [diff] [blame] | 39 | "../api:call_api", |
ossu | eb1fde4 | 2017-05-02 13:46:30 | [diff] [blame] | 40 | "../api/audio_codecs:audio_codecs_api", |
| 41 | "../api/audio_codecs:builtin_audio_encoder_factory", |
ossu | f515ab8 | 2016-12-07 12:52:58 | [diff] [blame] | 42 | "../call:call_interfaces", |
nisse | d76b7b2 | 2017-06-01 11:02:35 | [diff] [blame] | 43 | "../call:rtp_interfaces", |
aleloi | 04c0722 | 2016-11-22 14:42:53 | [diff] [blame] | 44 | "../common_audio", |
ossu | 20a4b3f | 2017-04-27 09:08:52 | [diff] [blame] | 45 | "../modules/audio_coding:cng", |
aleloi | dd31071 | 2016-11-17 14:28:59 | [diff] [blame] | 46 | "../modules/audio_device", |
| 47 | "../modules/audio_processing", |
stefan | 7de8d64 | 2017-02-07 15:14:08 | [diff] [blame] | 48 | "../modules/bitrate_controller:bitrate_controller", |
kjellander | 676e08f | 2016-12-07 16:23:27 | [diff] [blame] | 49 | "../modules/congestion_controller:congestion_controller", |
| 50 | "../modules/pacing:pacing", |
| 51 | "../modules/remote_bitrate_estimator:remote_bitrate_estimator", |
| 52 | "../modules/rtp_rtcp:rtp_rtcp", |
ehmaldonado | f6a861a | 2017-07-19 17:40:47 | [diff] [blame^] | 53 | "../rtc_base:rtc_base_approved", |
| 54 | "../rtc_base:rtc_task_queue", |
Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [diff] [blame] | 55 | "../system_wrappers", |
Tommi | f888bb5 | 2015-12-12 00:37:01 | [diff] [blame] | 56 | "../voice_engine", |
Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [diff] [blame] | 57 | ] |
| 58 | } |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 59 | if (rtc_include_tests) { |
ehmaldonado | 38a2132 | 2016-09-02 11:10:34 | [diff] [blame] | 60 | rtc_source_set("audio_tests") { |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 61 | testonly = true |
kjellander | 676e08f | 2016-12-07 16:23:27 | [diff] [blame] | 62 | |
kjellander | e0629c0 | 2017-04-25 11:04:50 | [diff] [blame] | 63 | # 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.zhu | c024740 | 2017-07-11 13:20:45 | [diff] [blame] | 67 | visibility = [ "..:video_engine_tests" ] |
kjellander | e0629c0 | 2017-04-25 11:04:50 | [diff] [blame] | 68 | } |
| 69 | |
kjellander | 676e08f | 2016-12-07 16:23:27 | [diff] [blame] | 70 | # 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öm | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 74 | sources = [ |
| 75 | "audio_receive_stream_unittest.cc", |
| 76 | "audio_send_stream_unittest.cc", |
| 77 | "audio_state_unittest.cc", |
saza | c58f8c0 | 2017-07-19 07:39:19 | [diff] [blame] | 78 | "time_interval_unittest.cc", |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 79 | ] |
| 80 | deps = [ |
| 81 | ":audio", |
aleloi | 04c0722 | 2016-11-22 14:42:53 | [diff] [blame] | 82 | "../api:mock_audio_mixer", |
nisse | 0f15f92 | 2017-06-21 08:05:22 | [diff] [blame] | 83 | "../call:rtp_receiver", |
aleloi | dd31071 | 2016-11-17 14:28:59 | [diff] [blame] | 84 | "../modules/audio_device:mock_audio_device", |
aleloi | 04c0722 | 2016-11-22 14:42:53 | [diff] [blame] | 85 | "../modules/audio_mixer:audio_mixer_impl", |
kjellander | 676e08f | 2016-12-07 16:23:27 | [diff] [blame] | 86 | "../modules/congestion_controller:congestion_controller", |
zstein | 7cb69d5 | 2017-05-08 18:52:38 | [diff] [blame] | 87 | "../modules/congestion_controller:mock_congestion_controller", |
kjellander | 676e08f | 2016-12-07 16:23:27 | [diff] [blame] | 88 | "../modules/pacing:pacing", |
ehmaldonado | f6a861a | 2017-07-19 17:40:47 | [diff] [blame^] | 89 | "../rtc_base:rtc_base_approved", |
| 90 | "../rtc_base:rtc_task_queue", |
aleloi | 10111bc | 2016-11-17 14:48:48 | [diff] [blame] | 91 | "../test:test_common", |
aleloi | 6321b49 | 2016-12-05 09:46:09 | [diff] [blame] | 92 | "../test:test_support", |
ehmaldonado | 894c2bb | 2017-01-05 14:03:24 | [diff] [blame] | 93 | "utility:utility_tests", |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 94 | "//testing/gmock", |
| 95 | "//testing/gtest", |
| 96 | ] |
oprypin | 5e1ca78 | 2017-03-20 09:06:18 | [diff] [blame] | 97 | |
kjellander | e40a7ee | 2016-10-17 06:56:12 | [diff] [blame] | 98 | if (!build_with_chromium && is_clang) { |
| 99 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 11:10:34 | [diff] [blame] | 100 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 101 | } |
| 102 | } |
kjellander | 8f8d1a0 | 2017-03-06 12:01:16 | [diff] [blame] | 103 | |
| 104 | if (rtc_enable_protobuf) { |
oprypin | 6d305ba | 2017-03-30 11:01:30 | [diff] [blame] | 105 | rtc_test("low_bandwidth_audio_test") { |
kjellander | 8f8d1a0 | 2017-03-06 12:01:16 | [diff] [blame] | 106 | testonly = true |
| 107 | |
| 108 | sources = [ |
| 109 | "test/low_bandwidth_audio_test.cc", |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 110 | "test/low_bandwidth_audio_test.h", |
kjellander | 8f8d1a0 | 2017-03-06 12:01:16 | [diff] [blame] | 111 | ] |
| 112 | |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 113 | deps = [ |
| 114 | "../common_audio", |
| 115 | "../system_wrappers", |
| 116 | "../test:fake_audio_device", |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 117 | "../test:test_common", |
| 118 | "../test:test_main", |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 119 | "//testing/gmock", |
| 120 | "//testing/gtest", |
oprypin | f250100 | 2017-04-12 12:00:56 | [diff] [blame] | 121 | "//third_party/gflags", |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 122 | ] |
kjellander | 8f8d1a0 | 2017-03-06 12:01:16 | [diff] [blame] | 123 | if (is_android) { |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 124 | deps += [ "//testing/android/native_test:native_test_native_code" ] |
| 125 | } |
| 126 | |
| 127 | data = [ |
jianjun.zhu | c024740 | 2017-07-11 13:20:45 | [diff] [blame] | 128 | "../../resources/voice_engine/audio_tiny16.wav", |
| 129 | "../../resources/voice_engine/audio_tiny48.wav", |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 130 | "../../resources/voice_engine/audio_dtx16.wav", |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 131 | ] |
| 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" ] |
kjellander | 8f8d1a0 | 2017-03-06 12:01:16 | [diff] [blame] | 136 | } |
| 137 | } |
| 138 | } |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 139 | |
| 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 = [ |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 154 | "../common_audio", |
ehmaldonado | f6a861a | 2017-07-19 17:40:47 | [diff] [blame^] | 155 | "../rtc_base:rtc_base_approved", |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 156 | "../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öm | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 175 | } |