blob: 4fc73376910f9b1052e0eb734cb04ae6f4bec59d [file] [log] [blame]
Peter Boström5c389d32015-09-25 13:58:30 +02001# 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 06:58:22 -08009import("../webrtc.gni")
kjellander8f8d1a02017-03-06 04:01:16 -080010if (is_android) {
11 import("//build/config/android/config.gni")
12 import("//build/config/android/rules.gni")
13}
Peter Boström5c389d32015-09-25 13:58:30 +020014
kjellanderb62dbbe2016-09-23 00:38:52 -070015rtc_static_library("audio") {
Peter Boström5c389d32015-09-25 13:58:30 +020016 sources = [
17 "audio_receive_stream.cc",
18 "audio_receive_stream.h",
solenbergc7a8b082015-10-16 14:35:07 -070019 "audio_send_stream.cc",
20 "audio_send_stream.h",
solenberg566ef242015-11-06 15:34:49 -080021 "audio_state.cc",
22 "audio_state.h",
aleloidd310712016-11-17 06:28:59 -080023 "audio_transport_proxy.cc",
24 "audio_transport_proxy.h",
Fredrik Solenberg4f4ec0a2015-10-22 10:49:27 +020025 "conversion.h",
26 "scoped_voe_interface.h",
Peter Boström5c389d32015-09-25 13:58:30 +020027 ]
28
kjellandere40a7ee2016-10-16 23:56:12 -070029 if (!build_with_chromium && is_clang) {
30 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070031 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström5c389d32015-09-25 13:58:30 +020032 }
33
34 deps = [
35 "..:webrtc_common",
aleloiaed581a2016-10-20 06:32:39 -070036 "../api:audio_mixer_api",
kjellander676e08f2016-12-07 08:23:27 -080037 "../api:call_api",
ossueb1fde42017-05-02 06:46:30 -070038 "../api/audio_codecs:audio_codecs_api",
39 "../api/audio_codecs:builtin_audio_encoder_factory",
ehmaldonado370dd472017-07-10 05:58:42 -070040 "../base:rtc_base_approved",
41 "../base:rtc_task_queue",
ossuf515ab82016-12-07 04:52:58 -080042 "../call:call_interfaces",
nissed76b7b22017-06-01 04:02:35 -070043 "../call:rtp_interfaces",
aleloi04c07222016-11-22 06:42:53 -080044 "../common_audio",
ossu20a4b3f2017-04-27 02:08:52 -070045 "../modules/audio_coding:cng",
aleloidd310712016-11-17 06:28:59 -080046 "../modules/audio_device",
47 "../modules/audio_processing",
stefan7de8d642017-02-07 07:14:08 -080048 "../modules/bitrate_controller:bitrate_controller",
kjellander676e08f2016-12-07 08:23:27 -080049 "../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öm5c389d32015-09-25 13:58:30 +020053 "../system_wrappers",
Tommif888bb52015-12-12 01:37:01 +010054 "../voice_engine",
Peter Boström5c389d32015-09-25 13:58:30 +020055 ]
56}
Peter Boström02083222016-06-14 12:52:54 +020057if (rtc_include_tests) {
ehmaldonado38a21322016-09-02 04:10:34 -070058 rtc_source_set("audio_tests") {
Peter Boström02083222016-06-14 12:52:54 +020059 testonly = true
kjellander676e08f2016-12-07 08:23:27 -080060
kjellandere0629c02017-04-25 04:04:50 -070061 # 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.zhuc0247402017-07-11 06:20:45 -070065 visibility = [ "..:video_engine_tests" ]
kjellandere0629c02017-04-25 04:04:50 -070066 }
67
kjellander676e08f2016-12-07 08:23:27 -080068 # 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öm02083222016-06-14 12:52:54 +020072 sources = [
73 "audio_receive_stream_unittest.cc",
74 "audio_send_stream_unittest.cc",
75 "audio_state_unittest.cc",
76 ]
77 deps = [
78 ":audio",
aleloi04c07222016-11-22 06:42:53 -080079 "../api:mock_audio_mixer",
ehmaldonado370dd472017-07-10 05:58:42 -070080 "../base:rtc_base_approved",
81 "../base:rtc_task_queue",
nisse0f15f922017-06-21 01:05:22 -070082 "../call:rtp_receiver",
aleloidd310712016-11-17 06:28:59 -080083 "../modules/audio_device:mock_audio_device",
aleloi04c07222016-11-22 06:42:53 -080084 "../modules/audio_mixer:audio_mixer_impl",
kjellander676e08f2016-12-07 08:23:27 -080085 "../modules/congestion_controller:congestion_controller",
zstein7cb69d52017-05-08 11:52:38 -070086 "../modules/congestion_controller:mock_congestion_controller",
kjellander676e08f2016-12-07 08:23:27 -080087 "../modules/pacing:pacing",
aleloi10111bc2016-11-17 06:48:48 -080088 "../test:test_common",
aleloi6321b492016-12-05 01:46:09 -080089 "../test:test_support",
ehmaldonado894c2bb2017-01-05 06:03:24 -080090 "utility:utility_tests",
Peter Boström02083222016-06-14 12:52:54 +020091 "//testing/gmock",
92 "//testing/gtest",
93 ]
oprypin5e1ca782017-03-20 02:06:18 -070094
kjellandere40a7ee2016-10-16 23:56:12 -070095 if (!build_with_chromium && is_clang) {
96 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070097 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Peter Boström02083222016-06-14 12:52:54 +020098 }
99 }
kjellander8f8d1a02017-03-06 04:01:16 -0800100
101 if (rtc_enable_protobuf) {
oprypin6d305ba2017-03-30 04:01:30 -0700102 rtc_test("low_bandwidth_audio_test") {
kjellander8f8d1a02017-03-06 04:01:16 -0800103 testonly = true
104
105 sources = [
106 "test/low_bandwidth_audio_test.cc",
oprypin92220ff2017-03-23 03:40:03 -0700107 "test/low_bandwidth_audio_test.h",
kjellander8f8d1a02017-03-06 04:01:16 -0800108 ]
109
oprypin92220ff2017-03-23 03:40:03 -0700110 deps = [
111 "../common_audio",
112 "../system_wrappers",
113 "../test:fake_audio_device",
oprypin92220ff2017-03-23 03:40:03 -0700114 "../test:test_common",
115 "../test:test_main",
tschumim9d117642017-07-17 01:41:41 -0700116 "//testing/gmock",
117 "//testing/gtest",
oprypinf2501002017-04-12 05:00:56 -0700118 "//third_party/gflags",
oprypin92220ff2017-03-23 03:40:03 -0700119 ]
kjellander8f8d1a02017-03-06 04:01:16 -0800120 if (is_android) {
oprypin92220ff2017-03-23 03:40:03 -0700121 deps += [ "//testing/android/native_test:native_test_native_code" ]
122 }
123
124 data = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700125 "../../resources/voice_engine/audio_tiny16.wav",
126 "../../resources/voice_engine/audio_tiny48.wav",
tschumim9d117642017-07-17 01:41:41 -0700127 "../../resources/voice_engine/audio_dtx16.wav",
oprypin92220ff2017-03-23 03:40:03 -0700128 ]
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" ]
kjellander8f8d1a02017-03-06 04:01:16 -0800133 }
134 }
135 }
tschumim9d117642017-07-17 01:41:41 -0700136
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öm02083222016-06-14 12:52:54 +0200172}