blob: b587d04073fb778585174cb4a694a45bd0440da5 [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 "level_indicator.cc",
33 "level_indicator.h",
34 "monitor_module.cc",
35 "monitor_module.h",
36 "network_predictor.cc",
37 "network_predictor.h",
38 "output_mixer.cc",
39 "output_mixer.h",
40 "shared_data.cc",
41 "shared_data.h",
42 "statistics.cc",
43 "statistics.h",
44 "transmit_mixer.cc",
45 "transmit_mixer.h",
46 "utility.cc",
47 "utility.h",
48 "voe_audio_processing_impl.cc",
49 "voe_audio_processing_impl.h",
50 "voe_base_impl.cc",
51 "voe_base_impl.h",
52 "voe_codec_impl.cc",
53 "voe_codec_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000054 "voe_external_media_impl.cc",
55 "voe_external_media_impl.h",
56 "voe_file_impl.cc",
57 "voe_file_impl.h",
58 "voe_hardware_impl.cc",
59 "voe_hardware_impl.h",
60 "voe_neteq_stats_impl.cc",
61 "voe_neteq_stats_impl.h",
62 "voe_network_impl.cc",
63 "voe_network_impl.h",
64 "voe_rtp_rtcp_impl.cc",
65 "voe_rtp_rtcp_impl.h",
66 "voe_video_sync_impl.cc",
67 "voe_video_sync_impl.h",
68 "voe_volume_control_impl.cc",
69 "voe_volume_control_impl.h",
70 "voice_engine_defines.h",
71 "voice_engine_impl.cc",
72 "voice_engine_impl.h",
73 ]
74
75 if (is_win) {
76 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +000077
78 cflags = [
79 # TODO(kjellander): Bug 261: fix this warning.
ossua16f7a82016-07-08 02:12:55 -070080 "/wd4373", # Virtual function override.
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +000081 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000082 }
83
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +000084 configs += [ "..:common_config" ]
85 public_configs = [ "..:common_inherited_config" ]
86
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000087 if (is_clang) {
88 # Suppress warnings from Chrome's Clang plugins.
89 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
90 configs -= [ "//build/config/clang:find_bad_constructs" ]
91 }
92
93 deps = [
ivocb04965c2015-09-09 00:09:43 -070094 "..:rtc_event_log",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000095 "..:webrtc_common",
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
111if (rtc_include_tests) {
112 test("voice_engine_unittests") {
113 deps = [
114 ":voice_engine",
115 "//testing/gmock",
116 "//testing/gtest",
117 "//webrtc/common_audio",
118 "//webrtc/modules/audio_coding",
119 "//webrtc/modules/audio_conference_mixer",
120 "//webrtc/modules/audio_device",
121 "//webrtc/modules/audio_processing",
122 "//webrtc/modules/media_file",
123 "//webrtc/modules/rtp_rtcp",
124 "//webrtc/modules/utility",
125 "//webrtc/system_wrappers",
126 "//webrtc/test:test_support_main",
127 ]
128
129 if (is_android) {
130 deps += [ "//testing/android/native_test:native_test_native_code" ]
131 }
132
133 sources = [
134 "channel_unittest.cc",
135 "network_predictor_unittest.cc",
136 "transmit_mixer_unittest.cc",
137 "utility_unittest.cc",
138 "voe_audio_processing_unittest.cc",
139 "voe_base_unittest.cc",
140 "voe_codec_unittest.cc",
141 "voe_network_unittest.cc",
142 "voice_engine_fixture.cc",
143 "voice_engine_fixture.h",
144 ]
145
146 if (is_win) {
147 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
148
149 cflags = [
150 # TODO(kjellander): Bug 261: fix this warning.
151 "/wd4373", # Virtual function override.
152 ]
153 }
154
155 if (is_clang) {
156 # Suppress warnings from Chrome's Clang plugins.
157 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
158 configs -= [ "//build/config/clang:find_bad_constructs" ]
159 }
160 }
161
162 if (!is_ios) {
163 executable("voe_auto_test") {
164 testonly = true
165
166 deps = [
167 ":voice_engine",
168 "//testing/gmock",
169 "//testing/gtest",
170 "//third_party/gflags",
171 "//webrtc/:rtc_event_log",
172 "//webrtc/modules/video_capture",
173 "//webrtc/system_wrappers",
174 "//webrtc/system_wrappers/:system_wrappers_default",
175 "//webrtc/test/:channel_transport",
176 "//webrtc/test/:test_common",
177 "//webrtc/test/:test_support",
178 ]
179
180 sources = [
181 "test/auto_test/automated_mode.cc",
182 "test/auto_test/extended/agc_config_test.cc",
183 "test/auto_test/extended/ec_metrics_test.cc",
184 "test/auto_test/fakes/conference_transport.cc",
185 "test/auto_test/fakes/conference_transport.h",
186 "test/auto_test/fakes/loudest_filter.cc",
187 "test/auto_test/fakes/loudest_filter.h",
188 "test/auto_test/fixtures/after_initialization_fixture.cc",
189 "test/auto_test/fixtures/after_initialization_fixture.h",
190 "test/auto_test/fixtures/after_streaming_fixture.cc",
191 "test/auto_test/fixtures/after_streaming_fixture.h",
192 "test/auto_test/fixtures/before_initialization_fixture.cc",
193 "test/auto_test/fixtures/before_initialization_fixture.h",
194 "test/auto_test/fixtures/before_streaming_fixture.cc",
195 "test/auto_test/fixtures/before_streaming_fixture.h",
196 "test/auto_test/resource_manager.cc",
197 "test/auto_test/standard/audio_processing_test.cc",
198 "test/auto_test/standard/codec_before_streaming_test.cc",
199 "test/auto_test/standard/codec_test.cc",
200 "test/auto_test/standard/dtmf_test.cc",
201 "test/auto_test/standard/external_media_test.cc",
202 "test/auto_test/standard/file_before_streaming_test.cc",
203 "test/auto_test/standard/file_test.cc",
204 "test/auto_test/standard/hardware_before_initializing_test.cc",
205 "test/auto_test/standard/hardware_test.cc",
206 "test/auto_test/standard/mixing_test.cc",
207 "test/auto_test/standard/neteq_stats_test.cc",
208 "test/auto_test/standard/rtp_rtcp_before_streaming_test.cc",
209 "test/auto_test/standard/rtp_rtcp_extensions.cc",
210 "test/auto_test/standard/rtp_rtcp_test.cc",
211 "test/auto_test/standard/video_sync_test.cc",
212 "test/auto_test/standard/voe_base_misc_test.cc",
213 "test/auto_test/standard/volume_test.cc",
214 "test/auto_test/voe_conference_test.cc",
215 "test/auto_test/voe_cpu_test.cc",
216 "test/auto_test/voe_cpu_test.h",
217 "test/auto_test/voe_output_test.cc",
218 "test/auto_test/voe_standard_test.cc",
219 "test/auto_test/voe_standard_test.h",
220 "test/auto_test/voe_stress_test.cc",
221 "test/auto_test/voe_stress_test.h",
222 "test/auto_test/voe_test_defines.h",
223 "test/auto_test/voe_test_interface.h",
224 ]
225
226 if (!is_android) {
227 # Some tests are not supported on android yet, exclude these tests.
228 sources +=
229 [ "test/auto_test/standard/hardware_before_streaming_test.cc" ]
230 }
231
232 defines = []
233
234 if (rtc_enable_protobuf) {
235 defines = [ "ENABLE_RTC_EVENT_LOG" ]
236 }
237
238 if (is_win) {
239 defines += [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
240
241 cflags = [
242 "/wd4267", # size_t to int truncation.
243 "/wd4373", # Virtual function override.
244 # TODO(kjellander): Bug 261: fix this warning.
245 ]
246 }
247
248 if (is_clang) {
249 # Suppress warnings from Chrome's Clang plugins.
250 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
251 configs -= [ "//build/config/clang:find_bad_constructs" ]
252 }
253 }
254 }
255}