blob: 31d95fdf6b7cca91f727715ce81c01fec76918e6 [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
Karl Wiberg1a8fffb2017-12-12 10:41:29 +010011visibility = [ ":*" ]
12
kjellanderb62dbbe2016-09-23 00:38:52 -070013rtc_static_library("voice_engine") {
Karl Wiberg1a8fffb2017-12-12 10:41:29 +010014 visibility += [ "*" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000015 sources = [
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020016 "channel.cc",
17 "channel.h",
18 "channel_manager.cc",
19 "channel_manager.h",
solenberg13725082015-11-25 08:16:52 -080020 "channel_proxy.cc",
21 "channel_proxy.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000022 "include/voe_base.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000023 "include/voe_errors.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000024 "shared_data.cc",
25 "shared_data.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000026 "transmit_mixer.cc",
27 "transmit_mixer.h",
minyue435ddf92017-01-23 08:07:05 -080028 "transport_feedback_packet_loss_tracker.cc",
29 "transport_feedback_packet_loss_tracker.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000030 "utility.cc",
31 "utility.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000032 "voe_base_impl.cc",
33 "voe_base_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000034 "voice_engine_impl.cc",
35 "voice_engine_impl.h",
36 ]
37
38 if (is_win) {
39 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +000040
41 cflags = [
42 # TODO(kjellander): Bug 261: fix this warning.
ossua16f7a82016-07-08 02:12:55 -070043 "/wd4373", # Virtual function override.
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +000044 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000045 }
46
kjellandere40a7ee2016-10-16 23:56:12 -070047 if (!build_with_chromium && is_clang) {
48 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070049 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000050 }
51
52 deps = [
henrik.lundin92a7a182017-03-07 01:58:55 -080053 ":audio_level",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000054 "..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -070055 "../api:array_view",
aleloiaed581a2016-10-20 06:32:39 -070056 "../api:audio_mixer_api",
kjellandera69d9732016-08-31 07:33:05 -070057 "../api:call_api",
hbos8d609f62017-04-10 07:39:05 -070058 "../api:libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -070059 "../api:optional",
Niels Möllerf92d8712017-10-23 14:26:10 +020060 "../api:refcountedbase",
aleloia8eb7562016-11-28 07:02:13 -080061 "../api:transport_api",
kwiberg087bd342017-02-10 08:15:44 -080062 "../api/audio_codecs:audio_codecs_api",
aleloi6321b492016-12-05 01:46:09 -080063 "../audio/utility:audio_frame_operations",
nissed76b7b22017-06-01 04:02:35 -070064 "../call:rtp_interfaces",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000065 "../common_audio",
skvladcc91d282016-10-03 18:31:22 -070066 "../logging:rtc_event_log_api",
nissed76b7b22017-06-01 04:02:35 -070067 "../modules:module_api",
Mirko Bonadei4e4e7562017-12-05 13:23:08 +010068 "../modules/audio_coding",
kwibergda2bf4e2016-10-24 13:47:09 -070069 "../modules/audio_coding:audio_format_conversion",
Elad Alon4a87e1c2017-10-03 16:11:34 +020070 "../modules/audio_coding:audio_network_adaptor_config",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000071 "../modules/audio_device",
72 "../modules/audio_processing",
73 "../modules/bitrate_controller",
74 "../modules/media_file",
Stefan Holmerb86d4e42015-12-07 10:26:18 +010075 "../modules/pacing",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000076 "../modules/rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +010077 "../modules/rtp_rtcp:rtp_rtcp_format",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000078 "../modules/utility",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010079 "../rtc_base:checks",
80 "../rtc_base:rate_limiter",
ehmaldonadof6a861a2017-07-19 10:40:47 -070081 "../rtc_base:rtc_base_approved",
82 "../rtc_base:rtc_task_queue",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000083 "../system_wrappers",
Mirko Bonadeia498ae82017-12-06 09:17:14 +010084 "../system_wrappers:field_trial_api",
85 "../system_wrappers:metrics_api",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000086 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000087}
ossua16f7a82016-07-08 02:12:55 -070088
henrik.lundin92a7a182017-03-07 01:58:55 -080089rtc_static_library("audio_level") {
aleloie6ca9ec2016-08-10 05:01:51 -070090 sources = [
henrik.lundin92a7a182017-03-07 01:58:55 -080091 "audio_level.cc",
92 "audio_level.h",
aleloie6ca9ec2016-08-10 05:01:51 -070093 ]
94
aleloie6ca9ec2016-08-10 05:01:51 -070095 deps = [
96 "..:webrtc_common",
aleloie6ca9ec2016-08-10 05:01:51 -070097 "../common_audio",
mbonadei1140f972017-04-26 03:38:35 -070098 "../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -070099 "../rtc_base:rtc_base_approved",
aleloie6ca9ec2016-08-10 05:01:51 -0700100 ]
101}
102
ossua16f7a82016-07-08 02:12:55 -0700103if (rtc_include_tests) {
ehmaldonado38a21322016-09-02 04:10:34 -0700104 rtc_test("voice_engine_unittests") {
Karl Wiberg1a8fffb2017-12-12 10:41:29 +0100105 visibility += [ "*" ]
ossua16f7a82016-07-08 02:12:55 -0700106 deps = [
107 ":voice_engine",
Karl Wibergf3850f62017-11-02 13:04:41 +0100108 "../api/audio_codecs:builtin_audio_decoder_factory",
jianjun.zhuc0247402017-07-11 06:20:45 -0700109 "../common_audio",
mbonadei1140f972017-04-26 03:38:35 -0700110 "../modules:module_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700111 "../modules/audio_coding",
jianjun.zhuc0247402017-07-11 06:20:45 -0700112 "../modules/audio_device",
113 "../modules/audio_processing",
114 "../modules/media_file",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100115 "../modules/rtp_rtcp:rtp_rtcp_format",
jianjun.zhuc0247402017-07-11 06:20:45 -0700116 "../modules/utility",
117 "../modules/video_capture:video_capture",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100118 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700119 "../rtc_base:rtc_base_approved",
120 "../rtc_base:rtc_base_tests_utils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700121 "../system_wrappers",
kjellandercfa95aa2017-03-02 21:28:23 -0800122 "../test:test_common",
jianjun.zhuc0247402017-07-11 06:20:45 -0700123 "../test:test_main",
124 "../test:video_test_common",
ossua16f7a82016-07-08 02:12:55 -0700125 "//testing/gmock",
126 "//testing/gtest",
ossua16f7a82016-07-08 02:12:55 -0700127 ]
128
129 if (is_android) {
130 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -0700131 shard_timeout = 900
ossua16f7a82016-07-08 02:12:55 -0700132 }
133
134 sources = [
135 "channel_unittest.cc",
minyue435ddf92017-01-23 08:07:05 -0800136 "transport_feedback_packet_loss_tracker_unittest.cc",
ossua16f7a82016-07-08 02:12:55 -0700137 "utility_unittest.cc",
ossua16f7a82016-07-08 02:12:55 -0700138 "voe_base_unittest.cc",
ossua16f7a82016-07-08 02:12:55 -0700139 ]
140
kwiberg97744472017-01-10 01:12:51 -0800141 data = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200142 "../resources/utility/encapsulated_pcm16b_8khz.wav",
143 "../resources/utility/encapsulated_pcmu_8khz.wav",
kwiberg97744472017-01-10 01:12:51 -0800144 ]
145
ossua16f7a82016-07-08 02:12:55 -0700146 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
kjellandere40a7ee2016-10-16 23:56:12 -0700155 if (!build_with_chromium && is_clang) {
156 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700157 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ossua16f7a82016-07-08 02:12:55 -0700158 }
159 }
ossua16f7a82016-07-08 02:12:55 -0700160}