blob: ffa17ed26660195c59a68168ddd7f93700beb06f [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001# Copyright (c) 2014 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
9import("../build/webrtc.gni")
ossua16f7a82016-07-08 02:12:55 -070010import("//testing/test.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000011
12source_set("voice_engine") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000013 sources = [
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020014 "channel.cc",
15 "channel.h",
16 "channel_manager.cc",
17 "channel_manager.h",
solenberg13725082015-11-25 08:16:52 -080018 "channel_proxy.cc",
19 "channel_proxy.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000020 "include/voe_audio_processing.h",
21 "include/voe_base.h",
22 "include/voe_codec.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000023 "include/voe_errors.h",
24 "include/voe_external_media.h",
25 "include/voe_file.h",
26 "include/voe_hardware.h",
27 "include/voe_neteq_stats.h",
28 "include/voe_network.h",
29 "include/voe_rtp_rtcp.h",
30 "include/voe_video_sync.h",
31 "include/voe_volume_control.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000032 "monitor_module.cc",
33 "monitor_module.h",
34 "network_predictor.cc",
35 "network_predictor.h",
36 "output_mixer.cc",
37 "output_mixer.h",
38 "shared_data.cc",
39 "shared_data.h",
40 "statistics.cc",
41 "statistics.h",
42 "transmit_mixer.cc",
43 "transmit_mixer.h",
44 "utility.cc",
45 "utility.h",
46 "voe_audio_processing_impl.cc",
47 "voe_audio_processing_impl.h",
48 "voe_base_impl.cc",
49 "voe_base_impl.h",
50 "voe_codec_impl.cc",
51 "voe_codec_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000052 "voe_external_media_impl.cc",
53 "voe_external_media_impl.h",
54 "voe_file_impl.cc",
55 "voe_file_impl.h",
56 "voe_hardware_impl.cc",
57 "voe_hardware_impl.h",
58 "voe_neteq_stats_impl.cc",
59 "voe_neteq_stats_impl.h",
60 "voe_network_impl.cc",
61 "voe_network_impl.h",
62 "voe_rtp_rtcp_impl.cc",
63 "voe_rtp_rtcp_impl.h",
64 "voe_video_sync_impl.cc",
65 "voe_video_sync_impl.h",
66 "voe_volume_control_impl.cc",
67 "voe_volume_control_impl.h",
68 "voice_engine_defines.h",
69 "voice_engine_impl.cc",
70 "voice_engine_impl.h",
71 ]
72
73 if (is_win) {
74 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +000075
76 cflags = [
77 # TODO(kjellander): Bug 261: fix this warning.
ossua16f7a82016-07-08 02:12:55 -070078 "/wd4373", # Virtual function override.
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +000079 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000080 }
81
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +000082 configs += [ "..:common_config" ]
83 public_configs = [ "..:common_inherited_config" ]
84
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000085 if (is_clang) {
86 # Suppress warnings from Chrome's Clang plugins.
87 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
88 configs -= [ "//build/config/clang:find_bad_constructs" ]
89 }
90
91 deps = [
aleloie6ca9ec2016-08-10 05:01:51 -070092 ":level_indicator",
ivocb04965c2015-09-09 00:09:43 -070093 "..:rtc_event_log",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000094 "..:webrtc_common",
kjellandera69d9732016-08-31 07:33:05 -070095 "../api:call_api",
kjellander@webrtc.org7ffeab52016-02-26 22:46:09 +010096 "../base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000097 "../common_audio",
98 "../modules/audio_coding",
99 "../modules/audio_conference_mixer",
100 "../modules/audio_device",
101 "../modules/audio_processing",
102 "../modules/bitrate_controller",
103 "../modules/media_file",
Stefan Holmerb86d4e42015-12-07 10:26:18 +0100104 "../modules/pacing",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000105 "../modules/rtp_rtcp",
106 "../modules/utility",
107 "../system_wrappers",
108 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000109}
ossua16f7a82016-07-08 02:12:55 -0700110
aleloie6ca9ec2016-08-10 05:01:51 -0700111source_set("level_indicator") {
112 sources = [
113 "level_indicator.cc",
114 "level_indicator.h",
115 ]
116
117 configs += [ "..:common_config" ]
118 public_configs = [ "..:common_inherited_config" ]
119
120 deps = [
121 "..:webrtc_common",
122 "../base:rtc_base_approved",
123 "../common_audio",
124 ]
125}
126
ossua16f7a82016-07-08 02:12:55 -0700127if (rtc_include_tests) {
128 test("voice_engine_unittests") {
129 deps = [
130 ":voice_engine",
131 "//testing/gmock",
132 "//testing/gtest",
133 "//webrtc/common_audio",
134 "//webrtc/modules/audio_coding",
135 "//webrtc/modules/audio_conference_mixer",
136 "//webrtc/modules/audio_device",
137 "//webrtc/modules/audio_processing",
138 "//webrtc/modules/media_file",
139 "//webrtc/modules/rtp_rtcp",
140 "//webrtc/modules/utility",
141 "//webrtc/system_wrappers",
142 "//webrtc/test:test_support_main",
143 ]
144
145 if (is_android) {
146 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -0700147 shard_timeout = 900
ossua16f7a82016-07-08 02:12:55 -0700148 }
149
150 sources = [
151 "channel_unittest.cc",
152 "network_predictor_unittest.cc",
153 "transmit_mixer_unittest.cc",
154 "utility_unittest.cc",
155 "voe_audio_processing_unittest.cc",
156 "voe_base_unittest.cc",
157 "voe_codec_unittest.cc",
158 "voe_network_unittest.cc",
159 "voice_engine_fixture.cc",
160 "voice_engine_fixture.h",
161 ]
162
163 if (is_win) {
164 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
165
166 cflags = [
167 # TODO(kjellander): Bug 261: fix this warning.
168 "/wd4373", # Virtual function override.
169 ]
170 }
171
172 if (is_clang) {
173 # Suppress warnings from Chrome's Clang plugins.
174 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
175 configs -= [ "//build/config/clang:find_bad_constructs" ]
176 }
177 }
178
179 if (!is_ios) {
180 executable("voe_auto_test") {
181 testonly = true
182
183 deps = [
184 ":voice_engine",
ehmaldonadobcba64a2016-08-19 02:11:07 -0700185 "//build/config/sanitizers:deps",
ossua16f7a82016-07-08 02:12:55 -0700186 "//testing/gmock",
187 "//testing/gtest",
188 "//third_party/gflags",
189 "//webrtc/:rtc_event_log",
190 "//webrtc/modules/video_capture",
191 "//webrtc/system_wrappers",
192 "//webrtc/system_wrappers/:system_wrappers_default",
193 "//webrtc/test/:channel_transport",
194 "//webrtc/test/:test_common",
195 "//webrtc/test/:test_support",
196 ]
197
198 sources = [
199 "test/auto_test/automated_mode.cc",
200 "test/auto_test/extended/agc_config_test.cc",
201 "test/auto_test/extended/ec_metrics_test.cc",
202 "test/auto_test/fakes/conference_transport.cc",
203 "test/auto_test/fakes/conference_transport.h",
204 "test/auto_test/fakes/loudest_filter.cc",
205 "test/auto_test/fakes/loudest_filter.h",
206 "test/auto_test/fixtures/after_initialization_fixture.cc",
207 "test/auto_test/fixtures/after_initialization_fixture.h",
208 "test/auto_test/fixtures/after_streaming_fixture.cc",
209 "test/auto_test/fixtures/after_streaming_fixture.h",
210 "test/auto_test/fixtures/before_initialization_fixture.cc",
211 "test/auto_test/fixtures/before_initialization_fixture.h",
212 "test/auto_test/fixtures/before_streaming_fixture.cc",
213 "test/auto_test/fixtures/before_streaming_fixture.h",
214 "test/auto_test/resource_manager.cc",
215 "test/auto_test/standard/audio_processing_test.cc",
216 "test/auto_test/standard/codec_before_streaming_test.cc",
217 "test/auto_test/standard/codec_test.cc",
218 "test/auto_test/standard/dtmf_test.cc",
219 "test/auto_test/standard/external_media_test.cc",
220 "test/auto_test/standard/file_before_streaming_test.cc",
221 "test/auto_test/standard/file_test.cc",
222 "test/auto_test/standard/hardware_before_initializing_test.cc",
223 "test/auto_test/standard/hardware_test.cc",
224 "test/auto_test/standard/mixing_test.cc",
225 "test/auto_test/standard/neteq_stats_test.cc",
226 "test/auto_test/standard/rtp_rtcp_before_streaming_test.cc",
227 "test/auto_test/standard/rtp_rtcp_extensions.cc",
228 "test/auto_test/standard/rtp_rtcp_test.cc",
229 "test/auto_test/standard/video_sync_test.cc",
230 "test/auto_test/standard/voe_base_misc_test.cc",
231 "test/auto_test/standard/volume_test.cc",
232 "test/auto_test/voe_conference_test.cc",
233 "test/auto_test/voe_cpu_test.cc",
234 "test/auto_test/voe_cpu_test.h",
235 "test/auto_test/voe_output_test.cc",
236 "test/auto_test/voe_standard_test.cc",
237 "test/auto_test/voe_standard_test.h",
238 "test/auto_test/voe_stress_test.cc",
239 "test/auto_test/voe_stress_test.h",
240 "test/auto_test/voe_test_defines.h",
241 "test/auto_test/voe_test_interface.h",
242 ]
243
244 if (!is_android) {
245 # Some tests are not supported on android yet, exclude these tests.
246 sources +=
247 [ "test/auto_test/standard/hardware_before_streaming_test.cc" ]
248 }
249
250 defines = []
251
252 if (rtc_enable_protobuf) {
253 defines = [ "ENABLE_RTC_EVENT_LOG" ]
254 }
255
256 if (is_win) {
257 defines += [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
258
259 cflags = [
260 "/wd4267", # size_t to int truncation.
261 "/wd4373", # Virtual function override.
262 # TODO(kjellander): Bug 261: fix this warning.
263 ]
264 }
265
266 if (is_clang) {
267 # Suppress warnings from Chrome's Clang plugins.
268 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
269 configs -= [ "//build/config/clang:find_bad_constructs" ]
270 }
271 }
272 }
273}