blob: de57e5b08f3a137a71ac8e73cf1a37dee618752a [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 = [
Ying Wange1d7b232018-07-17 16:01:25 +020023 "congestion_window_pushback_controller.cc",
24 "congestion_window_pushback_controller.h",
Sebastian Janssone4be6da2018-02-15 16:51:41 +010025 "include/network_changed_observer.h",
nisse559af382017-03-21 06:41:12 -070026 "include/receive_side_congestion_controller.h",
27 "include/send_side_congestion_controller.h",
Sebastian Janssondfde3342018-02-22 12:32:27 +010028 "include/send_side_congestion_controller_interface.h",
nisse559af382017-03-21 06:41:12 -070029 "receive_side_congestion_controller.cc",
30 "send_side_congestion_controller.cc",
Stefan Holmer80e12072016-02-23 13:30:42 +010031 ]
32
kjellandere40a7ee2016-10-16 23:56:12 -070033 if (!build_with_chromium && is_clang) {
34 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070035 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Stefan Holmer80e12072016-02-23 13:30:42 +010036 }
37
38 deps = [
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010039 ":transport_feedback",
mbonadei1140f972017-04-26 03:38:35 -070040 "..:module_api",
mbonadei49f465f2016-12-28 04:43:46 -080041 "../..:webrtc_common",
Ying Wange1d7b232018-07-17 16:01:25 +020042 "../../api/transport:network_control",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010043 "../../rtc_base:checks",
Ying Wange1d7b232018-07-17 16:01:25 +020044 "../../rtc_base:ptr_util",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010045 "../../rtc_base:rate_limiter",
mbonadei49f465f2016-12-28 04:43:46 -080046 "../../system_wrappers",
Mirko Bonadeia498ae82017-12-06 09:17:14 +010047 "../../system_wrappers:field_trial_api",
48 "../../system_wrappers:metrics_api",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +000049 "../../system_wrappers:runtime_enabled_features_api",
Stefan Holmer80e12072016-02-23 13:30:42 +010050 "../bitrate_controller",
51 "../pacing",
mbonadei49f465f2016-12-28 04:43:46 -080052 "../remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +010053 "../rtp_rtcp:rtp_rtcp_format",
Sebastian Jansson04b18cb2018-07-02 09:25:25 +020054 "goog_cc:delay_based_bwe",
Sebastian Jansson172fd852018-05-24 14:17:06 +020055 "goog_cc:estimators",
Sebastian Janssonb2ecc3d2018-07-13 17:22:01 +020056 "goog_cc:probe_controller",
Karl Wiberg918f50c2018-07-05 11:40:33 +020057 "//third_party/abseil-cpp/absl/memory",
Stefan Holmer80e12072016-02-23 13:30:42 +010058 ]
Dan Minor9c686132018-01-15 10:20:00 -050059
60 if (!build_with_mozilla) {
61 deps += [ "../../rtc_base:rtc_base" ]
62 }
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 = [
Sebastian Janssonea86bb72018-02-14 16:53:38 +000073 "../../modules:module_api",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010074 "../../rtc_base:checks",
75 "../../rtc_base:rtc_base_approved",
Sebastian Janssonea86bb72018-02-14 16:53:38 +000076 "../../system_wrappers:system_wrappers",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010077 "../rtp_rtcp:rtp_rtcp_format",
Sebastian Jansson172fd852018-05-24 14:17:06 +020078 "rtp:transport_feedback",
Danil Chapovalovbda50682018-02-14 09:08:28 +000079 ]
80}
81
ehmaldonado36268652017-01-19 08:27:11 -080082if (rtc_include_tests) {
Sebastian Jansson13171bd2018-07-03 18:11:45 +020083 rtc_source_set("test_controller_printer") {
84 testonly = true
85 sources = [
86 "test/controller_printer.cc",
87 "test/controller_printer.h",
88 ]
89 if (!build_with_chromium && is_clang) {
90 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
91 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
92 }
93 deps = [
94 "../../api/transport:network_control",
95 "../../rtc_base:checks",
96 ]
97 }
ehmaldonado36268652017-01-19 08:27:11 -080098 rtc_source_set("congestion_controller_unittests") {
99 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700100
ehmaldonado36268652017-01-19 08:27:11 -0800101 sources = [
Ying Wange1d7b232018-07-17 16:01:25 +0200102 "congestion_window_pushback_controller_unittest.cc",
Niels Möller245f17e2017-08-21 10:45:07 +0200103 "receive_side_congestion_controller_unittest.cc",
104 "send_side_congestion_controller_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800105 "transport_feedback_adapter_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800106 ]
107 deps = [
108 ":congestion_controller",
zstein7cb69d52017-05-08 11:52:38 -0700109 ":mock_congestion_controller",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +0100110 ":transport_feedback",
Patrik Höglund731082c2018-01-03 09:08:20 +0100111 "../../logging:mocks",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100112 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700113 "../../rtc_base:rtc_base",
114 "../../rtc_base:rtc_base_approved",
115 "../../rtc_base:rtc_base_tests_utils",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100116 "../../system_wrappers",
ehmaldonado36268652017-01-19 08:27:11 -0800117 "../../test:field_trial",
118 "../../test:test_support",
Sebastian Janssonea86bb72018-02-14 16:53:38 +0000119 "../bitrate_controller:bitrate_controller",
Patrik Höglund94dc1772018-01-02 14:20:17 +0100120 "../bitrate_controller:mocks",
mbonadei334f9e62017-09-04 04:57:11 -0700121 "../pacing:mock_paced_sender",
ehmaldonado36268652017-01-19 08:27:11 -0800122 "../pacing:pacing",
123 "../remote_bitrate_estimator:remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100124 "../rtp_rtcp:rtp_rtcp_format",
Sebastian Jansson9bd1af12018-03-22 15:34:01 +0100125 "bbr:bbr_unittests",
Sebastian Jansson172fd852018-05-24 14:17:06 +0200126 "goog_cc:estimators",
Sebastian Janssonfc7ec8e2018-02-28 16:48:00 +0100127 "goog_cc:goog_cc_unittests",
Anastasia Koloskovaac50c6a2018-08-21 16:11:50 +0200128 "pcc:pcc_unittests",
Sebastian Jansson56da2f72018-02-28 13:07:28 +0100129 "rtp:congestion_controller_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800130 ]
131 if (!build_with_chromium && is_clang) {
132 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
133 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
134 }
135 }
zstein7cb69d52017-05-08 11:52:38 -0700136
137 rtc_source_set("mock_congestion_controller") {
138 testonly = true
139 sources = [
140 "include/mock/mock_congestion_observer.h",
zstein7cb69d52017-05-08 11:52:38 -0700141 ]
142 deps = [
143 ":congestion_controller",
144 "../../test:test_support",
145 ]
146 }
ehmaldonado36268652017-01-19 08:27:11 -0800147}