blob: caa6d7fd42287a3caf370946d3ec0986ba4b95a6 [file] [log] [blame]
Stefan Holmer80e12072016-02-23 13:30:42 +01001# 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")
Stefan Holmer80e12072016-02-23 13:30:42 +010010
Patrik Höglund76134542018-01-02 09:15:05 +010011config("bwe_test_logging") {
12 if (rtc_enable_bwe_test_logging) {
13 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
14 } else {
15 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
16 }
17}
18
kjellanderb62dbbe2016-09-23 00:38:52 -070019rtc_static_library("congestion_controller") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000020 visibility = [ "*" ]
Patrik Höglund76134542018-01-02 09:15:05 +010021 configs += [ ":bwe_test_logging" ]
Stefan Holmer80e12072016-02-23 13:30:42 +010022 sources = [
Sebastian Janssone4be6da2018-02-15 16:51:41 +010023 "include/network_changed_observer.h",
nisse559af382017-03-21 06:41:12 -070024 "include/receive_side_congestion_controller.h",
25 "include/send_side_congestion_controller.h",
Sebastian Janssondfde3342018-02-22 12:32:27 +010026 "include/send_side_congestion_controller_interface.h",
nisse559af382017-03-21 06:41:12 -070027 "receive_side_congestion_controller.cc",
28 "send_side_congestion_controller.cc",
Stefan Holmer80e12072016-02-23 13:30:42 +010029 ]
30
Stefan Holmer80e12072016-02-23 13:30:42 +010031 deps = [
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010032 ":transport_feedback",
mbonadei1140f972017-04-26 03:38:35 -070033 "..:module_api",
mbonadei49f465f2016-12-28 04:43:46 -080034 "../..:webrtc_common",
Mirko Bonadeid9708072019-01-25 20:26:48 +010035 "../../api:scoped_refptr",
Sebastian Jansson95edb032019-01-17 16:24:12 +010036 "../../api/transport:field_trial_based_config",
Ying Wange1d7b232018-07-17 16:01:25 +020037 "../../api/transport:network_control",
Sebastian Jansson95edb032019-01-17 16:24:12 +010038 "../../api/transport:webrtc_key_value_config",
Yves Gerey3e707812018-11-28 16:47:49 +010039 "../../api/units:data_rate",
40 "../../api/units:timestamp",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010041 "../../rtc_base:checks",
Sebastian Jansson7d92de62018-12-17 11:14:11 +010042 "../../rtc_base:deprecation",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010043 "../../rtc_base:rate_limiter",
Erik Språng71215642019-01-21 16:30:55 +010044 "../../rtc_base/experiments:rate_control_settings",
Sebastian Jansson12985412018-10-15 21:06:26 +020045 "../../rtc_base/network:sent_packet",
mbonadei49f465f2016-12-28 04:43:46 -080046 "../../system_wrappers",
Mirko Bonadei17f48782018-09-28 08:51:10 +020047 "../../system_wrappers:field_trial",
Stefan Holmer80e12072016-02-23 13:30:42 +010048 "../bitrate_controller",
49 "../pacing",
mbonadei49f465f2016-12-28 04:43:46 -080050 "../remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +010051 "../rtp_rtcp:rtp_rtcp_format",
Sebastian Jansson04b18cb2018-07-02 09:25:25 +020052 "goog_cc:delay_based_bwe",
Sebastian Jansson172fd852018-05-24 14:17:06 +020053 "goog_cc:estimators",
Sebastian Janssonb2ecc3d2018-07-13 17:22:01 +020054 "goog_cc:probe_controller",
Sebastian Jansson3bdbc842018-10-11 15:02:12 +020055 "goog_cc:pushback_controller",
Karl Wiberg918f50c2018-07-05 11:40:33 +020056 "//third_party/abseil-cpp/absl/memory",
Yves Gerey3e707812018-11-28 16:47:49 +010057 "//third_party/abseil-cpp/absl/types:optional",
Stefan Holmer80e12072016-02-23 13:30:42 +010058 ]
Dan Minor9c686132018-01-15 10:20:00 -050059
60 if (!build_with_mozilla) {
Artem Titov94b57c02019-03-21 13:35:10 +010061 deps += [ "../../rtc_base" ]
Dan Minor9c686132018-01-15 10:20:00 -050062 }
Stefan Holmer80e12072016-02-23 13:30:42 +010063}
ehmaldonado36268652017-01-19 08:27:11 -080064
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010065rtc_static_library("transport_feedback") {
66 visibility = [ "*" ]
67 sources = [
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010068 "transport_feedback_adapter.cc",
69 "transport_feedback_adapter.h",
70 ]
71
72 deps = [
Danil Chapovalovdb128562018-09-17 13:11:50 +020073 "../../api/transport:network_control",
Yves Gerey3e707812018-11-28 16:47:49 +010074 "../../api/units:data_size",
Sebastian Janssonea86bb72018-02-14 16:53:38 +000075 "../../modules:module_api",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010076 "../../rtc_base:checks",
77 "../../rtc_base:rtc_base_approved",
Artem Titov94b57c02019-03-21 13:35:10 +010078 "../../system_wrappers",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010079 "../rtp_rtcp:rtp_rtcp_format",
Sebastian Jansson172fd852018-05-24 14:17:06 +020080 "rtp:transport_feedback",
Danil Chapovalovbda50682018-02-14 09:08:28 +000081 ]
82}
83
ehmaldonado36268652017-01-19 08:27:11 -080084if (rtc_include_tests) {
Sebastian Jansson13171bd2018-07-03 18:11:45 +020085 rtc_source_set("test_controller_printer") {
86 testonly = true
87 sources = [
88 "test/controller_printer.cc",
89 "test/controller_printer.h",
90 ]
Sebastian Jansson13171bd2018-07-03 18:11:45 +020091 deps = [
92 "../../api/transport:network_control",
Yves Gerey3e707812018-11-28 16:47:49 +010093 "../../api/units:data_rate",
94 "../../api/units:data_size",
95 "../../api/units:time_delta",
96 "../../api/units:timestamp",
Sebastian Jansson13171bd2018-07-03 18:11:45 +020097 "../../rtc_base:checks",
Sebastian Jansson52de8b02019-01-16 17:25:44 +010098 "../../test/logging:log_writer",
Yves Gerey3e707812018-11-28 16:47:49 +010099 "//third_party/abseil-cpp/absl/types:optional",
Sebastian Jansson13171bd2018-07-03 18:11:45 +0200100 ]
101 }
ehmaldonado36268652017-01-19 08:27:11 -0800102 rtc_source_set("congestion_controller_unittests") {
103 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700104
ehmaldonado36268652017-01-19 08:27:11 -0800105 sources = [
Niels Möller245f17e2017-08-21 10:45:07 +0200106 "receive_side_congestion_controller_unittest.cc",
107 "send_side_congestion_controller_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800108 "transport_feedback_adapter_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800109 ]
110 deps = [
111 ":congestion_controller",
zstein7cb69d52017-05-08 11:52:38 -0700112 ":mock_congestion_controller",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +0100113 ":transport_feedback",
Patrik Höglund731082c2018-01-03 09:08:20 +0100114 "../../logging:mocks",
Artem Titov94b57c02019-03-21 13:35:10 +0100115 "../../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100116 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700117 "../../rtc_base:rtc_base_approved",
Sebastian Jansson12985412018-10-15 21:06:26 +0200118 "../../rtc_base/network:sent_packet",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100119 "../../system_wrappers",
ehmaldonado36268652017-01-19 08:27:11 -0800120 "../../test:field_trial",
121 "../../test:test_support",
Artem Titov94b57c02019-03-21 13:35:10 +0100122 "../bitrate_controller",
123 "../pacing",
mbonadei334f9e62017-09-04 04:57:11 -0700124 "../pacing:mock_paced_sender",
Artem Titov94b57c02019-03-21 13:35:10 +0100125 "../remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100126 "../rtp_rtcp:rtp_rtcp_format",
Sebastian Jansson9bd1af12018-03-22 15:34:01 +0100127 "bbr:bbr_unittests",
Sebastian Jansson172fd852018-05-24 14:17:06 +0200128 "goog_cc:estimators",
Sebastian Janssonfc7ec8e2018-02-28 16:48:00 +0100129 "goog_cc:goog_cc_unittests",
Anastasia Koloskovaac50c6a2018-08-21 16:11:50 +0200130 "pcc:pcc_unittests",
Sebastian Jansson56da2f72018-02-28 13:07:28 +0100131 "rtp:congestion_controller_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800132 ]
ehmaldonado36268652017-01-19 08:27:11 -0800133 }
zstein7cb69d52017-05-08 11:52:38 -0700134
135 rtc_source_set("mock_congestion_controller") {
136 testonly = true
137 sources = [
138 "include/mock/mock_congestion_observer.h",
zstein7cb69d52017-05-08 11:52:38 -0700139 ]
140 deps = [
141 ":congestion_controller",
142 "../../test:test_support",
143 ]
144 }
ehmaldonado36268652017-01-19 08:27:11 -0800145}