blob: 4882d4f7143c9919f001cc692bac2a3f301a2057 [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",
tschumim82c55932017-07-11 06:56:04 -070017 "interval_budget.cc",
18 "interval_budget.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000019 "paced_sender.cc",
Henrik Kjellander0b9e29c2015-11-16 11:12:24 +010020 "paced_sender.h",
gnisha36165c2017-08-20 09:19:58 -070021 "pacer.h",
Stefan Holmere5904162015-03-26 11:11:06 +010022 "packet_router.cc",
Henrik Kjellander0b9e29c2015-11-16 11:12:24 +010023 "packet_router.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000024 ]
25
kjellandere40a7ee2016-10-16 23:56:12 -070026 if (!build_with_chromium && is_clang) {
27 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070028 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000029 }
30
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020031 deps = [
mbonadei1140f972017-04-26 03:38:35 -070032 "..:module_api",
tommi919dce22017-03-15 07:45:36 -070033 "../../:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -070034 "../../api:optional",
philipelc3b3f7a2017-03-29 01:23:13 -070035 "../../logging:rtc_event_log_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -070036 "../../rtc_base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020037 "../../system_wrappers",
nisse05843312017-04-18 23:38:35 -070038 "../remote_bitrate_estimator",
sprangebbf8a82015-09-21 15:11:14 -070039 "../rtp_rtcp",
tommi919dce22017-03-15 07:45:36 -070040 "../utility",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020041 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000042}
ehmaldonado36268652017-01-19 08:27:11 -080043
44if (rtc_include_tests) {
45 rtc_source_set("pacing_unittests") {
46 testonly = true
kjellandere0629c02017-04-25 04:04:50 -070047
48 # Skip restricting visibility on mobile platforms since the tests on those
49 # gets additional generated targets which would require many lines here to
50 # cover (which would be confusing to read and hard to maintain).
51 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -070052 visibility = [ "..:modules_unittests" ]
kjellandere0629c02017-04-25 04:04:50 -070053 }
ehmaldonado36268652017-01-19 08:27:11 -080054 sources = [
55 "alr_detector_unittest.cc",
56 "bitrate_prober_unittest.cc",
tschumim82c55932017-07-11 06:56:04 -070057 "interval_budget_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -080058 "paced_sender_unittest.cc",
59 "packet_router_unittest.cc",
60 ]
61 deps = [
62 ":pacing",
ehmaldonadof6a861a2017-07-19 10:40:47 -070063 "../../rtc_base:rtc_base_approved",
64 "../../rtc_base:rtc_base_tests_utils",
ehmaldonado36268652017-01-19 08:27:11 -080065 "../../system_wrappers:system_wrappers",
66 "../../test:test_support",
67 "../rtp_rtcp",
kjellandere0629c02017-04-25 04:04:50 -070068 "../rtp_rtcp:mock_rtp_rtcp",
ehmaldonado36268652017-01-19 08:27:11 -080069 "//testing/gmock",
70 ]
71
72 # TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
73 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
74 if (!build_with_chromium && is_clang) {
75 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
76 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
77 }
78 }
mbonadei334f9e62017-09-04 04:57:11 -070079
80 rtc_source_set("mock_paced_sender") {
81 testonly = true
82 sources = [
83 "mock/mock_paced_sender.h",
84 ]
85 deps = [
86 ":pacing",
87 "../../system_wrappers",
88 "../../test:test_support",
89 ]
90 }
ehmaldonado36268652017-01-19 08:27:11 -080091}