blob: e773ebd0497a64d98a79f017accc5824c3970fd0 [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")
10
ehmaldonado38a21322016-09-02 04:10:34 -070011rtc_source_set("voice_engine") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000012 sources = [
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020013 "channel.cc",
14 "channel.h",
15 "channel_manager.cc",
16 "channel_manager.h",
solenberg13725082015-11-25 08:16:52 -080017 "channel_proxy.cc",
18 "channel_proxy.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000019 "include/voe_audio_processing.h",
20 "include/voe_base.h",
21 "include/voe_codec.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000022 "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:53 +000031 "monitor_module.cc",
32 "monitor_module.h",
33 "network_predictor.cc",
34 "network_predictor.h",
35 "output_mixer.cc",
36 "output_mixer.h",
37 "shared_data.cc",
38 "shared_data.h",
39 "statistics.cc",
40 "statistics.h",
41 "transmit_mixer.cc",
42 "transmit_mixer.h",
43 "utility.cc",
44 "utility.h",
45 "voe_audio_processing_impl.cc",
46 "voe_audio_processing_impl.h",
47 "voe_base_impl.cc",
48 "voe_base_impl.h",
49 "voe_codec_impl.cc",
50 "voe_codec_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000051 "voe_external_media_impl.cc",
52 "voe_external_media_impl.h",
53 "voe_file_impl.cc",
54 "voe_file_impl.h",
55 "voe_hardware_impl.cc",
56 "voe_hardware_impl.h",
57 "voe_neteq_stats_impl.cc",
58 "voe_neteq_stats_impl.h",
59 "voe_network_impl.cc",
60 "voe_network_impl.h",
61 "voe_rtp_rtcp_impl.cc",
62 "voe_rtp_rtcp_impl.h",
63 "voe_video_sync_impl.cc",
64 "voe_video_sync_impl.h",
65 "voe_volume_control_impl.cc",
66 "voe_volume_control_impl.h",
67 "voice_engine_defines.h",
68 "voice_engine_impl.cc",
69 "voice_engine_impl.h",
70 ]
71
72 if (is_win) {
73 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +000074
75 cflags = [
76 # TODO(kjellander): Bug 261: fix this warning.
ossua16f7a82016-07-08 02:12:55 -070077 "/wd4373", # Virtual function override.
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +000078 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000079 }
80
81 if (is_clang) {
82 # Suppress warnings from Chrome's Clang plugins.
83 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -070084 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000085 }
86
ehmaldonado53cec042016-09-09 05:32:14 -070087 public_deps = [
88 "../modules/audio_coding",
89 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000090 deps = [
aleloie6ca9ec2016-08-10 05:01:51 -070091 ":level_indicator",
ivocb04965c2015-09-09 00:09:43 -070092 "..:rtc_event_log",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000093 "..:webrtc_common",
kjellandera69d9732016-08-31 07:33:05 -070094 "../api:call_api",
kjellander@webrtc.org7ffeab52016-02-26 22:46:09 +010095 "../base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000096 "../common_audio",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000097 "../modules/audio_conference_mixer",
98 "../modules/audio_device",
99 "../modules/audio_processing",
100 "../modules/bitrate_controller",
101 "../modules/media_file",
Stefan Holmerb86d4e42015-12-07 10:26:18 +0100102 "../modules/pacing",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000103 "../modules/rtp_rtcp",
104 "../modules/utility",
105 "../system_wrappers",
106 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000107}
ossua16f7a82016-07-08 02:12:55 -0700108
ehmaldonado38a21322016-09-02 04:10:34 -0700109rtc_source_set("level_indicator") {
aleloie6ca9ec2016-08-10 05:01:51 -0700110 sources = [
111 "level_indicator.cc",
112 "level_indicator.h",
113 ]
114
aleloie6ca9ec2016-08-10 05:01:51 -0700115 deps = [
116 "..:webrtc_common",
117 "../base:rtc_base_approved",
118 "../common_audio",
119 ]
120}
121
ossua16f7a82016-07-08 02:12:55 -0700122if (rtc_include_tests) {
ehmaldonado38a21322016-09-02 04:10:34 -0700123 rtc_test("voice_engine_unittests") {
ossua16f7a82016-07-08 02:12:55 -0700124 deps = [
125 ":voice_engine",
126 "//testing/gmock",
127 "//testing/gtest",
128 "//webrtc/common_audio",
129 "//webrtc/modules/audio_coding",
130 "//webrtc/modules/audio_conference_mixer",
131 "//webrtc/modules/audio_device",
132 "//webrtc/modules/audio_processing",
133 "//webrtc/modules/media_file",
134 "//webrtc/modules/rtp_rtcp",
135 "//webrtc/modules/utility",
136 "//webrtc/system_wrappers",
137 "//webrtc/test:test_support_main",
138 ]
139
140 if (is_android) {
141 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -0700142 shard_timeout = 900
ossua16f7a82016-07-08 02:12:55 -0700143 }
144
145 sources = [
146 "channel_unittest.cc",
147 "network_predictor_unittest.cc",
148 "transmit_mixer_unittest.cc",
149 "utility_unittest.cc",
150 "voe_audio_processing_unittest.cc",
151 "voe_base_unittest.cc",
152 "voe_codec_unittest.cc",
153 "voe_network_unittest.cc",
154 "voice_engine_fixture.cc",
155 "voice_engine_fixture.h",
156 ]
157
158 if (is_win) {
159 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
160
161 cflags = [
162 # TODO(kjellander): Bug 261: fix this warning.
163 "/wd4373", # Virtual function override.
164 ]
165 }
166
167 if (is_clang) {
168 # Suppress warnings from Chrome's Clang plugins.
169 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700170 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ossua16f7a82016-07-08 02:12:55 -0700171 }
172 }
173
174 if (!is_ios) {
ehmaldonado38a21322016-09-02 04:10:34 -0700175 rtc_executable("voe_auto_test") {
ossua16f7a82016-07-08 02:12:55 -0700176 testonly = true
177
178 deps = [
179 ":voice_engine",
180 "//testing/gmock",
181 "//testing/gtest",
182 "//third_party/gflags",
183 "//webrtc/:rtc_event_log",
184 "//webrtc/modules/video_capture",
185 "//webrtc/system_wrappers",
186 "//webrtc/system_wrappers/:system_wrappers_default",
solenberg07d9e542016-09-13 01:24:03 -0700187 "//webrtc/test/:channel_transport",
ossua16f7a82016-07-08 02:12:55 -0700188 "//webrtc/test/:test_common",
189 "//webrtc/test/:test_support",
190 ]
191
192 sources = [
193 "test/auto_test/automated_mode.cc",
194 "test/auto_test/extended/agc_config_test.cc",
195 "test/auto_test/extended/ec_metrics_test.cc",
196 "test/auto_test/fakes/conference_transport.cc",
197 "test/auto_test/fakes/conference_transport.h",
198 "test/auto_test/fakes/loudest_filter.cc",
199 "test/auto_test/fakes/loudest_filter.h",
200 "test/auto_test/fixtures/after_initialization_fixture.cc",
201 "test/auto_test/fixtures/after_initialization_fixture.h",
202 "test/auto_test/fixtures/after_streaming_fixture.cc",
203 "test/auto_test/fixtures/after_streaming_fixture.h",
204 "test/auto_test/fixtures/before_initialization_fixture.cc",
205 "test/auto_test/fixtures/before_initialization_fixture.h",
206 "test/auto_test/fixtures/before_streaming_fixture.cc",
207 "test/auto_test/fixtures/before_streaming_fixture.h",
208 "test/auto_test/resource_manager.cc",
209 "test/auto_test/standard/audio_processing_test.cc",
210 "test/auto_test/standard/codec_before_streaming_test.cc",
211 "test/auto_test/standard/codec_test.cc",
212 "test/auto_test/standard/dtmf_test.cc",
213 "test/auto_test/standard/external_media_test.cc",
214 "test/auto_test/standard/file_before_streaming_test.cc",
215 "test/auto_test/standard/file_test.cc",
216 "test/auto_test/standard/hardware_before_initializing_test.cc",
217 "test/auto_test/standard/hardware_test.cc",
218 "test/auto_test/standard/mixing_test.cc",
219 "test/auto_test/standard/neteq_stats_test.cc",
220 "test/auto_test/standard/rtp_rtcp_before_streaming_test.cc",
221 "test/auto_test/standard/rtp_rtcp_extensions.cc",
222 "test/auto_test/standard/rtp_rtcp_test.cc",
223 "test/auto_test/standard/video_sync_test.cc",
224 "test/auto_test/standard/voe_base_misc_test.cc",
225 "test/auto_test/standard/volume_test.cc",
226 "test/auto_test/voe_conference_test.cc",
227 "test/auto_test/voe_cpu_test.cc",
228 "test/auto_test/voe_cpu_test.h",
229 "test/auto_test/voe_output_test.cc",
230 "test/auto_test/voe_standard_test.cc",
231 "test/auto_test/voe_standard_test.h",
232 "test/auto_test/voe_stress_test.cc",
233 "test/auto_test/voe_stress_test.h",
234 "test/auto_test/voe_test_defines.h",
235 "test/auto_test/voe_test_interface.h",
236 ]
237
238 if (!is_android) {
239 # Some tests are not supported on android yet, exclude these tests.
240 sources +=
241 [ "test/auto_test/standard/hardware_before_streaming_test.cc" ]
242 }
243
244 defines = []
245
246 if (rtc_enable_protobuf) {
247 defines = [ "ENABLE_RTC_EVENT_LOG" ]
248 }
249
250 if (is_win) {
251 defines += [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
252
253 cflags = [
254 "/wd4267", # size_t to int truncation.
255 "/wd4373", # Virtual function override.
256 # TODO(kjellander): Bug 261: fix this warning.
257 ]
258 }
259
260 if (is_clang) {
261 # Suppress warnings from Chrome's Clang plugins.
262 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700263 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ossua16f7a82016-07-08 02:12:55 -0700264 }
265 }
266 }
267}