1# Copyright (c) 2018 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 9import("../../../webrtc.gni") 10 11config("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 19rtc_library("goog_cc") { 20 configs += [ ":bwe_test_logging" ] 21 sources = [ 22 "goog_cc_network_control.cc", 23 "goog_cc_network_control.h", 24 ] 25 26 deps = [ 27 ":alr_detector", 28 ":delay_based_bwe", 29 ":estimators", 30 ":loss_based_controller", 31 ":probe_controller", 32 ":pushback_controller", 33 "../..:module_api", 34 "../../..:webrtc_common", 35 "../../../api:network_state_predictor_api", 36 "../../../api/rtc_event_log", 37 "../../../api/transport:field_trial_based_config", 38 "../../../api/transport:network_control", 39 "../../../api/transport:webrtc_key_value_config", 40 "../../../api/units:data_rate", 41 "../../../api/units:data_size", 42 "../../../api/units:time_delta", 43 "../../../api/units:timestamp", 44 "../../../logging:rtc_event_bwe", 45 "../../../logging:rtc_event_pacing", 46 "../../../rtc_base:checks", 47 "../../../rtc_base:logging", 48 "../../../rtc_base:macromagic", 49 "../../../rtc_base/experiments:alr_experiment", 50 "../../../rtc_base/experiments:field_trial_parser", 51 "../../../rtc_base/experiments:rate_control_settings", 52 "../../../system_wrappers", 53 "../../remote_bitrate_estimator", 54 ] 55 absl_deps = [ 56 "//third_party/abseil-cpp/absl/strings", 57 "//third_party/abseil-cpp/absl/types:optional", 58 ] 59} 60 61rtc_library("link_capacity_estimator") { 62 sources = [ 63 "link_capacity_estimator.cc", 64 "link_capacity_estimator.h", 65 ] 66 deps = [ 67 "../../../api/units:data_rate", 68 "../../../rtc_base:safe_minmax", 69 ] 70 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] 71} 72 73rtc_library("pushback_controller") { 74 sources = [ 75 "congestion_window_pushback_controller.cc", 76 "congestion_window_pushback_controller.h", 77 ] 78 deps = [ 79 "../../../api/transport:network_control", 80 "../../../api/transport:webrtc_key_value_config", 81 "../../../api/units:data_size", 82 "../../../rtc_base:checks", 83 "../../../rtc_base/experiments:rate_control_settings", 84 ] 85 absl_deps = [ 86 "//third_party/abseil-cpp/absl/strings", 87 "//third_party/abseil-cpp/absl/types:optional", 88 ] 89} 90 91rtc_library("alr_detector") { 92 sources = [ 93 "alr_detector.cc", 94 "alr_detector.h", 95 ] 96 deps = [ 97 "../../../api/rtc_event_log", 98 "../../../api/transport:field_trial_based_config", 99 "../../../api/transport:webrtc_key_value_config", 100 "../../../logging:rtc_event_pacing", 101 "../../../rtc_base:checks", 102 "../../../rtc_base:safe_conversions", 103 "../../../rtc_base:timeutils", 104 "../../../rtc_base/experiments:alr_experiment", 105 "../../../rtc_base/experiments:field_trial_parser", 106 "../../pacing:interval_budget", 107 ] 108 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] 109} 110rtc_library("estimators") { 111 configs += [ ":bwe_test_logging" ] 112 sources = [ 113 "acknowledged_bitrate_estimator.cc", 114 "acknowledged_bitrate_estimator.h", 115 "acknowledged_bitrate_estimator_interface.cc", 116 "acknowledged_bitrate_estimator_interface.h", 117 "bitrate_estimator.cc", 118 "bitrate_estimator.h", 119 "delay_increase_detector_interface.h", 120 "probe_bitrate_estimator.cc", 121 "probe_bitrate_estimator.h", 122 "robust_throughput_estimator.cc", 123 "robust_throughput_estimator.h", 124 "trendline_estimator.cc", 125 "trendline_estimator.h", 126 ] 127 128 deps = [ 129 "../../../api:network_state_predictor_api", 130 "../../../api/rtc_event_log", 131 "../../../api/transport:network_control", 132 "../../../api/transport:webrtc_key_value_config", 133 "../../../api/units:data_rate", 134 "../../../api/units:timestamp", 135 "../../../logging:rtc_event_bwe", 136 "../../../rtc_base:checks", 137 "../../../rtc_base:logging", 138 "../../../rtc_base:macromagic", 139 "../../../rtc_base:rtc_numerics", 140 "../../../rtc_base:safe_conversions", 141 "../../../rtc_base:safe_minmax", 142 "../../../rtc_base/experiments:field_trial_parser", 143 "../../remote_bitrate_estimator", 144 ] 145 absl_deps = [ 146 "//third_party/abseil-cpp/absl/strings", 147 "//third_party/abseil-cpp/absl/types:optional", 148 ] 149} 150 151rtc_library("loss_based_controller") { 152 configs += [ ":bwe_test_logging" ] 153 sources = [ 154 "loss_based_bandwidth_estimation.cc", 155 "loss_based_bandwidth_estimation.h", 156 "send_side_bandwidth_estimation.cc", 157 "send_side_bandwidth_estimation.h", 158 ] 159 deps = [ 160 "../../../api/rtc_event_log", 161 "../../../api/transport:network_control", 162 "../../../api/units:data_rate", 163 "../../../api/units:time_delta", 164 "../../../api/units:timestamp", 165 "../../../logging:rtc_event_bwe", 166 "../../../rtc_base:checks", 167 "../../../rtc_base:logging", 168 "../../../rtc_base/experiments:field_trial_parser", 169 "../../../system_wrappers:field_trial", 170 "../../../system_wrappers:metrics", 171 "../../remote_bitrate_estimator", 172 ] 173 absl_deps = [ 174 "//third_party/abseil-cpp/absl/strings", 175 "//third_party/abseil-cpp/absl/types:optional", 176 ] 177} 178 179rtc_library("delay_based_bwe") { 180 configs += [ ":bwe_test_logging" ] 181 sources = [ 182 "delay_based_bwe.cc", 183 "delay_based_bwe.h", 184 ] 185 186 deps = [ 187 ":estimators", 188 "../../../api:network_state_predictor_api", 189 "../../../api/rtc_event_log", 190 "../../../api/transport:network_control", 191 "../../../api/transport:network_control", 192 "../../../api/transport:webrtc_key_value_config", 193 "../../../logging:rtc_event_bwe", 194 "../../../rtc_base:checks", 195 "../../../rtc_base:rtc_base_approved", 196 "../../../rtc_base/experiments:field_trial_parser", 197 "../../../system_wrappers:metrics", 198 "../../pacing", 199 "../../remote_bitrate_estimator", 200 ] 201 absl_deps = [ 202 "//third_party/abseil-cpp/absl/strings", 203 "//third_party/abseil-cpp/absl/types:optional", 204 ] 205} 206 207rtc_library("probe_controller") { 208 sources = [ 209 "probe_controller.cc", 210 "probe_controller.h", 211 ] 212 213 deps = [ 214 "../../../api/rtc_event_log", 215 "../../../api/transport:network_control", 216 "../../../api/transport:webrtc_key_value_config", 217 "../../../api/units:data_rate", 218 "../../../api/units:time_delta", 219 "../../../api/units:timestamp", 220 "../../../logging:rtc_event_bwe", 221 "../../../logging:rtc_event_pacing", 222 "../../../rtc_base:checks", 223 "../../../rtc_base:logging", 224 "../../../rtc_base:macromagic", 225 "../../../rtc_base:safe_conversions", 226 "../../../rtc_base/experiments:field_trial_parser", 227 "../../../rtc_base/system:unused", 228 "../../../system_wrappers:metrics", 229 ] 230 absl_deps = [ 231 "//third_party/abseil-cpp/absl/strings", 232 "//third_party/abseil-cpp/absl/types:optional", 233 ] 234} 235 236if (rtc_include_tests) { 237 rtc_library("test_goog_cc_printer") { 238 testonly = true 239 sources = [ 240 "test/goog_cc_printer.cc", 241 "test/goog_cc_printer.h", 242 ] 243 deps = [ 244 ":alr_detector", 245 ":delay_based_bwe", 246 ":estimators", 247 ":goog_cc", 248 "../../../api/rtc_event_log", 249 "../../../api/transport:goog_cc", 250 "../../../api/transport:network_control", 251 "../../../api/units:timestamp", 252 "../../../rtc_base:checks", 253 "../../../test/logging:log_writer", 254 "../../remote_bitrate_estimator", 255 ] 256 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] 257 } 258 rtc_library("goog_cc_unittests") { 259 testonly = true 260 261 sources = [ 262 "acknowledged_bitrate_estimator_unittest.cc", 263 "alr_detector_unittest.cc", 264 "congestion_window_pushback_controller_unittest.cc", 265 "delay_based_bwe_unittest.cc", 266 "delay_based_bwe_unittest_helper.cc", 267 "delay_based_bwe_unittest_helper.h", 268 "goog_cc_network_control_unittest.cc", 269 "probe_bitrate_estimator_unittest.cc", 270 "probe_controller_unittest.cc", 271 "robust_throughput_estimator_unittest.cc", 272 "send_side_bandwidth_estimation_unittest.cc", 273 "trendline_estimator_unittest.cc", 274 ] 275 deps = [ 276 ":alr_detector", 277 ":delay_based_bwe", 278 ":estimators", 279 ":goog_cc", 280 ":loss_based_controller", 281 ":probe_controller", 282 ":pushback_controller", 283 "../../../api/rtc_event_log", 284 "../../../api/transport:field_trial_based_config", 285 "../../../api/transport:goog_cc", 286 "../../../api/transport:network_control", 287 "../../../api/transport:webrtc_key_value_config", 288 "../../../api/units:data_rate", 289 "../../../api/units:timestamp", 290 "../../../logging:mocks", 291 "../../../logging:rtc_event_bwe", 292 "../../../rtc_base:checks", 293 "../../../rtc_base:rtc_base_approved", 294 "../../../rtc_base:rtc_base_tests_utils", 295 "../../../rtc_base/experiments:alr_experiment", 296 "../../../system_wrappers", 297 "../../../test:field_trial", 298 "../../../test:test_support", 299 "../../../test/scenario", 300 "../../pacing", 301 "//testing/gmock", 302 ] 303 } 304} 305