blob: ca774f28006878e345115d37f6171b8c46f6d6e9 [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
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../webrtc.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000010
kwiberg97744472017-01-10 01:12:51 -080011rtc_static_library("audio_coder") {
12 sources = [
13 "coder.cc",
14 "coder.h",
15 ]
16 deps = [
17 "..:webrtc_common",
kwiberg087bd342017-02-10 08:15:44 -080018 "../api/audio_codecs:builtin_audio_decoder_factory",
kwiberg97744472017-01-10 01:12:51 -080019 "../modules/audio_coding",
ossua1a040a2017-04-06 10:03:21 -070020 "../modules/audio_coding:audio_encoder_factory_interface",
kwiberg97744472017-01-10 01:12:51 -080021 "../modules/audio_coding:audio_format_conversion",
ossua1a040a2017-04-06 10:03:21 -070022 "../modules/audio_coding:builtin_audio_encoder_factory",
kwiberg97744472017-01-10 01:12:51 -080023 "../modules/audio_coding:rent_a_codec",
24 ]
25
26 if (!build_with_chromium && is_clang) {
27 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
28 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
29 }
30}
31
32rtc_static_library("file_player") {
33 sources = [
34 "file_player.cc",
35 "file_player.h",
36 ]
37 deps = [
38 ":audio_coder",
39 "..:webrtc_common",
nisse368f5cf2017-04-05 05:00:33 -070040 "../base:rtc_base_approved",
kwiberg97744472017-01-10 01:12:51 -080041 "../common_audio",
42 "../modules/media_file",
kwiberg97744472017-01-10 01:12:51 -080043 ]
44
45 if (!build_with_chromium && is_clang) {
46 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
47 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
48 }
49}
50
51rtc_static_library("file_recorder") {
52 sources = [
53 "file_recorder.cc",
54 "file_recorder.h",
55 ]
56 deps = [
57 ":audio_coder",
58 "..:webrtc_common",
59 "../base:rtc_base_approved",
60 "../common_audio",
61 "../modules/media_file:media_file",
62 "../system_wrappers",
63 ]
64
65 if (!build_with_chromium && is_clang) {
66 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
67 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
68 }
69}
70
kjellanderb62dbbe2016-09-23 00:38:52 -070071rtc_static_library("voice_engine") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000072 sources = [
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020073 "channel.cc",
74 "channel.h",
75 "channel_manager.cc",
76 "channel_manager.h",
solenberg13725082015-11-25 08:16:52 -080077 "channel_proxy.cc",
78 "channel_proxy.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000079 "include/voe_base.h",
80 "include/voe_codec.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000081 "include/voe_errors.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000082 "include/voe_file.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000083 "include/voe_network.h",
84 "include/voe_rtp_rtcp.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000085 "monitor_module.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000086 "output_mixer.cc",
87 "output_mixer.h",
88 "shared_data.cc",
89 "shared_data.h",
90 "statistics.cc",
91 "statistics.h",
92 "transmit_mixer.cc",
93 "transmit_mixer.h",
minyue435ddf92017-01-23 08:07:05 -080094 "transport_feedback_packet_loss_tracker.cc",
95 "transport_feedback_packet_loss_tracker.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000096 "utility.cc",
97 "utility.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000098 "voe_base_impl.cc",
99 "voe_base_impl.h",
100 "voe_codec_impl.cc",
101 "voe_codec_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000102 "voe_file_impl.cc",
103 "voe_file_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000104 "voe_network_impl.cc",
105 "voe_network_impl.h",
106 "voe_rtp_rtcp_impl.cc",
107 "voe_rtp_rtcp_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000108 "voice_engine_defines.h",
109 "voice_engine_impl.cc",
110 "voice_engine_impl.h",
111 ]
112
113 if (is_win) {
114 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000115
116 cflags = [
117 # TODO(kjellander): Bug 261: fix this warning.
ossua16f7a82016-07-08 02:12:55 -0700118 "/wd4373", # Virtual function override.
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000119 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000120 }
121
kjellandere40a7ee2016-10-16 23:56:12 -0700122 if (!build_with_chromium && is_clang) {
123 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700124 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000125 }
126
ehmaldonado53cec042016-09-09 05:32:14 -0700127 public_deps = [
128 "../modules/audio_coding",
129 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000130 deps = [
henrik.lundin92a7a182017-03-07 01:58:55 -0800131 ":audio_level",
kwiberg97744472017-01-10 01:12:51 -0800132 ":file_player",
133 ":file_recorder",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000134 "..:webrtc_common",
aleloiaed581a2016-10-20 06:32:39 -0700135 "../api:audio_mixer_api",
kjellandera69d9732016-08-31 07:33:05 -0700136 "../api:call_api",
hbos8d609f62017-04-10 07:39:05 -0700137 "../api:libjingle_peerconnection_api",
aleloia8eb7562016-11-28 07:02:13 -0800138 "../api:transport_api",
kwiberg087bd342017-02-10 08:15:44 -0800139 "../api/audio_codecs:audio_codecs_api",
140 "../api/audio_codecs:builtin_audio_decoder_factory",
aleloi6321b492016-12-05 01:46:09 -0800141 "../audio/utility:audio_frame_operations",
kjellander@webrtc.org7ffeab52016-02-26 22:46:09 +0100142 "../base:rtc_base_approved",
henrikaec6fbd22017-03-31 05:43:36 -0700143 "../base:rtc_task_queue",
nisseb8f9a322017-03-27 05:36:15 -0700144
145 # TODO(nisse): Delete when declaration of RtpTransportController
146 # and related interfaces move to api/.
147 "../call:call_interfaces",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000148 "../common_audio",
skvladcc91d282016-10-03 18:31:22 -0700149 "../logging:rtc_event_log_api",
ossu1ffbd6c2017-04-06 12:05:04 -0700150 "../modules/audio_coding:audio_encoder_interface",
kwibergda2bf4e2016-10-24 13:47:09 -0700151 "../modules/audio_coding:audio_format_conversion",
aleloi9ae585d2016-10-13 06:57:16 -0700152 "../modules/audio_coding:rent_a_codec",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000153 "../modules/audio_conference_mixer",
154 "../modules/audio_device",
155 "../modules/audio_processing",
156 "../modules/bitrate_controller",
157 "../modules/media_file",
Stefan Holmerb86d4e42015-12-07 10:26:18 +0100158 "../modules/pacing",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000159 "../modules/rtp_rtcp",
160 "../modules/utility",
161 "../system_wrappers",
162 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000163}
ossua16f7a82016-07-08 02:12:55 -0700164
henrik.lundin92a7a182017-03-07 01:58:55 -0800165rtc_static_library("audio_level") {
aleloie6ca9ec2016-08-10 05:01:51 -0700166 sources = [
henrik.lundin92a7a182017-03-07 01:58:55 -0800167 "audio_level.cc",
168 "audio_level.h",
aleloie6ca9ec2016-08-10 05:01:51 -0700169 ]
170
aleloie6ca9ec2016-08-10 05:01:51 -0700171 deps = [
172 "..:webrtc_common",
173 "../base:rtc_base_approved",
174 "../common_audio",
175 ]
176}
177
ossua16f7a82016-07-08 02:12:55 -0700178if (rtc_include_tests) {
ehmaldonado38a21322016-09-02 04:10:34 -0700179 rtc_test("voice_engine_unittests") {
ossua16f7a82016-07-08 02:12:55 -0700180 deps = [
kjellandercfa95aa2017-03-02 21:28:23 -0800181 ":file_player",
ossua16f7a82016-07-08 02:12:55 -0700182 ":voice_engine",
kjellandercfa95aa2017-03-02 21:28:23 -0800183 "../base:rtc_base_approved",
184 "../test:test_common",
ossua16f7a82016-07-08 02:12:55 -0700185 "//testing/gmock",
186 "//testing/gtest",
kwiberg97744472017-01-10 01:12:51 -0800187 "//third_party/gflags",
ossua16f7a82016-07-08 02:12:55 -0700188 "//webrtc/common_audio",
189 "//webrtc/modules/audio_coding",
190 "//webrtc/modules/audio_conference_mixer",
191 "//webrtc/modules/audio_device",
192 "//webrtc/modules/audio_processing",
193 "//webrtc/modules/media_file",
194 "//webrtc/modules/rtp_rtcp",
solenberg71b9b582016-11-25 11:45:05 -0800195 "//webrtc/modules/utility",
kjellandercfa95aa2017-03-02 21:28:23 -0800196 "//webrtc/modules/video_capture:video_capture",
ossua16f7a82016-07-08 02:12:55 -0700197 "//webrtc/system_wrappers",
ehmaldonado26bddb92016-11-30 06:12:01 -0800198 "//webrtc/test:test_main",
kjellandercfa95aa2017-03-02 21:28:23 -0800199 "//webrtc/test:video_test_common",
ossua16f7a82016-07-08 02:12:55 -0700200 ]
201
202 if (is_android) {
203 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -0700204 shard_timeout = 900
ossua16f7a82016-07-08 02:12:55 -0700205 }
206
207 sources = [
208 "channel_unittest.cc",
kwiberg97744472017-01-10 01:12:51 -0800209 "file_player_unittests.cc",
minyue435ddf92017-01-23 08:07:05 -0800210 "transport_feedback_packet_loss_tracker_unittest.cc",
ossua16f7a82016-07-08 02:12:55 -0700211 "utility_unittest.cc",
ossua16f7a82016-07-08 02:12:55 -0700212 "voe_base_unittest.cc",
213 "voe_codec_unittest.cc",
214 "voe_network_unittest.cc",
215 "voice_engine_fixture.cc",
216 "voice_engine_fixture.h",
217 ]
218
kwiberg97744472017-01-10 01:12:51 -0800219 data = [
220 "//resources/utility/encapsulated_pcm16b_8khz.wav",
221 "//resources/utility/encapsulated_pcmu_8khz.wav",
222 ]
223
ossua16f7a82016-07-08 02:12:55 -0700224 if (is_win) {
225 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
226
227 cflags = [
228 # TODO(kjellander): Bug 261: fix this warning.
229 "/wd4373", # Virtual function override.
230 ]
231 }
232
kjellandere40a7ee2016-10-16 23:56:12 -0700233 if (!build_with_chromium && is_clang) {
234 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700235 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ossua16f7a82016-07-08 02:12:55 -0700236 }
237 }
238
239 if (!is_ios) {
ehmaldonado38a21322016-09-02 04:10:34 -0700240 rtc_executable("voe_auto_test") {
ossua16f7a82016-07-08 02:12:55 -0700241 testonly = true
242
243 deps = [
244 ":voice_engine",
kjellandercfa95aa2017-03-02 21:28:23 -0800245 "..:webrtc_common",
246 "../base:rtc_base_approved",
247 "../modules/audio_device:audio_device",
248 "../modules/audio_processing:audio_processing",
249 "../modules/rtp_rtcp:rtp_rtcp",
ossua16f7a82016-07-08 02:12:55 -0700250 "//testing/gmock",
251 "//testing/gtest",
252 "//third_party/gflags",
skvladcc91d282016-10-03 18:31:22 -0700253 "//webrtc/logging:rtc_event_log_api",
ossua16f7a82016-07-08 02:12:55 -0700254 "//webrtc/modules/video_capture",
255 "//webrtc/system_wrappers",
256 "//webrtc/system_wrappers/:system_wrappers_default",
ossua16f7a82016-07-08 02:12:55 -0700257 "//webrtc/test/:test_common",
258 "//webrtc/test/:test_support",
ehmaldonado656610f2017-02-06 02:21:11 -0800259 "//webrtc/test/:video_test_common",
ossua16f7a82016-07-08 02:12:55 -0700260 ]
261
262 sources = [
263 "test/auto_test/automated_mode.cc",
ossua16f7a82016-07-08 02:12:55 -0700264 "test/auto_test/fakes/conference_transport.cc",
265 "test/auto_test/fakes/conference_transport.h",
266 "test/auto_test/fakes/loudest_filter.cc",
267 "test/auto_test/fakes/loudest_filter.h",
268 "test/auto_test/fixtures/after_initialization_fixture.cc",
269 "test/auto_test/fixtures/after_initialization_fixture.h",
270 "test/auto_test/fixtures/after_streaming_fixture.cc",
271 "test/auto_test/fixtures/after_streaming_fixture.h",
272 "test/auto_test/fixtures/before_initialization_fixture.cc",
273 "test/auto_test/fixtures/before_initialization_fixture.h",
274 "test/auto_test/fixtures/before_streaming_fixture.cc",
275 "test/auto_test/fixtures/before_streaming_fixture.h",
ossua16f7a82016-07-08 02:12:55 -0700276 "test/auto_test/standard/codec_before_streaming_test.cc",
277 "test/auto_test/standard/codec_test.cc",
278 "test/auto_test/standard/dtmf_test.cc",
ossua16f7a82016-07-08 02:12:55 -0700279 "test/auto_test/standard/rtp_rtcp_before_streaming_test.cc",
280 "test/auto_test/standard/rtp_rtcp_extensions.cc",
281 "test/auto_test/standard/rtp_rtcp_test.cc",
ossua16f7a82016-07-08 02:12:55 -0700282 "test/auto_test/voe_conference_test.cc",
ossua16f7a82016-07-08 02:12:55 -0700283 "test/auto_test/voe_standard_test.cc",
284 "test/auto_test/voe_standard_test.h",
ossua16f7a82016-07-08 02:12:55 -0700285 "test/auto_test/voe_test_defines.h",
ossua16f7a82016-07-08 02:12:55 -0700286 ]
287
ossua16f7a82016-07-08 02:12:55 -0700288 defines = []
289
290 if (rtc_enable_protobuf) {
291 defines = [ "ENABLE_RTC_EVENT_LOG" ]
292 }
293
294 if (is_win) {
295 defines += [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
296
297 cflags = [
298 "/wd4267", # size_t to int truncation.
299 "/wd4373", # Virtual function override.
300 # TODO(kjellander): Bug 261: fix this warning.
301 ]
302 }
303
kjellandere40a7ee2016-10-16 23:56:12 -0700304 if (!build_with_chromium && is_clang) {
305 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700306 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ossua16f7a82016-07-08 02:12:55 -0700307 }
308 }
309 }
310}