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_bwe_v2", 31 ":probe_controller", 32 ":pushback_controller", 33 ":send_side_bwe", 34 "../../../api:field_trials_view", 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/units:data_rate", 40 "../../../api/units:data_size", 41 "../../../api/units:time_delta", 42 "../../../api/units:timestamp", 43 "../../../logging:rtc_event_bwe", 44 "../../../logging:rtc_event_pacing", 45 "../../../rtc_base:checks", 46 "../../../rtc_base:logging", 47 "../../../rtc_base/experiments:alr_experiment", 48 "../../../rtc_base/experiments:field_trial_parser", 49 "../../../rtc_base/experiments:rate_control_settings", 50 "../../../system_wrappers", 51 "../../remote_bitrate_estimator", 52 ] 53 absl_deps = [ 54 "//third_party/abseil-cpp/absl/strings", 55 "//third_party/abseil-cpp/absl/types:optional", 56 ] 57} 58 59rtc_library("link_capacity_estimator") { 60 sources = [ 61 "link_capacity_estimator.cc", 62 "link_capacity_estimator.h", 63 ] 64 deps = [ 65 "../../../api/units:data_rate", 66 "../../../rtc_base:safe_minmax", 67 ] 68 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] 69} 70 71rtc_library("pushback_controller") { 72 sources = [ 73 "congestion_window_pushback_controller.cc", 74 "congestion_window_pushback_controller.h", 75 ] 76 deps = [ 77 "../../../api:field_trials_view", 78 "../../../api/transport:network_control", 79 "../../../api/units:data_size", 80 "../../../rtc_base:checks", 81 "../../../rtc_base/experiments:rate_control_settings", 82 ] 83 absl_deps = [ 84 "//third_party/abseil-cpp/absl/strings", 85 "//third_party/abseil-cpp/absl/types:optional", 86 ] 87} 88 89rtc_library("alr_detector") { 90 sources = [ 91 "alr_detector.cc", 92 "alr_detector.h", 93 ] 94 deps = [ 95 "../../../api:field_trials_view", 96 "../../../api/rtc_event_log", 97 "../../../api/transport:field_trial_based_config", 98 "../../../logging:rtc_event_pacing", 99 "../../../rtc_base:checks", 100 "../../../rtc_base:safe_conversions", 101 "../../../rtc_base:timeutils", 102 "../../../rtc_base/experiments:alr_experiment", 103 "../../../rtc_base/experiments:field_trial_parser", 104 "../../pacing:interval_budget", 105 ] 106 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] 107} 108rtc_library("estimators") { 109 configs += [ ":bwe_test_logging" ] 110 sources = [ 111 "acknowledged_bitrate_estimator.cc", 112 "acknowledged_bitrate_estimator.h", 113 "acknowledged_bitrate_estimator_interface.cc", 114 "acknowledged_bitrate_estimator_interface.h", 115 "bitrate_estimator.cc", 116 "bitrate_estimator.h", 117 "delay_increase_detector_interface.h", 118 "probe_bitrate_estimator.cc", 119 "probe_bitrate_estimator.h", 120 "robust_throughput_estimator.cc", 121 "robust_throughput_estimator.h", 122 "trendline_estimator.cc", 123 "trendline_estimator.h", 124 ] 125 126 deps = [ 127 "../../../api:field_trials_view", 128 "../../../api:network_state_predictor_api", 129 "../../../api/rtc_event_log", 130 "../../../api/transport:network_control", 131 "../../../api/units:data_rate", 132 "../../../api/units:data_size", 133 "../../../api/units:time_delta", 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_bwe_v2") { 152 sources = [ 153 "loss_based_bwe_v2.cc", 154 "loss_based_bwe_v2.h", 155 ] 156 deps = [ 157 "../../../api:array_view", 158 "../../../api:field_trials_view", 159 "../../../api:network_state_predictor_api", 160 "../../../api/transport:network_control", 161 "../../../api/units:data_rate", 162 "../../../api/units:data_size", 163 "../../../api/units:time_delta", 164 "../../../api/units:timestamp", 165 "../../../rtc_base:logging", 166 "../../../rtc_base/experiments:field_trial_parser", 167 "../../remote_bitrate_estimator", 168 ] 169 absl_deps = [ 170 "//third_party/abseil-cpp/absl/algorithm:container", 171 "//third_party/abseil-cpp/absl/types:optional", 172 ] 173} 174 175rtc_library("loss_based_bwe_v1") { 176 configs += [ ":bwe_test_logging" ] 177 sources = [ 178 "loss_based_bandwidth_estimation.cc", 179 "loss_based_bandwidth_estimation.h", 180 ] 181 deps = [ 182 "../../../api:field_trials_view", 183 "../../../api/transport:network_control", 184 "../../../api/units:data_rate", 185 "../../../api/units:time_delta", 186 "../../../api/units:timestamp", 187 "../../../rtc_base:checks", 188 "../../../rtc_base/experiments:field_trial_parser", 189 ] 190 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ] 191} 192 193rtc_library("send_side_bwe") { 194 configs += [ ":bwe_test_logging" ] 195 sources = [ 196 "send_side_bandwidth_estimation.cc", 197 "send_side_bandwidth_estimation.h", 198 ] 199 deps = [ 200 ":loss_based_bwe_v1", 201 ":loss_based_bwe_v2", 202 "../../../api:field_trials_view", 203 "../../../api:network_state_predictor_api", 204 "../../../api/rtc_event_log", 205 "../../../api/transport:network_control", 206 "../../../api/units:data_rate", 207 "../../../api/units:time_delta", 208 "../../../api/units:timestamp", 209 "../../../logging:rtc_event_bwe", 210 "../../../rtc_base:checks", 211 "../../../rtc_base:logging", 212 "../../../rtc_base/experiments:field_trial_parser", 213 "../../../system_wrappers:field_trial", 214 "../../../system_wrappers:metrics", 215 "../../remote_bitrate_estimator", 216 ] 217 absl_deps = [ 218 "//third_party/abseil-cpp/absl/strings", 219 "//third_party/abseil-cpp/absl/types:optional", 220 ] 221} 222 223rtc_library("delay_based_bwe") { 224 configs += [ ":bwe_test_logging" ] 225 sources = [ 226 "delay_based_bwe.cc", 227 "delay_based_bwe.h", 228 "inter_arrival_delta.cc", 229 "inter_arrival_delta.h", 230 ] 231 232 deps = [ 233 ":estimators", 234 "../../../api:field_trials_view", 235 "../../../api:network_state_predictor_api", 236 "../../../api/rtc_event_log", 237 "../../../api/transport:network_control", 238 "../../../api/units:time_delta", 239 "../../../api/units:timestamp", 240 "../../../logging:rtc_event_bwe", 241 "../../../rtc_base:checks", 242 "../../../rtc_base:logging", 243 "../../../rtc_base:race_checker", 244 "../../../rtc_base/experiments:field_trial_parser", 245 "../../../system_wrappers:metrics", 246 "../../pacing", 247 "../../remote_bitrate_estimator", 248 ] 249 absl_deps = [ 250 "//third_party/abseil-cpp/absl/strings", 251 "//third_party/abseil-cpp/absl/types:optional", 252 ] 253} 254 255rtc_library("probe_controller") { 256 sources = [ 257 "probe_controller.cc", 258 "probe_controller.h", 259 ] 260 261 deps = [ 262 "../../../api:field_trials_view", 263 "../../../api/rtc_event_log", 264 "../../../api/transport:network_control", 265 "../../../api/units:data_rate", 266 "../../../api/units:data_size", 267 "../../../api/units:time_delta", 268 "../../../api/units:timestamp", 269 "../../../logging:rtc_event_bwe", 270 "../../../logging:rtc_event_pacing", 271 "../../../rtc_base:checks", 272 "../../../rtc_base:logging", 273 "../../../rtc_base:macromagic", 274 "../../../rtc_base:safe_conversions", 275 "../../../rtc_base/experiments:field_trial_parser", 276 "../../../system_wrappers:metrics", 277 ] 278 absl_deps = [ 279 "//third_party/abseil-cpp/absl/base:core_headers", 280 "//third_party/abseil-cpp/absl/strings", 281 "//third_party/abseil-cpp/absl/types:optional", 282 ] 283} 284 285if (rtc_include_tests) { 286 rtc_library("test_goog_cc_printer") { 287 testonly = true 288 sources = [ 289 "test/goog_cc_printer.cc", 290 "test/goog_cc_printer.h", 291 ] 292 deps = [ 293 ":alr_detector", 294 ":delay_based_bwe", 295 ":estimators", 296 ":goog_cc", 297 "../../../api/rtc_event_log", 298 "../../../api/transport:goog_cc", 299 "../../../api/transport:network_control", 300 "../../../api/units:timestamp", 301 "../../../rtc_base:checks", 302 "../../../test/logging:log_writer", 303 "../../remote_bitrate_estimator", 304 ] 305 absl_deps = [ 306 "//third_party/abseil-cpp/absl/strings", 307 "//third_party/abseil-cpp/absl/types:optional", 308 ] 309 } 310 if (!build_with_chromium) { 311 rtc_library("goog_cc_unittests") { 312 testonly = true 313 314 sources = [ 315 "acknowledged_bitrate_estimator_unittest.cc", 316 "alr_detector_unittest.cc", 317 "congestion_window_pushback_controller_unittest.cc", 318 "delay_based_bwe_unittest.cc", 319 "delay_based_bwe_unittest_helper.cc", 320 "delay_based_bwe_unittest_helper.h", 321 "goog_cc_network_control_unittest.cc", 322 "loss_based_bwe_v2_test.cc", 323 "probe_bitrate_estimator_unittest.cc", 324 "probe_controller_unittest.cc", 325 "robust_throughput_estimator_unittest.cc", 326 "send_side_bandwidth_estimation_unittest.cc", 327 "trendline_estimator_unittest.cc", 328 ] 329 deps = [ 330 ":alr_detector", 331 ":delay_based_bwe", 332 ":estimators", 333 ":goog_cc", 334 ":loss_based_bwe_v2", 335 ":probe_controller", 336 ":pushback_controller", 337 ":send_side_bwe", 338 "../../../api:field_trials_view", 339 "../../../api:network_state_predictor_api", 340 "../../../api/rtc_event_log", 341 "../../../api/test/network_emulation", 342 "../../../api/test/network_emulation:create_cross_traffic", 343 "../../../api/transport:field_trial_based_config", 344 "../../../api/transport:goog_cc", 345 "../../../api/transport:network_control", 346 "../../../api/units:data_rate", 347 "../../../api/units:data_size", 348 "../../../api/units:time_delta", 349 "../../../api/units:timestamp", 350 "../../../logging:mocks", 351 "../../../logging:rtc_event_bwe", 352 "../../../rtc_base:checks", 353 "../../../rtc_base:logging", 354 "../../../rtc_base:random", 355 "../../../rtc_base:rtc_base_tests_utils", 356 "../../../rtc_base:stringutils", 357 "../../../rtc_base/experiments:alr_experiment", 358 "../../../system_wrappers", 359 "../../../test:explicit_key_value_config", 360 "../../../test:field_trial", 361 "../../../test:test_support", 362 "../../../test/scenario", 363 "../../pacing", 364 "//testing/gmock", 365 ] 366 absl_deps = [ "//third_party/abseil-cpp/absl/strings:strings" ] 367 } 368 } 369} 370