blob: 3de1d4a32db775b7b74ea91a0551317dfc387fbc [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 = [
stefan@webrtc.org82462aa2014-10-23 11:57:05 +000013 "bitrate_prober.cc",
14 "bitrate_prober.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000015 "paced_sender.cc",
Henrik Kjellander0b9e29c2015-11-16 11:12:24 +010016 "paced_sender.h",
gnisha36165c2017-08-20 09:19:58 -070017 "pacer.h",
philipel9981bd92017-09-26 17:16:06 +020018 "packet_queue.cc",
19 "packet_queue.h",
Sebastian Janssonb5374962018-02-07 13:26:38 +010020 "packet_queue_interface.cc",
21 "packet_queue_interface.h",
Stefan Holmere5904162015-03-26 11:11:06 +010022 "packet_router.cc",
Henrik Kjellander0b9e29c2015-11-16 11:12:24 +010023 "packet_router.h",
Sebastian Janssonb5374962018-02-07 13:26:38 +010024 "round_robin_packet_queue.cc",
25 "round_robin_packet_queue.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000026 ]
27
kjellandere40a7ee2016-10-16 23:56:12 -070028 if (!build_with_chromium && is_clang) {
29 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070030 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000031 }
32
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020033 deps = [
Sebastian Janssonf9f49a32018-06-25 17:56:08 +020034 ":interval_budget",
mbonadei1140f972017-04-26 03:38:35 -070035 "..:module_api",
Patrik Höglund3e113432017-12-15 14:40:10 +010036 "../../:typedefs",
tommi919dce22017-03-15 07:45:36 -070037 "../../:webrtc_common",
Qingsi Wang970b0882018-02-01 11:04:46 -080038 "../../logging:rtc_event_bwe",
philipelc3b3f7a2017-03-29 01:23:13 -070039 "../../logging:rtc_event_log_api",
Qingsi Wang970b0882018-02-01 11:04:46 -080040 "../../logging:rtc_event_pacing",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010041 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -070042 "../../rtc_base:rtc_base_approved",
Sebastian Janssoncabe3832018-01-12 10:54:18 +010043 "../../rtc_base/experiments:alr_experiment",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020044 "../../system_wrappers",
Mirko Bonadeia498ae82017-12-06 09:17:14 +010045 "../../system_wrappers:field_trial_api",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +000046 "../../system_wrappers:runtime_enabled_features_api",
Sebastian Janssonf9f49a32018-06-25 17:56:08 +020047 "../congestion_controller/goog_cc:alr_detector",
nisse05843312017-04-18 23:38:35 -070048 "../remote_bitrate_estimator",
sprangebbf8a82015-09-21 15:11:14 -070049 "../rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +010050 "../rtp_rtcp:rtp_rtcp_format",
tommi919dce22017-03-15 07:45:36 -070051 "../utility",
Danil Chapovalov0040b662018-06-18 10:48:16 +020052 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020053 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000054}
ehmaldonado36268652017-01-19 08:27:11 -080055
Sebastian Janssonf9f49a32018-06-25 17:56:08 +020056rtc_source_set("interval_budget") {
57 sources = [
58 "interval_budget.cc",
59 "interval_budget.h",
60 ]
61
62 if (!build_with_chromium && is_clang) {
63 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
64 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
65 }
66
67 deps = [
68 # "../../:typedefs",
69 "../../:webrtc_common",
70 "../../rtc_base:checks",
71 "../../rtc_base:rtc_base_approved",
72 ]
73}
74
ehmaldonado36268652017-01-19 08:27:11 -080075if (rtc_include_tests) {
76 rtc_source_set("pacing_unittests") {
77 testonly = true
kjellandere0629c02017-04-25 04:04:50 -070078
ehmaldonado36268652017-01-19 08:27:11 -080079 sources = [
ehmaldonado36268652017-01-19 08:27:11 -080080 "bitrate_prober_unittest.cc",
tschumim82c55932017-07-11 06:56:04 -070081 "interval_budget_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -080082 "paced_sender_unittest.cc",
83 "packet_router_unittest.cc",
84 ]
85 deps = [
Sebastian Janssonf9f49a32018-06-25 17:56:08 +020086 ":interval_budget",
ehmaldonado36268652017-01-19 08:27:11 -080087 ":pacing",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010088 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -070089 "../../rtc_base:rtc_base_approved",
90 "../../rtc_base:rtc_base_tests_utils",
Sebastian Janssoncabe3832018-01-12 10:54:18 +010091 "../../rtc_base/experiments:alr_experiment",
Mirko Bonadeia498ae82017-12-06 09:17:14 +010092 "../../system_wrappers",
93 "../../system_wrappers:field_trial_api",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +000094 "../../system_wrappers:runtime_enabled_features_api",
Erik Språngb378a222017-10-02 13:25:38 +020095 "../../test:field_trial",
ehmaldonado36268652017-01-19 08:27:11 -080096 "../../test:test_support",
97 "../rtp_rtcp",
kjellandere0629c02017-04-25 04:04:50 -070098 "../rtp_rtcp:mock_rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +010099 "../rtp_rtcp:rtp_rtcp_format",
ehmaldonado36268652017-01-19 08:27:11 -0800100 ]
101
ehmaldonado36268652017-01-19 08:27:11 -0800102 if (!build_with_chromium && is_clang) {
103 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
104 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
105 }
106 }
mbonadei334f9e62017-09-04 04:57:11 -0700107
108 rtc_source_set("mock_paced_sender") {
109 testonly = true
110 sources = [
111 "mock/mock_paced_sender.h",
112 ]
113 deps = [
114 ":pacing",
115 "../../system_wrappers",
116 "../../test:test_support",
117 ]
118 }
ehmaldonado36268652017-01-19 08:27:11 -0800119}