blob: 0cdca05b1061ee901ec24fa772fbc160249a0fc4 [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:071# 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")
10
kjellanderb62dbbe2016-09-23 07:38:5211rtc_static_library("voice_engine") {
kjellander@webrtc.org524b8f72014-08-31 20:32:5312 sources = [
Henrik Kjellander57e5fd22015-05-25 10:55:3913 "channel.cc",
14 "channel.h",
15 "channel_manager.cc",
16 "channel_manager.h",
solenberg13725082015-11-25 16:16:5217 "channel_proxy.cc",
18 "channel_proxy.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:5319 "include/voe_audio_processing.h",
20 "include/voe_base.h",
21 "include/voe_codec.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:5322 "include/voe_errors.h",
23 "include/voe_external_media.h",
24 "include/voe_file.h",
25 "include/voe_hardware.h",
26 "include/voe_neteq_stats.h",
27 "include/voe_network.h",
28 "include/voe_rtp_rtcp.h",
29 "include/voe_video_sync.h",
30 "include/voe_volume_control.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:5331 "monitor_module.cc",
32 "monitor_module.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:5333 "output_mixer.cc",
34 "output_mixer.h",
35 "shared_data.cc",
36 "shared_data.h",
37 "statistics.cc",
38 "statistics.h",
39 "transmit_mixer.cc",
40 "transmit_mixer.h",
41 "utility.cc",
42 "utility.h",
43 "voe_audio_processing_impl.cc",
44 "voe_audio_processing_impl.h",
45 "voe_base_impl.cc",
46 "voe_base_impl.h",
47 "voe_codec_impl.cc",
48 "voe_codec_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:5349 "voe_external_media_impl.cc",
50 "voe_external_media_impl.h",
51 "voe_file_impl.cc",
52 "voe_file_impl.h",
53 "voe_hardware_impl.cc",
54 "voe_hardware_impl.h",
55 "voe_neteq_stats_impl.cc",
56 "voe_neteq_stats_impl.h",
57 "voe_network_impl.cc",
58 "voe_network_impl.h",
59 "voe_rtp_rtcp_impl.cc",
60 "voe_rtp_rtcp_impl.h",
61 "voe_video_sync_impl.cc",
62 "voe_video_sync_impl.h",
63 "voe_volume_control_impl.cc",
64 "voe_volume_control_impl.h",
65 "voice_engine_defines.h",
66 "voice_engine_impl.cc",
67 "voice_engine_impl.h",
68 ]
69
70 if (is_win) {
71 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
kjellander@webrtc.org8649fed2015-01-08 21:22:0172
73 cflags = [
74 # TODO(kjellander): Bug 261: fix this warning.
ossua16f7a82016-07-08 09:12:5575 "/wd4373", # Virtual function override.
kjellander@webrtc.org8649fed2015-01-08 21:22:0176 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:5377 }
78
kjellandere40a7ee2016-10-17 06:56:1279 if (!build_with_chromium && is_clang) {
80 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 11:10:3481 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:5382 }
83
ehmaldonado53cec042016-09-09 12:32:1484 public_deps = [
85 "../modules/audio_coding",
86 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:5387 deps = [
aleloie6ca9ec2016-08-10 12:01:5188 ":level_indicator",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:2289 "..:webrtc_common",
aleloiaed581a2016-10-20 13:32:3990 "../api:audio_mixer_api",
kjellandera69d9732016-08-31 14:33:0591 "../api:call_api",
aleloia8eb7562016-11-28 15:02:1392 "../api:transport_api",
kjellander@webrtc.org7ffeab52016-02-26 21:46:0993 "../base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:5394 "../common_audio",
skvladcc91d282016-10-04 01:31:2295 "../logging:rtc_event_log_api",
aleloi9ae585d2016-10-13 13:57:1696 "../modules/audio_coding:audio_decoder_factory_interface",
kwibergda2bf4e2016-10-24 20:47:0997 "../modules/audio_coding:audio_format_conversion",
aleloi9ae585d2016-10-13 13:57:1698 "../modules/audio_coding:builtin_audio_decoder_factory",
99 "../modules/audio_coding:rent_a_codec",
kjellander@webrtc.org524b8f72014-08-31 20:32:53100 "../modules/audio_conference_mixer",
101 "../modules/audio_device",
102 "../modules/audio_processing",
103 "../modules/bitrate_controller",
104 "../modules/media_file",
Stefan Holmerb86d4e42015-12-07 09:26:18105 "../modules/pacing",
kjellander@webrtc.org524b8f72014-08-31 20:32:53106 "../modules/rtp_rtcp",
107 "../modules/utility",
108 "../system_wrappers",
109 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07110}
ossua16f7a82016-07-08 09:12:55111
kjellanderb62dbbe2016-09-23 07:38:52112rtc_static_library("level_indicator") {
aleloie6ca9ec2016-08-10 12:01:51113 sources = [
114 "level_indicator.cc",
115 "level_indicator.h",
116 ]
117
aleloie6ca9ec2016-08-10 12:01:51118 deps = [
119 "..:webrtc_common",
120 "../base:rtc_base_approved",
121 "../common_audio",
122 ]
123}
124
ossua16f7a82016-07-08 09:12:55125if (rtc_include_tests) {
solenbergba56b6c2016-09-13 14:29:12126 config("channel_transport_warnings_config") {
127 if (is_win) {
128 cflags = [ "/wd4302" ] # cast truncation
129
130 if (is_clang) {
131 # GN orders flags on a target before flags from configs. The default
132 # config adds -Wall, and this flag have to be after -Wall -- so they need
133 # to come from a config and cannot be on the target directly.
134 cflags += [
135 "-Wno-parentheses-equality",
136 "-Wno-reorder",
137 "-Wno-tautological-constant-out-of-range-compare",
138
139 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6268
140 # for -Wno-thread-safety-analysis
141 "-Wno-thread-safety-analysis",
142 "-Wno-unused-private-field",
143 ]
144 }
145 }
146 }
147
kjellanderb62dbbe2016-09-23 07:38:52148 rtc_static_library("channel_transport") {
solenbergba56b6c2016-09-13 14:29:12149 testonly = true
150 sources = [
151 "test/channel_transport/channel_transport.cc",
152 "test/channel_transport/channel_transport.h",
153 "test/channel_transport/traffic_control_win.cc",
154 "test/channel_transport/traffic_control_win.h",
155 "test/channel_transport/udp_socket2_manager_win.cc",
156 "test/channel_transport/udp_socket2_manager_win.h",
157 "test/channel_transport/udp_socket2_win.cc",
158 "test/channel_transport/udp_socket2_win.h",
159 "test/channel_transport/udp_socket_manager_posix.cc",
160 "test/channel_transport/udp_socket_manager_posix.h",
161 "test/channel_transport/udp_socket_manager_wrapper.cc",
162 "test/channel_transport/udp_socket_manager_wrapper.h",
163 "test/channel_transport/udp_socket_posix.cc",
164 "test/channel_transport/udp_socket_posix.h",
165 "test/channel_transport/udp_socket_wrapper.cc",
166 "test/channel_transport/udp_socket_wrapper.h",
167 "test/channel_transport/udp_transport.h",
168 "test/channel_transport/udp_transport_impl.cc",
169 "test/channel_transport/udp_transport_impl.h",
170 ]
171
172 configs += [ ":channel_transport_warnings_config" ]
173
kjellandere40a7ee2016-10-17 06:56:12174 if (!build_with_chromium && is_clang) {
175 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
solenbergba56b6c2016-09-13 14:29:12176 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
177 }
178
179 deps = [
180 "..:webrtc_common",
aleloia8eb7562016-11-28 15:02:13181 "../api:transport_api",
solenbergba56b6c2016-09-13 14:29:12182 "../system_wrappers",
183 "//testing/gtest",
184 ]
185 }
186
ehmaldonado38a21322016-09-02 11:10:34187 rtc_test("voice_engine_unittests") {
ossua16f7a82016-07-08 09:12:55188 deps = [
solenbergba56b6c2016-09-13 14:29:12189 ":channel_transport",
ossua16f7a82016-07-08 09:12:55190 ":voice_engine",
191 "//testing/gmock",
192 "//testing/gtest",
193 "//webrtc/common_audio",
194 "//webrtc/modules/audio_coding",
195 "//webrtc/modules/audio_conference_mixer",
196 "//webrtc/modules/audio_device",
197 "//webrtc/modules/audio_processing",
198 "//webrtc/modules/media_file",
199 "//webrtc/modules/rtp_rtcp",
solenberg71b9b582016-11-25 19:45:05200 "//webrtc/modules/utility",
ossua16f7a82016-07-08 09:12:55201 "//webrtc/system_wrappers",
202 "//webrtc/test:test_support_main",
203 ]
204
205 if (is_android) {
206 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 09:29:11207 shard_timeout = 900
ossua16f7a82016-07-08 09:12:55208 }
209
210 sources = [
211 "channel_unittest.cc",
solenbergba56b6c2016-09-13 14:29:12212 "test/channel_transport/udp_socket_manager_unittest.cc",
213 "test/channel_transport/udp_socket_wrapper_unittest.cc",
214 "test/channel_transport/udp_transport_unittest.cc",
ossua16f7a82016-07-08 09:12:55215 "transmit_mixer_unittest.cc",
216 "utility_unittest.cc",
217 "voe_audio_processing_unittest.cc",
218 "voe_base_unittest.cc",
219 "voe_codec_unittest.cc",
220 "voe_network_unittest.cc",
221 "voice_engine_fixture.cc",
222 "voice_engine_fixture.h",
223 ]
224
225 if (is_win) {
226 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
227
228 cflags = [
229 # TODO(kjellander): Bug 261: fix this warning.
230 "/wd4373", # Virtual function override.
231 ]
232 }
233
kjellandere40a7ee2016-10-17 06:56:12234 if (!build_with_chromium && is_clang) {
235 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 11:10:34236 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ossua16f7a82016-07-08 09:12:55237 }
238 }
239
solenbergfb2c1d02016-09-15 20:12:02240 rtc_executable("voe_cmd_test") {
241 testonly = true
242
243 deps = [
244 ":channel_transport",
245 ":voice_engine",
246 "//testing/gtest",
247 "//third_party/gflags",
skvladcc91d282016-10-04 01:31:22248 "//webrtc/logging:rtc_event_log_api",
solenbergfb2c1d02016-09-15 20:12:02249 "//webrtc/system_wrappers",
250 "//webrtc/system_wrappers:system_wrappers_default",
251 "//webrtc/test:test_support",
252 ]
253
254 sources = [
255 "test/cmd_test/voe_cmd_test.cc",
256 ]
257
kjellandere40a7ee2016-10-17 06:56:12258 if (!build_with_chromium && is_clang) {
259 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
solenbergfb2c1d02016-09-15 20:12:02260 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
261 }
262 }
263
ossua16f7a82016-07-08 09:12:55264 if (!is_ios) {
ehmaldonado38a21322016-09-02 11:10:34265 rtc_executable("voe_auto_test") {
ossua16f7a82016-07-08 09:12:55266 testonly = true
267
268 deps = [
solenbergba56b6c2016-09-13 14:29:12269 ":channel_transport",
ossua16f7a82016-07-08 09:12:55270 ":voice_engine",
271 "//testing/gmock",
272 "//testing/gtest",
273 "//third_party/gflags",
skvladcc91d282016-10-04 01:31:22274 "//webrtc/logging:rtc_event_log_api",
ossua16f7a82016-07-08 09:12:55275 "//webrtc/modules/video_capture",
276 "//webrtc/system_wrappers",
277 "//webrtc/system_wrappers/:system_wrappers_default",
ossua16f7a82016-07-08 09:12:55278 "//webrtc/test/:test_common",
279 "//webrtc/test/:test_support",
280 ]
281
282 sources = [
283 "test/auto_test/automated_mode.cc",
284 "test/auto_test/extended/agc_config_test.cc",
285 "test/auto_test/extended/ec_metrics_test.cc",
286 "test/auto_test/fakes/conference_transport.cc",
287 "test/auto_test/fakes/conference_transport.h",
288 "test/auto_test/fakes/loudest_filter.cc",
289 "test/auto_test/fakes/loudest_filter.h",
290 "test/auto_test/fixtures/after_initialization_fixture.cc",
291 "test/auto_test/fixtures/after_initialization_fixture.h",
292 "test/auto_test/fixtures/after_streaming_fixture.cc",
293 "test/auto_test/fixtures/after_streaming_fixture.h",
294 "test/auto_test/fixtures/before_initialization_fixture.cc",
295 "test/auto_test/fixtures/before_initialization_fixture.h",
296 "test/auto_test/fixtures/before_streaming_fixture.cc",
297 "test/auto_test/fixtures/before_streaming_fixture.h",
ossua16f7a82016-07-08 09:12:55298 "test/auto_test/standard/audio_processing_test.cc",
299 "test/auto_test/standard/codec_before_streaming_test.cc",
300 "test/auto_test/standard/codec_test.cc",
301 "test/auto_test/standard/dtmf_test.cc",
302 "test/auto_test/standard/external_media_test.cc",
303 "test/auto_test/standard/file_before_streaming_test.cc",
304 "test/auto_test/standard/file_test.cc",
305 "test/auto_test/standard/hardware_before_initializing_test.cc",
306 "test/auto_test/standard/hardware_test.cc",
307 "test/auto_test/standard/mixing_test.cc",
308 "test/auto_test/standard/neteq_stats_test.cc",
309 "test/auto_test/standard/rtp_rtcp_before_streaming_test.cc",
310 "test/auto_test/standard/rtp_rtcp_extensions.cc",
311 "test/auto_test/standard/rtp_rtcp_test.cc",
312 "test/auto_test/standard/video_sync_test.cc",
313 "test/auto_test/standard/voe_base_misc_test.cc",
314 "test/auto_test/standard/volume_test.cc",
315 "test/auto_test/voe_conference_test.cc",
316 "test/auto_test/voe_cpu_test.cc",
317 "test/auto_test/voe_cpu_test.h",
318 "test/auto_test/voe_output_test.cc",
319 "test/auto_test/voe_standard_test.cc",
320 "test/auto_test/voe_standard_test.h",
321 "test/auto_test/voe_stress_test.cc",
322 "test/auto_test/voe_stress_test.h",
323 "test/auto_test/voe_test_defines.h",
324 "test/auto_test/voe_test_interface.h",
325 ]
326
327 if (!is_android) {
328 # Some tests are not supported on android yet, exclude these tests.
329 sources +=
330 [ "test/auto_test/standard/hardware_before_streaming_test.cc" ]
331 }
332
333 defines = []
334
335 if (rtc_enable_protobuf) {
336 defines = [ "ENABLE_RTC_EVENT_LOG" ]
337 }
338
339 if (is_win) {
340 defines += [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
341
342 cflags = [
343 "/wd4267", # size_t to int truncation.
344 "/wd4373", # Virtual function override.
345 # TODO(kjellander): Bug 261: fix this warning.
346 ]
347 }
348
kjellandere40a7ee2016-10-17 06:56:12349 if (!build_with_chromium && is_clang) {
350 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 11:10:34351 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ossua16f7a82016-07-08 09:12:55352 }
353 }
354 }
355}