blob: 429c346f8cece8d745b95518a0e21ede0992b3f9 [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",
ossueb1fde42017-05-02 06:46:30 -070019 "../api/audio_codecs:builtin_audio_encoder_factory",
mbonadei1140f972017-04-26 03:38:35 -070020 "../modules:module_api",
kwiberg97744472017-01-10 01:12:51 -080021 "../modules/audio_coding",
22 "../modules/audio_coding:audio_format_conversion",
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",
mbonadei1140f972017-04-26 03:38:35 -070042 "../modules:module_api",
kwiberg97744472017-01-10 01:12:51 -080043 "../modules/media_file",
kwiberg97744472017-01-10 01:12:51 -080044 ]
45
46 if (!build_with_chromium && is_clang) {
47 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
48 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
49 }
50}
51
52rtc_static_library("file_recorder") {
53 sources = [
54 "file_recorder.cc",
55 "file_recorder.h",
56 ]
57 deps = [
58 ":audio_coder",
59 "..:webrtc_common",
60 "../base:rtc_base_approved",
61 "../common_audio",
mbonadei1140f972017-04-26 03:38:35 -070062 "../modules:module_api",
kwiberg97744472017-01-10 01:12:51 -080063 "../modules/media_file:media_file",
64 "../system_wrappers",
65 ]
66
67 if (!build_with_chromium && is_clang) {
68 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
69 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
70 }
71}
72
kjellanderb62dbbe2016-09-23 00:38:52 -070073rtc_static_library("voice_engine") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000074 sources = [
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020075 "channel.cc",
76 "channel.h",
77 "channel_manager.cc",
78 "channel_manager.h",
solenberg13725082015-11-25 08:16:52 -080079 "channel_proxy.cc",
80 "channel_proxy.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000081 "include/voe_base.h",
82 "include/voe_codec.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000083 "include/voe_errors.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000084 "include/voe_file.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000085 "include/voe_network.h",
86 "include/voe_rtp_rtcp.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000087 "monitor_module.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000088 "output_mixer.cc",
89 "output_mixer.h",
90 "shared_data.cc",
91 "shared_data.h",
92 "statistics.cc",
93 "statistics.h",
94 "transmit_mixer.cc",
95 "transmit_mixer.h",
minyue435ddf92017-01-23 08:07:05 -080096 "transport_feedback_packet_loss_tracker.cc",
97 "transport_feedback_packet_loss_tracker.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000098 "utility.cc",
99 "utility.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000100 "voe_base_impl.cc",
101 "voe_base_impl.h",
102 "voe_codec_impl.cc",
103 "voe_codec_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000104 "voe_file_impl.cc",
105 "voe_file_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000106 "voe_network_impl.cc",
107 "voe_network_impl.h",
108 "voe_rtp_rtcp_impl.cc",
109 "voe_rtp_rtcp_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000110 "voice_engine_defines.h",
111 "voice_engine_impl.cc",
112 "voice_engine_impl.h",
113 ]
114
115 if (is_win) {
116 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000117
118 cflags = [
119 # TODO(kjellander): Bug 261: fix this warning.
ossua16f7a82016-07-08 02:12:55 -0700120 "/wd4373", # Virtual function override.
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000121 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000122 }
123
kjellandere40a7ee2016-10-16 23:56:12 -0700124 if (!build_with_chromium && is_clang) {
125 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700126 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000127 }
128
ehmaldonado53cec042016-09-09 05:32:14 -0700129 public_deps = [
130 "../modules/audio_coding",
131 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000132 deps = [
henrik.lundin92a7a182017-03-07 01:58:55 -0800133 ":audio_level",
kwiberg97744472017-01-10 01:12:51 -0800134 ":file_player",
135 ":file_recorder",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000136 "..:webrtc_common",
aleloiaed581a2016-10-20 06:32:39 -0700137 "../api:audio_mixer_api",
kjellandera69d9732016-08-31 07:33:05 -0700138 "../api:call_api",
hbos8d609f62017-04-10 07:39:05 -0700139 "../api:libjingle_peerconnection_api",
aleloia8eb7562016-11-28 07:02:13 -0800140 "../api:transport_api",
kwiberg087bd342017-02-10 08:15:44 -0800141 "../api/audio_codecs:audio_codecs_api",
142 "../api/audio_codecs:builtin_audio_decoder_factory",
ossueb1fde42017-05-02 06:46:30 -0700143 "../api/audio_codecs:builtin_audio_encoder_factory",
aleloi6321b492016-12-05 01:46:09 -0800144 "../audio/utility:audio_frame_operations",
kjellander@webrtc.org7ffeab52016-02-26 22:46:09 +0100145 "../base:rtc_base_approved",
henrikaec6fbd22017-03-31 05:43:36 -0700146 "../base:rtc_task_queue",
mbonadei1140f972017-04-26 03:38:35 -0700147 "../modules:module_api",
nisseb8f9a322017-03-27 05:36:15 -0700148
149 # TODO(nisse): Delete when declaration of RtpTransportController
150 # and related interfaces move to api/.
151 "../call:call_interfaces",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000152 "../common_audio",
skvladcc91d282016-10-03 18:31:22 -0700153 "../logging:rtc_event_log_api",
kwibergda2bf4e2016-10-24 13:47:09 -0700154 "../modules/audio_coding:audio_format_conversion",
aleloi9ae585d2016-10-13 06:57:16 -0700155 "../modules/audio_coding:rent_a_codec",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000156 "../modules/audio_conference_mixer",
157 "../modules/audio_device",
158 "../modules/audio_processing",
159 "../modules/bitrate_controller",
160 "../modules/media_file",
Stefan Holmerb86d4e42015-12-07 10:26:18 +0100161 "../modules/pacing",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000162 "../modules/rtp_rtcp",
163 "../modules/utility",
164 "../system_wrappers",
165 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000166}
ossua16f7a82016-07-08 02:12:55 -0700167
henrik.lundin92a7a182017-03-07 01:58:55 -0800168rtc_static_library("audio_level") {
aleloie6ca9ec2016-08-10 05:01:51 -0700169 sources = [
henrik.lundin92a7a182017-03-07 01:58:55 -0800170 "audio_level.cc",
171 "audio_level.h",
aleloie6ca9ec2016-08-10 05:01:51 -0700172 ]
173
aleloie6ca9ec2016-08-10 05:01:51 -0700174 deps = [
175 "..:webrtc_common",
176 "../base:rtc_base_approved",
177 "../common_audio",
mbonadei1140f972017-04-26 03:38:35 -0700178 "../modules:module_api",
aleloie6ca9ec2016-08-10 05:01:51 -0700179 ]
180}
181
ossua16f7a82016-07-08 02:12:55 -0700182if (rtc_include_tests) {
ehmaldonado38a21322016-09-02 04:10:34 -0700183 rtc_test("voice_engine_unittests") {
ossua16f7a82016-07-08 02:12:55 -0700184 deps = [
kjellandercfa95aa2017-03-02 21:28:23 -0800185 ":file_player",
ossua16f7a82016-07-08 02:12:55 -0700186 ":voice_engine",
kjellandercfa95aa2017-03-02 21:28:23 -0800187 "../base:rtc_base_approved",
mbonadei148d5a22017-04-28 05:24:50 -0700188 "../base:rtc_base_tests_utils",
mbonadei1140f972017-04-26 03:38:35 -0700189 "../modules:module_api",
kjellandercfa95aa2017-03-02 21:28:23 -0800190 "../test:test_common",
ossua16f7a82016-07-08 02:12:55 -0700191 "//testing/gmock",
192 "//testing/gtest",
kwiberg97744472017-01-10 01:12:51 -0800193 "//third_party/gflags",
ossua16f7a82016-07-08 02:12:55 -0700194 "//webrtc/common_audio",
195 "//webrtc/modules/audio_coding",
196 "//webrtc/modules/audio_conference_mixer",
197 "//webrtc/modules/audio_device",
198 "//webrtc/modules/audio_processing",
199 "//webrtc/modules/media_file",
200 "//webrtc/modules/rtp_rtcp",
solenberg71b9b582016-11-25 11:45:05 -0800201 "//webrtc/modules/utility",
kjellandercfa95aa2017-03-02 21:28:23 -0800202 "//webrtc/modules/video_capture:video_capture",
ossua16f7a82016-07-08 02:12:55 -0700203 "//webrtc/system_wrappers",
ehmaldonado26bddb92016-11-30 06:12:01 -0800204 "//webrtc/test:test_main",
kjellandercfa95aa2017-03-02 21:28:23 -0800205 "//webrtc/test:video_test_common",
ossua16f7a82016-07-08 02:12:55 -0700206 ]
207
208 if (is_android) {
209 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -0700210 shard_timeout = 900
ossua16f7a82016-07-08 02:12:55 -0700211 }
212
213 sources = [
214 "channel_unittest.cc",
kwiberg97744472017-01-10 01:12:51 -0800215 "file_player_unittests.cc",
minyue435ddf92017-01-23 08:07:05 -0800216 "transport_feedback_packet_loss_tracker_unittest.cc",
ossua16f7a82016-07-08 02:12:55 -0700217 "utility_unittest.cc",
ossua16f7a82016-07-08 02:12:55 -0700218 "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
kwiberg97744472017-01-10 01:12:51 -0800225 data = [
226 "//resources/utility/encapsulated_pcm16b_8khz.wav",
227 "//resources/utility/encapsulated_pcmu_8khz.wav",
228 ]
229
ossua16f7a82016-07-08 02:12:55 -0700230 if (is_win) {
231 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
232
233 cflags = [
234 # TODO(kjellander): Bug 261: fix this warning.
235 "/wd4373", # Virtual function override.
236 ]
237 }
238
kjellandere40a7ee2016-10-16 23:56:12 -0700239 if (!build_with_chromium && is_clang) {
240 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700241 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ossua16f7a82016-07-08 02:12:55 -0700242 }
243 }
244
245 if (!is_ios) {
ehmaldonado38a21322016-09-02 04:10:34 -0700246 rtc_executable("voe_auto_test") {
ossua16f7a82016-07-08 02:12:55 -0700247 testonly = true
248
249 deps = [
250 ":voice_engine",
kjellandercfa95aa2017-03-02 21:28:23 -0800251 "..:webrtc_common",
252 "../base:rtc_base_approved",
mbonadei1140f972017-04-26 03:38:35 -0700253 "../modules:module_api",
kjellandercfa95aa2017-03-02 21:28:23 -0800254 "../modules/audio_device:audio_device",
255 "../modules/audio_processing:audio_processing",
256 "../modules/rtp_rtcp:rtp_rtcp",
ossua16f7a82016-07-08 02:12:55 -0700257 "//testing/gmock",
258 "//testing/gtest",
259 "//third_party/gflags",
skvladcc91d282016-10-03 18:31:22 -0700260 "//webrtc/logging:rtc_event_log_api",
ossua16f7a82016-07-08 02:12:55 -0700261 "//webrtc/modules/video_capture",
262 "//webrtc/system_wrappers",
263 "//webrtc/system_wrappers/:system_wrappers_default",
ossua16f7a82016-07-08 02:12:55 -0700264 "//webrtc/test/:test_common",
265 "//webrtc/test/:test_support",
ehmaldonado656610f2017-02-06 02:21:11 -0800266 "//webrtc/test/:video_test_common",
ossua16f7a82016-07-08 02:12:55 -0700267 ]
268
269 sources = [
270 "test/auto_test/automated_mode.cc",
ossua16f7a82016-07-08 02:12:55 -0700271 "test/auto_test/fakes/conference_transport.cc",
272 "test/auto_test/fakes/conference_transport.h",
273 "test/auto_test/fakes/loudest_filter.cc",
274 "test/auto_test/fakes/loudest_filter.h",
275 "test/auto_test/fixtures/after_initialization_fixture.cc",
276 "test/auto_test/fixtures/after_initialization_fixture.h",
277 "test/auto_test/fixtures/after_streaming_fixture.cc",
278 "test/auto_test/fixtures/after_streaming_fixture.h",
279 "test/auto_test/fixtures/before_initialization_fixture.cc",
280 "test/auto_test/fixtures/before_initialization_fixture.h",
281 "test/auto_test/fixtures/before_streaming_fixture.cc",
282 "test/auto_test/fixtures/before_streaming_fixture.h",
ossua16f7a82016-07-08 02:12:55 -0700283 "test/auto_test/standard/codec_before_streaming_test.cc",
284 "test/auto_test/standard/codec_test.cc",
285 "test/auto_test/standard/dtmf_test.cc",
ossua16f7a82016-07-08 02:12:55 -0700286 "test/auto_test/standard/rtp_rtcp_before_streaming_test.cc",
287 "test/auto_test/standard/rtp_rtcp_extensions.cc",
288 "test/auto_test/standard/rtp_rtcp_test.cc",
ossua16f7a82016-07-08 02:12:55 -0700289 "test/auto_test/voe_conference_test.cc",
ossua16f7a82016-07-08 02:12:55 -0700290 "test/auto_test/voe_standard_test.cc",
291 "test/auto_test/voe_standard_test.h",
ossua16f7a82016-07-08 02:12:55 -0700292 "test/auto_test/voe_test_defines.h",
ossua16f7a82016-07-08 02:12:55 -0700293 ]
294
ossua16f7a82016-07-08 02:12:55 -0700295 defines = []
296
297 if (rtc_enable_protobuf) {
298 defines = [ "ENABLE_RTC_EVENT_LOG" ]
299 }
300
301 if (is_win) {
302 defines += [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
303
304 cflags = [
305 "/wd4267", # size_t to int truncation.
306 "/wd4373", # Virtual function override.
307 # TODO(kjellander): Bug 261: fix this warning.
308 ]
309 }
310
kjellandere40a7ee2016-10-16 23:56:12 -0700311 if (!build_with_chromium && is_clang) {
312 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700313 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ossua16f7a82016-07-08 02:12:55 -0700314 }
315 }
316 }
317}