blob: 444c5fd8e6e2549292ea9bfcc10a6824b4b10bfe [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
kjellanderb62dbbe2016-09-23 00:38:52 -070011rtc_static_library("voice_engine") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000012 sources = [
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020013 "channel.cc",
14 "channel.h",
15 "channel_manager.cc",
16 "channel_manager.h",
solenberg13725082015-11-25 08:16:52 -080017 "channel_proxy.cc",
18 "channel_proxy.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000019 "include/voe_base.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000020 "include/voe_errors.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000021 "monitor_module.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000022 "shared_data.cc",
23 "shared_data.h",
24 "statistics.cc",
25 "statistics.h",
26 "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_defines.h",
35 "voice_engine_impl.cc",
36 "voice_engine_impl.h",
37 ]
38
39 if (is_win) {
40 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +000041
42 cflags = [
43 # TODO(kjellander): Bug 261: fix this warning.
ossua16f7a82016-07-08 02:12:55 -070044 "/wd4373", # Virtual function override.
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +000045 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000046 }
47
kjellandere40a7ee2016-10-16 23:56:12 -070048 if (!build_with_chromium && is_clang) {
49 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070050 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000051 }
52
ehmaldonado53cec042016-09-09 05:32:14 -070053 public_deps = [
54 "../modules/audio_coding",
55 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000056 deps = [
henrik.lundin92a7a182017-03-07 01:58:55 -080057 ":audio_level",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000058 "..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -070059 "../api:array_view",
aleloiaed581a2016-10-20 06:32:39 -070060 "../api:audio_mixer_api",
kjellandera69d9732016-08-31 07:33:05 -070061 "../api:call_api",
hbos8d609f62017-04-10 07:39:05 -070062 "../api:libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -070063 "../api:optional",
aleloia8eb7562016-11-28 07:02:13 -080064 "../api:transport_api",
kwiberg087bd342017-02-10 08:15:44 -080065 "../api/audio_codecs:audio_codecs_api",
66 "../api/audio_codecs:builtin_audio_decoder_factory",
ossueb1fde42017-05-02 06:46:30 -070067 "../api/audio_codecs:builtin_audio_encoder_factory",
aleloi6321b492016-12-05 01:46:09 -080068 "../audio/utility:audio_frame_operations",
nissed76b7b22017-06-01 04:02:35 -070069 "../call:rtp_interfaces",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000070 "../common_audio",
skvladcc91d282016-10-03 18:31:22 -070071 "../logging:rtc_event_log_api",
nissed76b7b22017-06-01 04:02:35 -070072 "../modules:module_api",
kwibergda2bf4e2016-10-24 13:47:09 -070073 "../modules/audio_coding:audio_format_conversion",
aleloi9ae585d2016-10-13 06:57:16 -070074 "../modules/audio_coding:rent_a_codec",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000075 "../modules/audio_device",
76 "../modules/audio_processing",
77 "../modules/bitrate_controller",
78 "../modules/media_file",
Stefan Holmerb86d4e42015-12-07 10:26:18 +010079 "../modules/pacing",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000080 "../modules/rtp_rtcp",
81 "../modules/utility",
ehmaldonadof6a861a2017-07-19 10:40:47 -070082 "../rtc_base:rtc_base_approved",
83 "../rtc_base:rtc_task_queue",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000084 "../system_wrappers",
85 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000086}
ossua16f7a82016-07-08 02:12:55 -070087
henrik.lundin92a7a182017-03-07 01:58:55 -080088rtc_static_library("audio_level") {
aleloie6ca9ec2016-08-10 05:01:51 -070089 sources = [
henrik.lundin92a7a182017-03-07 01:58:55 -080090 "audio_level.cc",
91 "audio_level.h",
aleloie6ca9ec2016-08-10 05:01:51 -070092 ]
93
aleloie6ca9ec2016-08-10 05:01:51 -070094 deps = [
95 "..:webrtc_common",
aleloie6ca9ec2016-08-10 05:01:51 -070096 "../common_audio",
mbonadei1140f972017-04-26 03:38:35 -070097 "../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -070098 "../rtc_base:rtc_base_approved",
aleloie6ca9ec2016-08-10 05:01:51 -070099 ]
100}
101
ossua16f7a82016-07-08 02:12:55 -0700102if (rtc_include_tests) {
ehmaldonado38a21322016-09-02 04:10:34 -0700103 rtc_test("voice_engine_unittests") {
ossua16f7a82016-07-08 02:12:55 -0700104 deps = [
105 ":voice_engine",
jianjun.zhuc0247402017-07-11 06:20:45 -0700106 "../common_audio",
mbonadei1140f972017-04-26 03:38:35 -0700107 "../modules:module_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700108 "../modules/audio_coding",
jianjun.zhuc0247402017-07-11 06:20:45 -0700109 "../modules/audio_device",
110 "../modules/audio_processing",
111 "../modules/media_file",
112 "../modules/rtp_rtcp",
113 "../modules/utility",
114 "../modules/video_capture:video_capture",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700115 "../rtc_base:rtc_base_approved",
116 "../rtc_base:rtc_base_tests_utils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700117 "../system_wrappers",
kjellandercfa95aa2017-03-02 21:28:23 -0800118 "../test:test_common",
jianjun.zhuc0247402017-07-11 06:20:45 -0700119 "../test:test_main",
120 "../test:video_test_common",
ossua16f7a82016-07-08 02:12:55 -0700121 "//testing/gmock",
122 "//testing/gtest",
ossua16f7a82016-07-08 02:12:55 -0700123 ]
124
125 if (is_android) {
126 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -0700127 shard_timeout = 900
ossua16f7a82016-07-08 02:12:55 -0700128 }
129
130 sources = [
131 "channel_unittest.cc",
minyue435ddf92017-01-23 08:07:05 -0800132 "transport_feedback_packet_loss_tracker_unittest.cc",
ossua16f7a82016-07-08 02:12:55 -0700133 "utility_unittest.cc",
ossua16f7a82016-07-08 02:12:55 -0700134 "voe_base_unittest.cc",
ossua16f7a82016-07-08 02:12:55 -0700135 ]
136
kwiberg97744472017-01-10 01:12:51 -0800137 data = [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200138 "../resources/utility/encapsulated_pcm16b_8khz.wav",
139 "../resources/utility/encapsulated_pcmu_8khz.wav",
kwiberg97744472017-01-10 01:12:51 -0800140 ]
141
ossua16f7a82016-07-08 02:12:55 -0700142 if (is_win) {
143 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
144
145 cflags = [
146 # TODO(kjellander): Bug 261: fix this warning.
147 "/wd4373", # Virtual function override.
148 ]
149 }
150
kjellandere40a7ee2016-10-16 23:56:12 -0700151 if (!build_with_chromium && is_clang) {
152 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700153 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ossua16f7a82016-07-08 02:12:55 -0700154 }
155 }
ossua16f7a82016-07-08 02:12:55 -0700156}