blob: ed34637e3896279e34136c056d1f04bcbcf1e38d [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
kwiberg427ce3d2016-08-16 03:34:44 -070012source_set("audio_coder") {
13 sources = [
14 "coder.cc",
15 "coder.h",
16 ]
17 configs += [ "..:common_config" ]
18 public_configs = [ "..:common_inherited_config" ]
19 deps = [
20 "..:webrtc_common",
21 "../modules/audio_coding:audio_coding",
22 "../modules/audio_coding:builtin_audio_decoder_factory",
23 "../modules/audio_coding:rent_a_codec",
24 ]
25
26 if (is_clang) {
27 # Suppress warnings from Chrome's Clang plugins.
28 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
29 configs -= [ "//build/config/clang:find_bad_constructs" ]
30 }
31}
32
33source_set("file_player") {
34 sources = [
35 "file_player.h",
36 "file_player_impl.cc",
37 "file_player_impl.h",
38 ]
39 configs += [ "..:common_config" ]
40 public_configs = [ "..:common_inherited_config" ]
41 deps = [
42 ":audio_coder",
43 "..:webrtc_common",
44 "../common_audio:common_audio",
45 "../modules/media_file:media_file",
46 "../system_wrappers:system_wrappers",
47 ]
48
49 if (is_clang) {
50 # Suppress warnings from Chrome's Clang plugins.
51 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
52 configs -= [ "//build/config/clang:find_bad_constructs" ]
53 }
54}
55
56source_set("file_recorder") {
57 sources = [
58 "file_recorder.h",
59 "file_recorder_impl.cc",
60 "file_recorder_impl.h",
61 ]
62 configs += [ "..:common_config" ]
63 public_configs = [ "..:common_inherited_config" ]
64 deps = [
65 ":audio_coder",
66 "..:webrtc_common",
67 "../base:rtc_base_approved",
68 "../common_audio:common_audio",
69 "../modules/media_file:media_file",
70 "../system_wrappers:system_wrappers",
71 ]
72
73 if (is_clang) {
74 # Suppress warnings from Chrome's Clang plugins.
75 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
76 configs -= [ "//build/config/clang:find_bad_constructs" ]
77 }
78}
79
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000080source_set("voice_engine") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000081 sources = [
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020082 "channel.cc",
83 "channel.h",
84 "channel_manager.cc",
85 "channel_manager.h",
solenberg13725082015-11-25 08:16:52 -080086 "channel_proxy.cc",
87 "channel_proxy.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000088 "include/voe_audio_processing.h",
89 "include/voe_base.h",
90 "include/voe_codec.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000091 "include/voe_errors.h",
92 "include/voe_external_media.h",
93 "include/voe_file.h",
94 "include/voe_hardware.h",
95 "include/voe_neteq_stats.h",
96 "include/voe_network.h",
97 "include/voe_rtp_rtcp.h",
98 "include/voe_video_sync.h",
99 "include/voe_volume_control.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000100 "monitor_module.cc",
101 "monitor_module.h",
102 "network_predictor.cc",
103 "network_predictor.h",
104 "output_mixer.cc",
105 "output_mixer.h",
106 "shared_data.cc",
107 "shared_data.h",
108 "statistics.cc",
109 "statistics.h",
110 "transmit_mixer.cc",
111 "transmit_mixer.h",
112 "utility.cc",
113 "utility.h",
114 "voe_audio_processing_impl.cc",
115 "voe_audio_processing_impl.h",
116 "voe_base_impl.cc",
117 "voe_base_impl.h",
118 "voe_codec_impl.cc",
119 "voe_codec_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000120 "voe_external_media_impl.cc",
121 "voe_external_media_impl.h",
122 "voe_file_impl.cc",
123 "voe_file_impl.h",
124 "voe_hardware_impl.cc",
125 "voe_hardware_impl.h",
126 "voe_neteq_stats_impl.cc",
127 "voe_neteq_stats_impl.h",
128 "voe_network_impl.cc",
129 "voe_network_impl.h",
130 "voe_rtp_rtcp_impl.cc",
131 "voe_rtp_rtcp_impl.h",
132 "voe_video_sync_impl.cc",
133 "voe_video_sync_impl.h",
134 "voe_volume_control_impl.cc",
135 "voe_volume_control_impl.h",
136 "voice_engine_defines.h",
137 "voice_engine_impl.cc",
138 "voice_engine_impl.h",
139 ]
140
141 if (is_win) {
142 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000143
144 cflags = [
145 # TODO(kjellander): Bug 261: fix this warning.
ossua16f7a82016-07-08 02:12:55 -0700146 "/wd4373", # Virtual function override.
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000147 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000148 }
149
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000150 configs += [ "..:common_config" ]
151 public_configs = [ "..:common_inherited_config" ]
152
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000153 if (is_clang) {
154 # Suppress warnings from Chrome's Clang plugins.
155 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
156 configs -= [ "//build/config/clang:find_bad_constructs" ]
157 }
158
159 deps = [
kwiberg427ce3d2016-08-16 03:34:44 -0700160 ":file_player",
161 ":file_recorder",
aleloie6ca9ec2016-08-10 05:01:51 -0700162 ":level_indicator",
ivocb04965c2015-09-09 00:09:43 -0700163 "..:rtc_event_log",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000164 "..:webrtc_common",
kjellander@webrtc.org7ffeab52016-02-26 22:46:09 +0100165 "../base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000166 "../common_audio",
167 "../modules/audio_coding",
168 "../modules/audio_conference_mixer",
169 "../modules/audio_device",
170 "../modules/audio_processing",
171 "../modules/bitrate_controller",
172 "../modules/media_file",
Stefan Holmerb86d4e42015-12-07 10:26:18 +0100173 "../modules/pacing",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000174 "../modules/rtp_rtcp",
175 "../modules/utility",
176 "../system_wrappers",
177 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000178}
ossua16f7a82016-07-08 02:12:55 -0700179
aleloie6ca9ec2016-08-10 05:01:51 -0700180source_set("level_indicator") {
181 sources = [
182 "level_indicator.cc",
183 "level_indicator.h",
184 ]
185
186 configs += [ "..:common_config" ]
187 public_configs = [ "..:common_inherited_config" ]
188
189 deps = [
190 "..:webrtc_common",
191 "../base:rtc_base_approved",
192 "../common_audio",
193 ]
194}
195
ossua16f7a82016-07-08 02:12:55 -0700196if (rtc_include_tests) {
197 test("voice_engine_unittests") {
198 deps = [
199 ":voice_engine",
200 "//testing/gmock",
201 "//testing/gtest",
kwiberg427ce3d2016-08-16 03:34:44 -0700202 "//third_party/gflags",
ossua16f7a82016-07-08 02:12:55 -0700203 "//webrtc/common_audio",
204 "//webrtc/modules/audio_coding",
205 "//webrtc/modules/audio_conference_mixer",
206 "//webrtc/modules/audio_device",
207 "//webrtc/modules/audio_processing",
208 "//webrtc/modules/media_file",
209 "//webrtc/modules/rtp_rtcp",
210 "//webrtc/modules/utility",
211 "//webrtc/system_wrappers",
212 "//webrtc/test:test_support_main",
213 ]
214
215 if (is_android) {
216 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -0700217 shard_timeout = 900
kwiberg427ce3d2016-08-16 03:34:44 -0700218 data = [
219 "//resources/utility/encapsulated_pcm16b_8khz.wav",
220 "//resources/utility/encapsulated_pcmu_8khz.wav",
221 ]
ossua16f7a82016-07-08 02:12:55 -0700222 }
223
224 sources = [
225 "channel_unittest.cc",
kwiberg427ce3d2016-08-16 03:34:44 -0700226 "file_player_unittests.cc",
ossua16f7a82016-07-08 02:12:55 -0700227 "network_predictor_unittest.cc",
228 "transmit_mixer_unittest.cc",
229 "utility_unittest.cc",
230 "voe_audio_processing_unittest.cc",
231 "voe_base_unittest.cc",
232 "voe_codec_unittest.cc",
233 "voe_network_unittest.cc",
234 "voice_engine_fixture.cc",
235 "voice_engine_fixture.h",
236 ]
237
238 if (is_win) {
239 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
240
241 cflags = [
242 # TODO(kjellander): Bug 261: fix this warning.
243 "/wd4373", # Virtual function override.
244 ]
245 }
246
247 if (is_clang) {
248 # Suppress warnings from Chrome's Clang plugins.
249 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
250 configs -= [ "//build/config/clang:find_bad_constructs" ]
251 }
252 }
253
254 if (!is_ios) {
255 executable("voe_auto_test") {
256 testonly = true
257
258 deps = [
259 ":voice_engine",
260 "//testing/gmock",
261 "//testing/gtest",
262 "//third_party/gflags",
263 "//webrtc/:rtc_event_log",
264 "//webrtc/modules/video_capture",
265 "//webrtc/system_wrappers",
266 "//webrtc/system_wrappers/:system_wrappers_default",
267 "//webrtc/test/:channel_transport",
268 "//webrtc/test/:test_common",
269 "//webrtc/test/:test_support",
270 ]
271
272 sources = [
273 "test/auto_test/automated_mode.cc",
274 "test/auto_test/extended/agc_config_test.cc",
275 "test/auto_test/extended/ec_metrics_test.cc",
276 "test/auto_test/fakes/conference_transport.cc",
277 "test/auto_test/fakes/conference_transport.h",
278 "test/auto_test/fakes/loudest_filter.cc",
279 "test/auto_test/fakes/loudest_filter.h",
280 "test/auto_test/fixtures/after_initialization_fixture.cc",
281 "test/auto_test/fixtures/after_initialization_fixture.h",
282 "test/auto_test/fixtures/after_streaming_fixture.cc",
283 "test/auto_test/fixtures/after_streaming_fixture.h",
284 "test/auto_test/fixtures/before_initialization_fixture.cc",
285 "test/auto_test/fixtures/before_initialization_fixture.h",
286 "test/auto_test/fixtures/before_streaming_fixture.cc",
287 "test/auto_test/fixtures/before_streaming_fixture.h",
288 "test/auto_test/resource_manager.cc",
289 "test/auto_test/standard/audio_processing_test.cc",
290 "test/auto_test/standard/codec_before_streaming_test.cc",
291 "test/auto_test/standard/codec_test.cc",
292 "test/auto_test/standard/dtmf_test.cc",
293 "test/auto_test/standard/external_media_test.cc",
294 "test/auto_test/standard/file_before_streaming_test.cc",
295 "test/auto_test/standard/file_test.cc",
296 "test/auto_test/standard/hardware_before_initializing_test.cc",
297 "test/auto_test/standard/hardware_test.cc",
298 "test/auto_test/standard/mixing_test.cc",
299 "test/auto_test/standard/neteq_stats_test.cc",
300 "test/auto_test/standard/rtp_rtcp_before_streaming_test.cc",
301 "test/auto_test/standard/rtp_rtcp_extensions.cc",
302 "test/auto_test/standard/rtp_rtcp_test.cc",
303 "test/auto_test/standard/video_sync_test.cc",
304 "test/auto_test/standard/voe_base_misc_test.cc",
305 "test/auto_test/standard/volume_test.cc",
306 "test/auto_test/voe_conference_test.cc",
307 "test/auto_test/voe_cpu_test.cc",
308 "test/auto_test/voe_cpu_test.h",
309 "test/auto_test/voe_output_test.cc",
310 "test/auto_test/voe_standard_test.cc",
311 "test/auto_test/voe_standard_test.h",
312 "test/auto_test/voe_stress_test.cc",
313 "test/auto_test/voe_stress_test.h",
314 "test/auto_test/voe_test_defines.h",
315 "test/auto_test/voe_test_interface.h",
316 ]
317
318 if (!is_android) {
319 # Some tests are not supported on android yet, exclude these tests.
320 sources +=
321 [ "test/auto_test/standard/hardware_before_streaming_test.cc" ]
322 }
323
324 defines = []
325
326 if (rtc_enable_protobuf) {
327 defines = [ "ENABLE_RTC_EVENT_LOG" ]
328 }
329
330 if (is_win) {
331 defines += [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
332
333 cflags = [
334 "/wd4267", # size_t to int truncation.
335 "/wd4373", # Virtual function override.
336 # TODO(kjellander): Bug 261: fix this warning.
337 ]
338 }
339
340 if (is_clang) {
341 # Suppress warnings from Chrome's Clang plugins.
342 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
343 configs -= [ "//build/config/clang:find_bad_constructs" ]
344 }
345 }
346 }
347}