blob: 57126d7143bb4d3817eff90c805ca60573882c38 [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")
ehmaldonado38a21322016-09-02 04:10:34 -070010
kjellanderb62dbbe2016-09-23 00:38:52 -070011rtc_static_library("pacing") {
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000012 sources = [
isheriff31687812016-10-04 08:43:09 -070013 "alr_detector.cc",
14 "alr_detector.h",
stefan@webrtc.org82462aa2014-10-23 11:57:05 +000015 "bitrate_prober.cc",
16 "bitrate_prober.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000017 "paced_sender.cc",
Henrik Kjellander0b9e29c2015-11-16 11:12:24 +010018 "paced_sender.h",
Stefan Holmere5904162015-03-26 11:11:06 +010019 "packet_router.cc",
Henrik Kjellander0b9e29c2015-11-16 11:12:24 +010020 "packet_router.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000021 ]
22
kjellandere40a7ee2016-10-16 23:56:12 -070023 if (!build_with_chromium && is_clang) {
24 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070025 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000026 }
27
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020028 deps = [
mbonadei1140f972017-04-26 03:38:35 -070029 "..:module_api",
tommi919dce22017-03-15 07:45:36 -070030 "../../:webrtc_common",
mbonadei2a495ca2016-12-21 00:26:58 -080031 "../../base:rtc_base_approved",
philipelc3b3f7a2017-03-29 01:23:13 -070032 "../../logging:rtc_event_log_api",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020033 "../../system_wrappers",
nisse05843312017-04-18 23:38:35 -070034 "../remote_bitrate_estimator",
sprangebbf8a82015-09-21 15:11:14 -070035 "../rtp_rtcp",
tommi919dce22017-03-15 07:45:36 -070036 "../utility",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020037 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000038}
ehmaldonado36268652017-01-19 08:27:11 -080039
40if (rtc_include_tests) {
41 rtc_source_set("pacing_unittests") {
42 testonly = true
kjellandere0629c02017-04-25 04:04:50 -070043
44 # Skip restricting visibility on mobile platforms since the tests on those
45 # gets additional generated targets which would require many lines here to
46 # cover (which would be confusing to read and hard to maintain).
47 if (!is_android && !is_ios) {
48 visibility = [ "//webrtc/modules:modules_unittests" ]
49 }
ehmaldonado36268652017-01-19 08:27:11 -080050 sources = [
51 "alr_detector_unittest.cc",
52 "bitrate_prober_unittest.cc",
53 "paced_sender_unittest.cc",
54 "packet_router_unittest.cc",
55 ]
56 deps = [
57 ":pacing",
58 "../../base:rtc_base_approved",
nisse05843312017-04-18 23:38:35 -070059 "../../base:rtc_base_tests_utils",
ehmaldonado36268652017-01-19 08:27:11 -080060 "../../system_wrappers:system_wrappers",
61 "../../test:test_support",
62 "../rtp_rtcp",
kjellandere0629c02017-04-25 04:04:50 -070063 "../rtp_rtcp:mock_rtp_rtcp",
ehmaldonado36268652017-01-19 08:27:11 -080064 "//testing/gmock",
65 ]
66
67 # TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
68 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
69 if (!build_with_chromium && is_clang) {
70 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
71 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
72 }
73 }
74}