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", |
| 26 | "scoped_voe_interface.h", |
Peter Boström | 5c389d3 | 2015-09-25 13:58:30 +0200 | [diff] [blame] | 27 | ] |
| 28 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 29 | if (!build_with_chromium && is_clang) { |
| 30 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 31 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
Peter Boström | 5c389d3 | 2015-09-25 13:58:30 +0200 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | deps = [ |
| 35 | "..:webrtc_common", |
aleloi | aed581a | 2016-10-20 06:32:39 -0700 | [diff] [blame] | 36 | "../api:audio_mixer_api", |
kjellander | 676e08f | 2016-12-07 08:23:27 -0800 | [diff] [blame] | 37 | "../api:call_api", |
ossu | eb1fde4 | 2017-05-02 06:46:30 -0700 | [diff] [blame] | 38 | "../api/audio_codecs:audio_codecs_api", |
| 39 | "../api/audio_codecs:builtin_audio_encoder_factory", |
ehmaldonado | 370dd47 | 2017-07-10 05:58:42 -0700 | [diff] [blame] | 40 | "../base:rtc_base_approved", |
| 41 | "../base:rtc_task_queue", |
ossu | f515ab8 | 2016-12-07 04:52:58 -0800 | [diff] [blame] | 42 | "../call:call_interfaces", |
nisse | d76b7b2 | 2017-06-01 04:02:35 -0700 | [diff] [blame] | 43 | "../call:rtp_interfaces", |
aleloi | 04c0722 | 2016-11-22 06:42:53 -0800 | [diff] [blame] | 44 | "../common_audio", |
ossu | 20a4b3f | 2017-04-27 02:08:52 -0700 | [diff] [blame] | 45 | "../modules/audio_coding:cng", |
aleloi | dd31071 | 2016-11-17 06:28:59 -0800 | [diff] [blame] | 46 | "../modules/audio_device", |
| 47 | "../modules/audio_processing", |
stefan | 7de8d64 | 2017-02-07 07:14:08 -0800 | [diff] [blame] | 48 | "../modules/bitrate_controller:bitrate_controller", |
kjellander | 676e08f | 2016-12-07 08:23:27 -0800 | [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", |
Peter Boström | 5c389d3 | 2015-09-25 13:58:30 +0200 | [diff] [blame] | 53 | "../system_wrappers", |
Tommi | f888bb5 | 2015-12-12 01:37:01 +0100 | [diff] [blame] | 54 | "../voice_engine", |
Peter Boström | 5c389d3 | 2015-09-25 13:58:30 +0200 | [diff] [blame] | 55 | ] |
| 56 | } |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 57 | if (rtc_include_tests) { |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 58 | rtc_source_set("audio_tests") { |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 59 | testonly = true |
kjellander | 676e08f | 2016-12-07 08:23:27 -0800 | [diff] [blame] | 60 | |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 61 | # Skip restricting visibility on mobile platforms since the tests on those |
| 62 | # gets additional generated targets which would require many lines here to |
| 63 | # cover (which would be confusing to read and hard to maintain). |
| 64 | if (!is_android && !is_ios) { |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 65 | visibility = [ "..:video_engine_tests" ] |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 66 | } |
| 67 | |
kjellander | 676e08f | 2016-12-07 08:23:27 -0800 | [diff] [blame] | 68 | # TODO(kjellander): Remove (bugs.webrtc.org/6828) |
| 69 | # This needs remote_bitrate_estimator to be moved to webrtc/api first. |
| 70 | check_includes = false |
| 71 | |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 72 | sources = [ |
| 73 | "audio_receive_stream_unittest.cc", |
| 74 | "audio_send_stream_unittest.cc", |
| 75 | "audio_state_unittest.cc", |
| 76 | ] |
| 77 | deps = [ |
| 78 | ":audio", |
aleloi | 04c0722 | 2016-11-22 06:42:53 -0800 | [diff] [blame] | 79 | "../api:mock_audio_mixer", |
ehmaldonado | 370dd47 | 2017-07-10 05:58:42 -0700 | [diff] [blame] | 80 | "../base:rtc_base_approved", |
| 81 | "../base:rtc_task_queue", |
nisse | 0f15f92 | 2017-06-21 01:05:22 -0700 | [diff] [blame] | 82 | "../call:rtp_receiver", |
aleloi | dd31071 | 2016-11-17 06:28:59 -0800 | [diff] [blame] | 83 | "../modules/audio_device:mock_audio_device", |
aleloi | 04c0722 | 2016-11-22 06:42:53 -0800 | [diff] [blame] | 84 | "../modules/audio_mixer:audio_mixer_impl", |
kjellander | 676e08f | 2016-12-07 08:23:27 -0800 | [diff] [blame] | 85 | "../modules/congestion_controller:congestion_controller", |
zstein | 7cb69d5 | 2017-05-08 11:52:38 -0700 | [diff] [blame] | 86 | "../modules/congestion_controller:mock_congestion_controller", |
kjellander | 676e08f | 2016-12-07 08:23:27 -0800 | [diff] [blame] | 87 | "../modules/pacing:pacing", |
aleloi | 10111bc | 2016-11-17 06:48:48 -0800 | [diff] [blame] | 88 | "../test:test_common", |
aleloi | 6321b49 | 2016-12-05 01:46:09 -0800 | [diff] [blame] | 89 | "../test:test_support", |
ehmaldonado | 894c2bb | 2017-01-05 06:03:24 -0800 | [diff] [blame] | 90 | "utility:utility_tests", |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 91 | "//testing/gmock", |
| 92 | "//testing/gtest", |
| 93 | ] |
oprypin | 5e1ca78 | 2017-03-20 02:06:18 -0700 | [diff] [blame] | 94 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 95 | if (!build_with_chromium && is_clang) { |
| 96 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 97 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 98 | } |
| 99 | } |
kjellander | 8f8d1a0 | 2017-03-06 04:01:16 -0800 | [diff] [blame] | 100 | |
| 101 | if (rtc_enable_protobuf) { |
oprypin | 6d305ba | 2017-03-30 04:01:30 -0700 | [diff] [blame] | 102 | rtc_test("low_bandwidth_audio_test") { |
kjellander | 8f8d1a0 | 2017-03-06 04:01:16 -0800 | [diff] [blame] | 103 | testonly = true |
| 104 | |
| 105 | sources = [ |
| 106 | "test/low_bandwidth_audio_test.cc", |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 107 | "test/low_bandwidth_audio_test.h", |
kjellander | 8f8d1a0 | 2017-03-06 04:01:16 -0800 | [diff] [blame] | 108 | ] |
| 109 | |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 110 | deps = [ |
| 111 | "../common_audio", |
| 112 | "../system_wrappers", |
| 113 | "../test:fake_audio_device", |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 114 | "../test:test_common", |
| 115 | "../test:test_main", |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame^] | 116 | "//testing/gmock", |
| 117 | "//testing/gtest", |
oprypin | f250100 | 2017-04-12 05:00:56 -0700 | [diff] [blame] | 118 | "//third_party/gflags", |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 119 | ] |
kjellander | 8f8d1a0 | 2017-03-06 04:01:16 -0800 | [diff] [blame] | 120 | if (is_android) { |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 121 | deps += [ "//testing/android/native_test:native_test_native_code" ] |
| 122 | } |
| 123 | |
| 124 | data = [ |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 125 | "../../resources/voice_engine/audio_tiny16.wav", |
| 126 | "../../resources/voice_engine/audio_tiny48.wav", |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame^] | 127 | "../../resources/voice_engine/audio_dtx16.wav", |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 128 | ] |
| 129 | |
| 130 | if (!build_with_chromium && is_clang) { |
| 131 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) |
| 132 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 8f8d1a0 | 2017-03-06 04:01:16 -0800 | [diff] [blame] | 133 | } |
| 134 | } |
| 135 | } |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame^] | 136 | |
| 137 | rtc_source_set("audio_perf_tests") { |
| 138 | testonly = true |
| 139 | |
| 140 | # Skip restricting visibility on mobile platforms since the tests on those |
| 141 | # gets additional generated targets which would require many lines here to |
| 142 | # cover (which would be confusing to read and hard to maintain). |
| 143 | if (!is_android && !is_ios) { |
| 144 | visibility = [ "//webrtc:webrtc_perf_tests" ] |
| 145 | } |
| 146 | sources = [ |
| 147 | "test/audio_bwe_integration_test.cc", |
| 148 | "test/audio_bwe_integration_test.h", |
| 149 | ] |
| 150 | deps = [ |
| 151 | "../base:rtc_base_approved", |
| 152 | "../common_audio", |
| 153 | "../system_wrappers", |
| 154 | "../test:fake_audio_device", |
| 155 | "../test:field_trial", |
| 156 | "../test:test_common", |
| 157 | "../test:test_main", |
| 158 | "//testing/gmock", |
| 159 | "//testing/gtest", |
| 160 | "//third_party/gflags", |
| 161 | ] |
| 162 | |
| 163 | data = [ |
| 164 | "//resources/voice_engine/audio_dtx16.wav", |
| 165 | ] |
| 166 | |
| 167 | if (!build_with_chromium && is_clang) { |
| 168 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 169 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 170 | } |
| 171 | } |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 172 | } |