blob: 627f412cf35d8ebe92e8e64e1cdd6e55ca78c2f1 [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",
40 "../common_audio",
mbonadei1140f972017-04-26 03:38:35 -070041 "../modules:module_api",
kwiberg97744472017-01-10 01:12:51 -080042 "../modules/media_file",
ehmaldonadof6a861a2017-07-19 10:40:47 -070043 "../rtc_base:rtc_base_approved",
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",
yujo36b1a5f2017-06-12 12:45:32 -070060 "../audio/utility:audio_frame_operations",
kwiberg97744472017-01-10 01:12:51 -080061 "../common_audio",
mbonadei1140f972017-04-26 03:38:35 -070062 "../modules:module_api",
kwiberg97744472017-01-10 01:12:51 -080063 "../modules/media_file:media_file",
ehmaldonadof6a861a2017-07-19 10:40:47 -070064 "../rtc_base:rtc_base_approved",
kwiberg97744472017-01-10 01:12:51 -080065 "../system_wrappers",
66 ]
67
68 if (!build_with_chromium && is_clang) {
69 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
70 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
71 }
72}
73
kjellanderb62dbbe2016-09-23 00:38:52 -070074rtc_static_library("voice_engine") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000075 sources = [
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020076 "channel.cc",
77 "channel.h",
78 "channel_manager.cc",
79 "channel_manager.h",
solenberg13725082015-11-25 08:16:52 -080080 "channel_proxy.cc",
81 "channel_proxy.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000082 "include/voe_base.h",
83 "include/voe_codec.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000084 "include/voe_errors.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000085 "include/voe_file.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000086 "include/voe_network.h",
87 "include/voe_rtp_rtcp.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000088 "monitor_module.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000089 "output_mixer.cc",
90 "output_mixer.h",
91 "shared_data.cc",
92 "shared_data.h",
93 "statistics.cc",
94 "statistics.h",
95 "transmit_mixer.cc",
96 "transmit_mixer.h",
minyue435ddf92017-01-23 08:07:05 -080097 "transport_feedback_packet_loss_tracker.cc",
98 "transport_feedback_packet_loss_tracker.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000099 "utility.cc",
100 "utility.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000101 "voe_base_impl.cc",
102 "voe_base_impl.h",
103 "voe_codec_impl.cc",
104 "voe_codec_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000105 "voe_file_impl.cc",
106 "voe_file_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000107 "voe_network_impl.cc",
108 "voe_network_impl.h",
109 "voe_rtp_rtcp_impl.cc",
110 "voe_rtp_rtcp_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000111 "voice_engine_defines.h",
112 "voice_engine_impl.cc",
113 "voice_engine_impl.h",
114 ]
115
116 if (is_win) {
117 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000118
119 cflags = [
120 # TODO(kjellander): Bug 261: fix this warning.
ossua16f7a82016-07-08 02:12:55 -0700121 "/wd4373", # Virtual function override.
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000122 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000123 }
124
kjellandere40a7ee2016-10-16 23:56:12 -0700125 if (!build_with_chromium && is_clang) {
126 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700127 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000128 }
129
ehmaldonado53cec042016-09-09 05:32:14 -0700130 public_deps = [
131 "../modules/audio_coding",
132 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000133 deps = [
henrik.lundin92a7a182017-03-07 01:58:55 -0800134 ":audio_level",
kwiberg97744472017-01-10 01:12:51 -0800135 ":file_player",
136 ":file_recorder",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000137 "..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700138 "../api:array_view",
aleloiaed581a2016-10-20 06:32:39 -0700139 "../api:audio_mixer_api",
kjellandera69d9732016-08-31 07:33:05 -0700140 "../api:call_api",
hbos8d609f62017-04-10 07:39:05 -0700141 "../api:libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700142 "../api:optional",
aleloia8eb7562016-11-28 07:02:13 -0800143 "../api:transport_api",
kwiberg087bd342017-02-10 08:15:44 -0800144 "../api/audio_codecs:audio_codecs_api",
145 "../api/audio_codecs:builtin_audio_decoder_factory",
ossueb1fde42017-05-02 06:46:30 -0700146 "../api/audio_codecs:builtin_audio_encoder_factory",
aleloi6321b492016-12-05 01:46:09 -0800147 "../audio/utility:audio_frame_operations",
nissed76b7b22017-06-01 04:02:35 -0700148 "../call:rtp_interfaces",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000149 "../common_audio",
skvladcc91d282016-10-03 18:31:22 -0700150 "../logging:rtc_event_log_api",
nissed76b7b22017-06-01 04:02:35 -0700151 "../modules:module_api",
kwibergda2bf4e2016-10-24 13:47:09 -0700152 "../modules/audio_coding:audio_format_conversion",
aleloi9ae585d2016-10-13 06:57:16 -0700153 "../modules/audio_coding:rent_a_codec",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000154 "../modules/audio_conference_mixer",
155 "../modules/audio_device",
156 "../modules/audio_processing",
157 "../modules/bitrate_controller",
158 "../modules/media_file",
Stefan Holmerb86d4e42015-12-07 10:26:18 +0100159 "../modules/pacing",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000160 "../modules/rtp_rtcp",
161 "../modules/utility",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700162 "../rtc_base:rtc_base_approved",
163 "../rtc_base:rtc_task_queue",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000164 "../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",
aleloie6ca9ec2016-08-10 05:01:51 -0700176 "../common_audio",
mbonadei1140f972017-04-26 03:38:35 -0700177 "../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700178 "../rtc_base:rtc_base_approved",
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",
jianjun.zhuc0247402017-07-11 06:20:45 -0700187 "../common_audio",
mbonadei1140f972017-04-26 03:38:35 -0700188 "../modules:module_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700189 "../modules/audio_coding",
190 "../modules/audio_conference_mixer",
191 "../modules/audio_device",
192 "../modules/audio_processing",
193 "../modules/media_file",
194 "../modules/rtp_rtcp",
195 "../modules/utility",
196 "../modules/video_capture:video_capture",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700197 "../rtc_base:rtc_base_approved",
198 "../rtc_base:rtc_base_tests_utils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700199 "../system_wrappers",
kjellandercfa95aa2017-03-02 21:28:23 -0800200 "../test:test_common",
jianjun.zhuc0247402017-07-11 06:20:45 -0700201 "../test:test_main",
202 "../test:video_test_common",
ossua16f7a82016-07-08 02:12:55 -0700203 "//testing/gmock",
204 "//testing/gtest",
ossua16f7a82016-07-08 02:12:55 -0700205 ]
206
207 if (is_android) {
208 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -0700209 shard_timeout = 900
ossua16f7a82016-07-08 02:12:55 -0700210 }
211
212 sources = [
213 "channel_unittest.cc",
kwiberg97744472017-01-10 01:12:51 -0800214 "file_player_unittests.cc",
minyue435ddf92017-01-23 08:07:05 -0800215 "transport_feedback_packet_loss_tracker_unittest.cc",
ossua16f7a82016-07-08 02:12:55 -0700216 "utility_unittest.cc",
ossua16f7a82016-07-08 02:12:55 -0700217 "voe_base_unittest.cc",
218 "voe_codec_unittest.cc",
219 "voe_network_unittest.cc",
220 "voice_engine_fixture.cc",
221 "voice_engine_fixture.h",
222 ]
223
kwiberg97744472017-01-10 01:12:51 -0800224 data = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700225 "../../resources/utility/encapsulated_pcm16b_8khz.wav",
226 "../../resources/utility/encapsulated_pcmu_8khz.wav",
kwiberg97744472017-01-10 01:12:51 -0800227 ]
228
ossua16f7a82016-07-08 02:12:55 -0700229 if (is_win) {
230 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
231
232 cflags = [
233 # TODO(kjellander): Bug 261: fix this warning.
234 "/wd4373", # Virtual function override.
235 ]
236 }
237
kjellandere40a7ee2016-10-16 23:56:12 -0700238 if (!build_with_chromium && is_clang) {
239 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700240 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ossua16f7a82016-07-08 02:12:55 -0700241 }
242 }
243
244 if (!is_ios) {
ehmaldonado38a21322016-09-02 04:10:34 -0700245 rtc_executable("voe_auto_test") {
ossua16f7a82016-07-08 02:12:55 -0700246 testonly = true
247
248 deps = [
249 ":voice_engine",
kjellandercfa95aa2017-03-02 21:28:23 -0800250 "..:webrtc_common",
jianjun.zhuc0247402017-07-11 06:20:45 -0700251 "../logging:rtc_event_log_api",
mbonadei1140f972017-04-26 03:38:35 -0700252 "../modules:module_api",
kjellandercfa95aa2017-03-02 21:28:23 -0800253 "../modules/audio_device:audio_device",
254 "../modules/audio_processing:audio_processing",
255 "../modules/rtp_rtcp:rtp_rtcp",
jianjun.zhuc0247402017-07-11 06:20:45 -0700256 "../modules/video_capture",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700257 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700258 "../system_wrappers",
259 "../system_wrappers/:system_wrappers_default",
260 "../test/:test_common",
261 "../test/:test_support",
262 "../test/:video_test_common",
ossua16f7a82016-07-08 02:12:55 -0700263 "//testing/gmock",
264 "//testing/gtest",
ossua16f7a82016-07-08 02:12:55 -0700265 ]
266
267 sources = [
268 "test/auto_test/automated_mode.cc",
ossua16f7a82016-07-08 02:12:55 -0700269 "test/auto_test/fixtures/after_initialization_fixture.cc",
270 "test/auto_test/fixtures/after_initialization_fixture.h",
271 "test/auto_test/fixtures/after_streaming_fixture.cc",
272 "test/auto_test/fixtures/after_streaming_fixture.h",
273 "test/auto_test/fixtures/before_initialization_fixture.cc",
274 "test/auto_test/fixtures/before_initialization_fixture.h",
275 "test/auto_test/fixtures/before_streaming_fixture.cc",
276 "test/auto_test/fixtures/before_streaming_fixture.h",
ossua16f7a82016-07-08 02:12:55 -0700277 "test/auto_test/standard/codec_before_streaming_test.cc",
278 "test/auto_test/standard/codec_test.cc",
279 "test/auto_test/standard/dtmf_test.cc",
ossua16f7a82016-07-08 02:12:55 -0700280 "test/auto_test/standard/rtp_rtcp_before_streaming_test.cc",
281 "test/auto_test/standard/rtp_rtcp_extensions.cc",
282 "test/auto_test/standard/rtp_rtcp_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}