blob: 7c54c37f670086ab9ee0f3fd9bf5804e028bae8d [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:071# 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 14:58:229import("../webrtc.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:0710
kwiberg97744472017-01-10 09:12:5111rtc_static_library("audio_coder") {
12 sources = [
13 "coder.cc",
14 "coder.h",
15 ]
16 deps = [
17 "..:webrtc_common",
kwiberg087bd342017-02-10 16:15:4418 "../api/audio_codecs:builtin_audio_decoder_factory",
kwiberg97744472017-01-10 09:12:5119 "../modules/audio_coding",
20 "../modules/audio_coding:audio_format_conversion",
kwiberg97744472017-01-10 09:12:5121 "../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 07:38:5269rtc_static_library("voice_engine") {
kjellander@webrtc.org524b8f72014-08-31 20:32:5370 sources = [
Henrik Kjellander57e5fd22015-05-25 10:55:3971 "channel.cc",
72 "channel.h",
73 "channel_manager.cc",
74 "channel_manager.h",
solenberg13725082015-11-25 16:16:5275 "channel_proxy.cc",
76 "channel_proxy.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:5377 "include/voe_base.h",
78 "include/voe_codec.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:5379 "include/voe_errors.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:5380 "include/voe_file.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:5381 "include/voe_network.h",
82 "include/voe_rtp_rtcp.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:5383 "monitor_module.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:5384 "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 16:07:0592 "transport_feedback_packet_loss_tracker.cc",
93 "transport_feedback_packet_loss_tracker.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:5394 "utility.cc",
95 "utility.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:5396 "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:53100 "voe_file_impl.cc",
101 "voe_file_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53102 "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:53106 "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:01113
114 cflags = [
115 # TODO(kjellander): Bug 261: fix this warning.
ossua16f7a82016-07-08 09:12:55116 "/wd4373", # Virtual function override.
kjellander@webrtc.org8649fed2015-01-08 21:22:01117 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53118 }
119
kjellandere40a7ee2016-10-17 06:56:12120 if (!build_with_chromium && is_clang) {
121 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 11:10:34122 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53123 }
124
ehmaldonado53cec042016-09-09 12:32:14125 public_deps = [
126 "../modules/audio_coding",
127 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53128 deps = [
henrik.lundin92a7a182017-03-07 09:58:55129 ":audio_level",
kwiberg97744472017-01-10 09:12:51130 ":file_player",
131 ":file_recorder",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22132 "..:webrtc_common",
aleloiaed581a2016-10-20 13:32:39133 "../api:audio_mixer_api",
kjellandera69d9732016-08-31 14:33:05134 "../api:call_api",
aleloia8eb7562016-11-28 15:02:13135 "../api:transport_api",
kwiberg087bd342017-02-10 16:15:44136 "../api/audio_codecs:audio_codecs_api",
137 "../api/audio_codecs:builtin_audio_decoder_factory",
aleloi6321b492016-12-05 09:46:09138 "../audio/utility:audio_frame_operations",
kjellander@webrtc.org7ffeab52016-02-26 21:46:09139 "../base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53140 "../common_audio",
skvladcc91d282016-10-04 01:31:22141 "../logging:rtc_event_log_api",
kwibergda2bf4e2016-10-24 20:47:09142 "../modules/audio_coding:audio_format_conversion",
aleloi9ae585d2016-10-13 13:57:16143 "../modules/audio_coding:rent_a_codec",
kjellander@webrtc.org524b8f72014-08-31 20:32:53144 "../modules/audio_conference_mixer",
145 "../modules/audio_device",
146 "../modules/audio_processing",
147 "../modules/bitrate_controller",
148 "../modules/media_file",
Stefan Holmerb86d4e42015-12-07 09:26:18149 "../modules/pacing",
kjellander@webrtc.org524b8f72014-08-31 20:32:53150 "../modules/rtp_rtcp",
151 "../modules/utility",
152 "../system_wrappers",
153 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07154}
ossua16f7a82016-07-08 09:12:55155
henrik.lundin92a7a182017-03-07 09:58:55156rtc_static_library("audio_level") {
aleloie6ca9ec2016-08-10 12:01:51157 sources = [
henrik.lundin92a7a182017-03-07 09:58:55158 "audio_level.cc",
159 "audio_level.h",
aleloie6ca9ec2016-08-10 12:01:51160 ]
161
aleloie6ca9ec2016-08-10 12:01:51162 deps = [
163 "..:webrtc_common",
164 "../base:rtc_base_approved",
165 "../common_audio",
166 ]
167}
168
ossua16f7a82016-07-08 09:12:55169if (rtc_include_tests) {
ehmaldonado38a21322016-09-02 11:10:34170 rtc_test("voice_engine_unittests") {
ossua16f7a82016-07-08 09:12:55171 deps = [
kjellandercfa95aa2017-03-03 05:28:23172 ":file_player",
ossua16f7a82016-07-08 09:12:55173 ":voice_engine",
kjellandercfa95aa2017-03-03 05:28:23174 "../base:rtc_base_approved",
175 "../test:test_common",
ossua16f7a82016-07-08 09:12:55176 "//testing/gmock",
177 "//testing/gtest",
kwiberg97744472017-01-10 09:12:51178 "//third_party/gflags",
ossua16f7a82016-07-08 09:12:55179 "//webrtc/common_audio",
180 "//webrtc/modules/audio_coding",
181 "//webrtc/modules/audio_conference_mixer",
182 "//webrtc/modules/audio_device",
183 "//webrtc/modules/audio_processing",
184 "//webrtc/modules/media_file",
185 "//webrtc/modules/rtp_rtcp",
solenberg71b9b582016-11-25 19:45:05186 "//webrtc/modules/utility",
kjellandercfa95aa2017-03-03 05:28:23187 "//webrtc/modules/video_capture:video_capture",
ossua16f7a82016-07-08 09:12:55188 "//webrtc/system_wrappers",
ehmaldonado26bddb92016-11-30 14:12:01189 "//webrtc/test:test_main",
kjellandercfa95aa2017-03-03 05:28:23190 "//webrtc/test:video_test_common",
ossua16f7a82016-07-08 09:12:55191 ]
192
193 if (is_android) {
194 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 09:29:11195 shard_timeout = 900
ossua16f7a82016-07-08 09:12:55196 }
197
198 sources = [
199 "channel_unittest.cc",
kwiberg97744472017-01-10 09:12:51200 "file_player_unittests.cc",
minyue435ddf92017-01-23 16:07:05201 "transport_feedback_packet_loss_tracker_unittest.cc",
ossua16f7a82016-07-08 09:12:55202 "utility_unittest.cc",
ossua16f7a82016-07-08 09:12:55203 "voe_base_unittest.cc",
204 "voe_codec_unittest.cc",
205 "voe_network_unittest.cc",
206 "voice_engine_fixture.cc",
207 "voice_engine_fixture.h",
208 ]
209
kwiberg97744472017-01-10 09:12:51210 data = [
211 "//resources/utility/encapsulated_pcm16b_8khz.wav",
212 "//resources/utility/encapsulated_pcmu_8khz.wav",
213 ]
214
ossua16f7a82016-07-08 09:12:55215 if (is_win) {
216 defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
217
218 cflags = [
219 # TODO(kjellander): Bug 261: fix this warning.
220 "/wd4373", # Virtual function override.
221 ]
222 }
223
kjellandere40a7ee2016-10-17 06:56:12224 if (!build_with_chromium && is_clang) {
225 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 11:10:34226 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ossua16f7a82016-07-08 09:12:55227 }
228 }
229
230 if (!is_ios) {
ehmaldonado38a21322016-09-02 11:10:34231 rtc_executable("voe_auto_test") {
ossua16f7a82016-07-08 09:12:55232 testonly = true
233
234 deps = [
235 ":voice_engine",
kjellandercfa95aa2017-03-03 05:28:23236 "..:webrtc_common",
237 "../base:rtc_base_approved",
238 "../modules/audio_device:audio_device",
239 "../modules/audio_processing:audio_processing",
240 "../modules/rtp_rtcp:rtp_rtcp",
ossua16f7a82016-07-08 09:12:55241 "//testing/gmock",
242 "//testing/gtest",
243 "//third_party/gflags",
skvladcc91d282016-10-04 01:31:22244 "//webrtc/logging:rtc_event_log_api",
ossua16f7a82016-07-08 09:12:55245 "//webrtc/modules/video_capture",
246 "//webrtc/system_wrappers",
247 "//webrtc/system_wrappers/:system_wrappers_default",
ossua16f7a82016-07-08 09:12:55248 "//webrtc/test/:test_common",
249 "//webrtc/test/:test_support",
ehmaldonado656610f2017-02-06 10:21:11250 "//webrtc/test/:video_test_common",
ossua16f7a82016-07-08 09:12:55251 ]
252
253 sources = [
254 "test/auto_test/automated_mode.cc",
ossua16f7a82016-07-08 09:12:55255 "test/auto_test/fakes/conference_transport.cc",
256 "test/auto_test/fakes/conference_transport.h",
257 "test/auto_test/fakes/loudest_filter.cc",
258 "test/auto_test/fakes/loudest_filter.h",
259 "test/auto_test/fixtures/after_initialization_fixture.cc",
260 "test/auto_test/fixtures/after_initialization_fixture.h",
261 "test/auto_test/fixtures/after_streaming_fixture.cc",
262 "test/auto_test/fixtures/after_streaming_fixture.h",
263 "test/auto_test/fixtures/before_initialization_fixture.cc",
264 "test/auto_test/fixtures/before_initialization_fixture.h",
265 "test/auto_test/fixtures/before_streaming_fixture.cc",
266 "test/auto_test/fixtures/before_streaming_fixture.h",
ossua16f7a82016-07-08 09:12:55267 "test/auto_test/standard/codec_before_streaming_test.cc",
268 "test/auto_test/standard/codec_test.cc",
269 "test/auto_test/standard/dtmf_test.cc",
ossua16f7a82016-07-08 09:12:55270 "test/auto_test/standard/file_before_streaming_test.cc",
271 "test/auto_test/standard/file_test.cc",
ossua16f7a82016-07-08 09:12:55272 "test/auto_test/standard/rtp_rtcp_before_streaming_test.cc",
273 "test/auto_test/standard/rtp_rtcp_extensions.cc",
274 "test/auto_test/standard/rtp_rtcp_test.cc",
ossua16f7a82016-07-08 09:12:55275 "test/auto_test/voe_conference_test.cc",
ossua16f7a82016-07-08 09:12:55276 "test/auto_test/voe_standard_test.cc",
277 "test/auto_test/voe_standard_test.h",
ossua16f7a82016-07-08 09:12:55278 "test/auto_test/voe_test_defines.h",
ossua16f7a82016-07-08 09:12:55279 ]
280
ossua16f7a82016-07-08 09:12:55281 defines = []
282
283 if (rtc_enable_protobuf) {
284 defines = [ "ENABLE_RTC_EVENT_LOG" ]
285 }
286
287 if (is_win) {
288 defines += [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
289
290 cflags = [
291 "/wd4267", # size_t to int truncation.
292 "/wd4373", # Virtual function override.
293 # TODO(kjellander): Bug 261: fix this warning.
294 ]
295 }
296
kjellandere40a7ee2016-10-17 06:56:12297 if (!build_with_chromium && is_clang) {
298 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 11:10:34299 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ossua16f7a82016-07-08 09:12:55300 }
301 }
302 }
303}