blob: a75d8ef4dcc95542ec2f38411b5a090d20b5124f [file] [log] [blame]
Peter Boström5c389d32015-09-25 11:58:301# 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
mbonadei9aa3f0a2017-01-24 14:58:229import("../webrtc.gni")
kjellander8f8d1a02017-03-06 12:01:1610if (is_android) {
11 import("//build/config/android/config.gni")
12 import("//build/config/android/rules.gni")
13}
Peter Boström5c389d32015-09-25 11:58:3014
kjellanderb62dbbe2016-09-23 07:38:5215rtc_static_library("audio") {
Peter Boström5c389d32015-09-25 11:58:3016 sources = [
17 "audio_receive_stream.cc",
18 "audio_receive_stream.h",
solenbergc7a8b082015-10-16 21:35:0719 "audio_send_stream.cc",
20 "audio_send_stream.h",
solenberg566ef242015-11-06 23:34:4921 "audio_state.cc",
22 "audio_state.h",
aleloidd310712016-11-17 14:28:5923 "audio_transport_proxy.cc",
24 "audio_transport_proxy.h",
Fredrik Solenberg4f4ec0a2015-10-22 08:49:2725 "conversion.h",
26 "scoped_voe_interface.h",
sazac58f8c02017-07-19 07:39:1927 "time_interval.cc",
28 "time_interval.h",
Peter Boström5c389d32015-09-25 11:58:3029 ]
30
kjellandere40a7ee2016-10-17 06:56:1231 if (!build_with_chromium && is_clang) {
32 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 11:10:3433 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström5c389d32015-09-25 11:58:3034 }
35
36 deps = [
37 "..:webrtc_common",
aleloiaed581a2016-10-20 13:32:3938 "../api:audio_mixer_api",
kjellander676e08f2016-12-07 16:23:2739 "../api:call_api",
ossueb1fde42017-05-02 13:46:3040 "../api/audio_codecs:audio_codecs_api",
41 "../api/audio_codecs:builtin_audio_encoder_factory",
ossuf515ab82016-12-07 12:52:5842 "../call:call_interfaces",
nissed76b7b22017-06-01 11:02:3543 "../call:rtp_interfaces",
aleloi04c07222016-11-22 14:42:5344 "../common_audio",
ossu20a4b3f2017-04-27 09:08:5245 "../modules/audio_coding:cng",
aleloidd310712016-11-17 14:28:5946 "../modules/audio_device",
47 "../modules/audio_processing",
stefan7de8d642017-02-07 15:14:0848 "../modules/bitrate_controller:bitrate_controller",
kjellander676e08f2016-12-07 16:23:2749 "../modules/congestion_controller:congestion_controller",
50 "../modules/pacing:pacing",
51 "../modules/remote_bitrate_estimator:remote_bitrate_estimator",
52 "../modules/rtp_rtcp:rtp_rtcp",
ehmaldonadof6a861a2017-07-19 17:40:4753 "../rtc_base:rtc_base_approved",
54 "../rtc_base:rtc_task_queue",
Peter Boström5c389d32015-09-25 11:58:3055 "../system_wrappers",
Tommif888bb52015-12-12 00:37:0156 "../voice_engine",
Peter Boström5c389d32015-09-25 11:58:3057 ]
58}
Peter Boström02083222016-06-14 10:52:5459if (rtc_include_tests) {
ehmaldonado38a21322016-09-02 11:10:3460 rtc_source_set("audio_tests") {
Peter Boström02083222016-06-14 10:52:5461 testonly = true
kjellander676e08f2016-12-07 16:23:2762
kjellandere0629c02017-04-25 11:04:5063 # 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.zhuc0247402017-07-11 13:20:4567 visibility = [ "..:video_engine_tests" ]
kjellandere0629c02017-04-25 11:04:5068 }
69
kjellander676e08f2016-12-07 16:23:2770 # 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öm02083222016-06-14 10:52:5474 sources = [
75 "audio_receive_stream_unittest.cc",
76 "audio_send_stream_unittest.cc",
77 "audio_state_unittest.cc",
sazac58f8c02017-07-19 07:39:1978 "time_interval_unittest.cc",
Peter Boström02083222016-06-14 10:52:5479 ]
80 deps = [
81 ":audio",
aleloi04c07222016-11-22 14:42:5382 "../api:mock_audio_mixer",
nisse0f15f922017-06-21 08:05:2283 "../call:rtp_receiver",
aleloidd310712016-11-17 14:28:5984 "../modules/audio_device:mock_audio_device",
aleloi04c07222016-11-22 14:42:5385 "../modules/audio_mixer:audio_mixer_impl",
kjellander676e08f2016-12-07 16:23:2786 "../modules/congestion_controller:congestion_controller",
zstein7cb69d52017-05-08 18:52:3887 "../modules/congestion_controller:mock_congestion_controller",
kjellander676e08f2016-12-07 16:23:2788 "../modules/pacing:pacing",
ehmaldonadof6a861a2017-07-19 17:40:4789 "../rtc_base:rtc_base_approved",
90 "../rtc_base:rtc_task_queue",
aleloi10111bc2016-11-17 14:48:4891 "../test:test_common",
aleloi6321b492016-12-05 09:46:0992 "../test:test_support",
ehmaldonado894c2bb2017-01-05 14:03:2493 "utility:utility_tests",
Peter Boström02083222016-06-14 10:52:5494 "//testing/gmock",
95 "//testing/gtest",
96 ]
oprypin5e1ca782017-03-20 09:06:1897
kjellandere40a7ee2016-10-17 06:56:1298 if (!build_with_chromium && is_clang) {
99 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 11:10:34100 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström02083222016-06-14 10:52:54101 }
102 }
kjellander8f8d1a02017-03-06 12:01:16103
104 if (rtc_enable_protobuf) {
oprypin6d305ba2017-03-30 11:01:30105 rtc_test("low_bandwidth_audio_test") {
kjellander8f8d1a02017-03-06 12:01:16106 testonly = true
107
108 sources = [
109 "test/low_bandwidth_audio_test.cc",
oprypin92220ff2017-03-23 10:40:03110 "test/low_bandwidth_audio_test.h",
kjellander8f8d1a02017-03-06 12:01:16111 ]
112
oprypin92220ff2017-03-23 10:40:03113 deps = [
114 "../common_audio",
115 "../system_wrappers",
116 "../test:fake_audio_device",
oprypin92220ff2017-03-23 10:40:03117 "../test:test_common",
118 "../test:test_main",
tschumim9d117642017-07-17 08:41:41119 "//testing/gmock",
120 "//testing/gtest",
oprypinf2501002017-04-12 12:00:56121 "//third_party/gflags",
oprypin92220ff2017-03-23 10:40:03122 ]
kjellander8f8d1a02017-03-06 12:01:16123 if (is_android) {
oprypin92220ff2017-03-23 10:40:03124 deps += [ "//testing/android/native_test:native_test_native_code" ]
125 }
126
127 data = [
jianjun.zhuc0247402017-07-11 13:20:45128 "../../resources/voice_engine/audio_tiny16.wav",
129 "../../resources/voice_engine/audio_tiny48.wav",
tschumim9d117642017-07-17 08:41:41130 "../../resources/voice_engine/audio_dtx16.wav",
oprypin92220ff2017-03-23 10:40:03131 ]
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" ]
kjellander8f8d1a02017-03-06 12:01:16136 }
137 }
138 }
tschumim9d117642017-07-17 08:41:41139
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 = [
tschumim9d117642017-07-17 08:41:41154 "../common_audio",
ehmaldonadof6a861a2017-07-19 17:40:47155 "../rtc_base:rtc_base_approved",
tschumim9d117642017-07-17 08:41:41156 "../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öm02083222016-06-14 10:52:54175}