blob: cb604c6e8576b538a751735adc18f8667018c3db [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",
20 "../modules/audio_coding:audio_format_conversion",
kwiberg97744472017-01-10 01:12:51 -080021 "../modules/audio_coding:rent_a_codec",
22 ]
23
24 if (!build_with_chromium && is_clang) {
25 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
26 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
27 }
28}
29
30rtc_static_library("file_player") {
31 sources = [
32 "file_player.cc",
33 "file_player.h",
34 ]
35 deps = [
36 ":audio_coder",
37 "..:webrtc_common",
38 "../common_audio",
39 "../modules/media_file",
40 "../system_wrappers",
41 ]
42
43 if (!build_with_chromium && is_clang) {
44 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
45 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
46 }
47}
48
49rtc_static_library("file_recorder") {
50 sources = [
51 "file_recorder.cc",
52 "file_recorder.h",
53 ]
54 deps = [
55 ":audio_coder",
56 "..:webrtc_common",
57 "../base:rtc_base_approved",
58 "../common_audio",
59 "../modules/media_file:media_file",
60 "../system_wrappers",
61 ]
62
63 if (!build_with_chromium && is_clang) {
64 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
65 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
66 }
67}
68
kjellanderb62dbbe2016-09-23 00:38:52 -070069rtc_static_library("voice_engine") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000070 sources = [
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020071 "channel.cc",
72 "channel.h",
73 "channel_manager.cc",
74 "channel_manager.h",
solenberg13725082015-11-25 08:16:52 -080075 "channel_proxy.cc",
76 "channel_proxy.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000077 "include/voe_base.h",
78 "include/voe_codec.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000079 "include/voe_errors.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000080 "include/voe_file.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000081 "include/voe_network.h",
82 "include/voe_rtp_rtcp.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000083 "monitor_module.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000084 "output_mixer.cc",
85 "output_mixer.h",
86 "shared_data.cc",
87 "shared_data.h",
88 "statistics.cc",
89 "statistics.h",
90 "transmit_mixer.cc",
91 "transmit_mixer.h",
minyue435ddf92017-01-23 08:07:05 -080092 "transport_feedback_packet_loss_tracker.cc",
93 "transport_feedback_packet_loss_tracker.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000094 "utility.cc",
95 "utility.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000096 "voe_base_impl.cc",
97 "voe_base_impl.h",
98 "voe_codec_impl.cc",
99 "voe_codec_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000100 "voe_file_impl.cc",
101 "voe_file_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000102 "voe_network_impl.cc",
103 "voe_network_impl.h",
104 "voe_rtp_rtcp_impl.cc",
105 "voe_rtp_rtcp_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000106 "voice_engine_defines.h",
107 "voice_engine_impl.cc",
108 "voice_engine_impl.h",
109 ]
110
111 if (is_win) {
112 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000113
114 cflags = [
115 # TODO(kjellander): Bug 261: fix this warning.
ossua16f7a82016-07-08 02:12:55 -0700116 "/wd4373", # Virtual function override.
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000117 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000118 }
119
kjellandere40a7ee2016-10-16 23:56:12 -0700120 if (!build_with_chromium && is_clang) {
121 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700122 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000123 }
124
ehmaldonado53cec042016-09-09 05:32:14 -0700125 public_deps = [
126 "../modules/audio_coding",
127 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000128 deps = [
henrik.lundin92a7a182017-03-07 01:58:55 -0800129 ":audio_level",
kwiberg97744472017-01-10 01:12:51 -0800130 ":file_player",
131 ":file_recorder",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000132 "..:webrtc_common",
aleloiaed581a2016-10-20 06:32:39 -0700133 "../api:audio_mixer_api",
kjellandera69d9732016-08-31 07:33:05 -0700134 "../api:call_api",
aleloia8eb7562016-11-28 07:02:13 -0800135 "../api:transport_api",
kwiberg087bd342017-02-10 08:15:44 -0800136 "../api/audio_codecs:audio_codecs_api",
137 "../api/audio_codecs:builtin_audio_decoder_factory",
aleloi6321b492016-12-05 01:46:09 -0800138 "../audio/utility:audio_frame_operations",
kjellander@webrtc.org7ffeab52016-02-26 22:46:09 +0100139 "../base:rtc_base_approved",
nisseb8f9a322017-03-27 05:36:15 -0700140
141 # TODO(nisse): Delete when declaration of RtpTransportController
142 # and related interfaces move to api/.
143 "../call:call_interfaces",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000144 "../common_audio",
skvladcc91d282016-10-03 18:31:22 -0700145 "../logging:rtc_event_log_api",
kwibergda2bf4e2016-10-24 13:47:09 -0700146 "../modules/audio_coding:audio_format_conversion",
aleloi9ae585d2016-10-13 06:57:16 -0700147 "../modules/audio_coding:rent_a_codec",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000148 "../modules/audio_conference_mixer",
149 "../modules/audio_device",
150 "../modules/audio_processing",
151 "../modules/bitrate_controller",
152 "../modules/media_file",
Stefan Holmerb86d4e42015-12-07 10:26:18 +0100153 "../modules/pacing",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000154 "../modules/rtp_rtcp",
155 "../modules/utility",
156 "../system_wrappers",
157 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000158}
ossua16f7a82016-07-08 02:12:55 -0700159
henrik.lundin92a7a182017-03-07 01:58:55 -0800160rtc_static_library("audio_level") {
aleloie6ca9ec2016-08-10 05:01:51 -0700161 sources = [
henrik.lundin92a7a182017-03-07 01:58:55 -0800162 "audio_level.cc",
163 "audio_level.h",
aleloie6ca9ec2016-08-10 05:01:51 -0700164 ]
165
aleloie6ca9ec2016-08-10 05:01:51 -0700166 deps = [
167 "..:webrtc_common",
168 "../base:rtc_base_approved",
169 "../common_audio",
170 ]
171}
172
ossua16f7a82016-07-08 02:12:55 -0700173if (rtc_include_tests) {
ehmaldonado38a21322016-09-02 04:10:34 -0700174 rtc_test("voice_engine_unittests") {
ossua16f7a82016-07-08 02:12:55 -0700175 deps = [
kjellandercfa95aa2017-03-02 21:28:23 -0800176 ":file_player",
ossua16f7a82016-07-08 02:12:55 -0700177 ":voice_engine",
kjellandercfa95aa2017-03-02 21:28:23 -0800178 "../base:rtc_base_approved",
179 "../test:test_common",
ossua16f7a82016-07-08 02:12:55 -0700180 "//testing/gmock",
181 "//testing/gtest",
kwiberg97744472017-01-10 01:12:51 -0800182 "//third_party/gflags",
ossua16f7a82016-07-08 02:12:55 -0700183 "//webrtc/common_audio",
184 "//webrtc/modules/audio_coding",
185 "//webrtc/modules/audio_conference_mixer",
186 "//webrtc/modules/audio_device",
187 "//webrtc/modules/audio_processing",
188 "//webrtc/modules/media_file",
189 "//webrtc/modules/rtp_rtcp",
solenberg71b9b582016-11-25 11:45:05 -0800190 "//webrtc/modules/utility",
kjellandercfa95aa2017-03-02 21:28:23 -0800191 "//webrtc/modules/video_capture:video_capture",
ossua16f7a82016-07-08 02:12:55 -0700192 "//webrtc/system_wrappers",
ehmaldonado26bddb92016-11-30 06:12:01 -0800193 "//webrtc/test:test_main",
kjellandercfa95aa2017-03-02 21:28:23 -0800194 "//webrtc/test:video_test_common",
ossua16f7a82016-07-08 02:12:55 -0700195 ]
196
197 if (is_android) {
198 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -0700199 shard_timeout = 900
ossua16f7a82016-07-08 02:12:55 -0700200 }
201
202 sources = [
203 "channel_unittest.cc",
kwiberg97744472017-01-10 01:12:51 -0800204 "file_player_unittests.cc",
minyue435ddf92017-01-23 08:07:05 -0800205 "transport_feedback_packet_loss_tracker_unittest.cc",
ossua16f7a82016-07-08 02:12:55 -0700206 "utility_unittest.cc",
ossua16f7a82016-07-08 02:12:55 -0700207 "voe_base_unittest.cc",
208 "voe_codec_unittest.cc",
209 "voe_network_unittest.cc",
210 "voice_engine_fixture.cc",
211 "voice_engine_fixture.h",
212 ]
213
kwiberg97744472017-01-10 01:12:51 -0800214 data = [
215 "//resources/utility/encapsulated_pcm16b_8khz.wav",
216 "//resources/utility/encapsulated_pcmu_8khz.wav",
217 ]
218
ossua16f7a82016-07-08 02:12:55 -0700219 if (is_win) {
220 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
221
222 cflags = [
223 # TODO(kjellander): Bug 261: fix this warning.
224 "/wd4373", # Virtual function override.
225 ]
226 }
227
kjellandere40a7ee2016-10-16 23:56:12 -0700228 if (!build_with_chromium && is_clang) {
229 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700230 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ossua16f7a82016-07-08 02:12:55 -0700231 }
232 }
233
234 if (!is_ios) {
ehmaldonado38a21322016-09-02 04:10:34 -0700235 rtc_executable("voe_auto_test") {
ossua16f7a82016-07-08 02:12:55 -0700236 testonly = true
237
238 deps = [
239 ":voice_engine",
kjellandercfa95aa2017-03-02 21:28:23 -0800240 "..:webrtc_common",
241 "../base:rtc_base_approved",
242 "../modules/audio_device:audio_device",
243 "../modules/audio_processing:audio_processing",
244 "../modules/rtp_rtcp:rtp_rtcp",
ossua16f7a82016-07-08 02:12:55 -0700245 "//testing/gmock",
246 "//testing/gtest",
247 "//third_party/gflags",
skvladcc91d282016-10-03 18:31:22 -0700248 "//webrtc/logging:rtc_event_log_api",
ossua16f7a82016-07-08 02:12:55 -0700249 "//webrtc/modules/video_capture",
250 "//webrtc/system_wrappers",
251 "//webrtc/system_wrappers/:system_wrappers_default",
ossua16f7a82016-07-08 02:12:55 -0700252 "//webrtc/test/:test_common",
253 "//webrtc/test/:test_support",
ehmaldonado656610f2017-02-06 02:21:11 -0800254 "//webrtc/test/:video_test_common",
ossua16f7a82016-07-08 02:12:55 -0700255 ]
256
257 sources = [
258 "test/auto_test/automated_mode.cc",
ossua16f7a82016-07-08 02:12:55 -0700259 "test/auto_test/fakes/conference_transport.cc",
260 "test/auto_test/fakes/conference_transport.h",
261 "test/auto_test/fakes/loudest_filter.cc",
262 "test/auto_test/fakes/loudest_filter.h",
263 "test/auto_test/fixtures/after_initialization_fixture.cc",
264 "test/auto_test/fixtures/after_initialization_fixture.h",
265 "test/auto_test/fixtures/after_streaming_fixture.cc",
266 "test/auto_test/fixtures/after_streaming_fixture.h",
267 "test/auto_test/fixtures/before_initialization_fixture.cc",
268 "test/auto_test/fixtures/before_initialization_fixture.h",
269 "test/auto_test/fixtures/before_streaming_fixture.cc",
270 "test/auto_test/fixtures/before_streaming_fixture.h",
ossua16f7a82016-07-08 02:12:55 -0700271 "test/auto_test/standard/codec_before_streaming_test.cc",
272 "test/auto_test/standard/codec_test.cc",
273 "test/auto_test/standard/dtmf_test.cc",
ossua16f7a82016-07-08 02:12:55 -0700274 "test/auto_test/standard/rtp_rtcp_before_streaming_test.cc",
275 "test/auto_test/standard/rtp_rtcp_extensions.cc",
276 "test/auto_test/standard/rtp_rtcp_test.cc",
ossua16f7a82016-07-08 02:12:55 -0700277 "test/auto_test/voe_conference_test.cc",
ossua16f7a82016-07-08 02:12:55 -0700278 "test/auto_test/voe_standard_test.cc",
279 "test/auto_test/voe_standard_test.h",
ossua16f7a82016-07-08 02:12:55 -0700280 "test/auto_test/voe_test_defines.h",
ossua16f7a82016-07-08 02:12:55 -0700281 ]
282
ossua16f7a82016-07-08 02:12:55 -0700283 defines = []
284
285 if (rtc_enable_protobuf) {
286 defines = [ "ENABLE_RTC_EVENT_LOG" ]
287 }
288
289 if (is_win) {
290 defines += [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
291
292 cflags = [
293 "/wd4267", # size_t to int truncation.
294 "/wd4373", # Virtual function override.
295 # TODO(kjellander): Bug 261: fix this warning.
296 ]
297 }
298
kjellandere40a7ee2016-10-16 23:56:12 -0700299 if (!build_with_chromium && is_clang) {
300 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700301 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ossua16f7a82016-07-08 02:12:55 -0700302 }
303 }
304 }
305}