blob: 774fc84d67d5ae23b8dda0cc3072b924639a64d3 [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
Mirko Bonadei86d053c2019-10-17 21:32:04 +020019rtc_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 = [
nisse559af382017-03-21 06:41:12 -070023 "include/receive_side_congestion_controller.h",
nisse559af382017-03-21 06:41:12 -070024 "receive_side_congestion_controller.cc",
Per Kjellander898f0912021-04-21 11:56:32 +020025 "remb_throttler.cc",
26 "remb_throttler.h",
Stefan Holmer80e12072016-02-23 13:30:42 +010027 ]
28
Stefan Holmer80e12072016-02-23 13:30:42 +010029 deps = [
Sebastian Jansson95edb032019-01-17 16:24:12 +010030 "../../api/transport:field_trial_based_config",
Per Kjellander52f7ae72019-09-10 19:28:06 +020031 "../../api/transport:network_control",
Per Kjellander898f0912021-04-21 11:56:32 +020032 "../../api/units:data_rate",
33 "../../api/units:time_delta",
34 "../../api/units:timestamp",
Florent Castelli0af55ba2022-04-04 15:06:30 +020035 "../../rtc_base:logging",
Danil Chapovalov56257af2022-07-01 16:28:55 +020036 "../../rtc_base:macromagic",
Markus Handell9c962502020-07-07 22:03:26 +020037 "../../rtc_base/synchronization:mutex",
Stefan Holmer80e12072016-02-23 13:30:42 +010038 "../pacing",
mbonadei49f465f2016-12-28 04:43:46 -080039 "../remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +010040 "../rtp_rtcp:rtp_rtcp_format",
Stefan Holmer80e12072016-02-23 13:30:42 +010041 ]
Dan Minor9c686132018-01-15 10:20:00 -050042
43 if (!build_with_mozilla) {
Artem Titov94b57c02019-03-21 13:35:10 +010044 deps += [ "../../rtc_base" ]
Dan Minor9c686132018-01-15 10:20:00 -050045 }
Stefan Holmer80e12072016-02-23 13:30:42 +010046}
ehmaldonado36268652017-01-19 08:27:11 -080047
Andrey Logvine7c79fd2021-02-01 09:56:37 +000048if (rtc_include_tests && !build_with_chromium) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +020049 rtc_library("congestion_controller_unittests") {
ehmaldonado36268652017-01-19 08:27:11 -080050 testonly = true
kjellandere0629c02017-04-25 04:04:50 -070051
Per Kjellander898f0912021-04-21 11:56:32 +020052 sources = [
53 "receive_side_congestion_controller_unittest.cc",
54 "remb_throttler_unittest.cc",
55 ]
ehmaldonado36268652017-01-19 08:27:11 -080056 deps = [
57 ":congestion_controller",
Andrey Logvinf9ee0e02021-01-14 09:50:32 +000058 "../../api/test/network_emulation",
59 "../../api/test/network_emulation:create_cross_traffic",
Per Kjellander898f0912021-04-21 11:56:32 +020060 "../../api/units:data_rate",
61 "../../api/units:time_delta",
62 "../../api/units:timestamp",
Mirko Bonadeia498ae82017-12-06 09:17:14 +010063 "../../system_wrappers",
ehmaldonado36268652017-01-19 08:27:11 -080064 "../../test:test_support",
Sebastian Jansson24cf2602019-06-07 15:24:57 +020065 "../../test/scenario",
Artem Titov94b57c02019-03-21 13:35:10 +010066 "../pacing",
Sebastian Jansson172fd852018-05-24 14:17:06 +020067 "goog_cc:estimators",
Sebastian Janssonfc7ec8e2018-02-28 16:48:00 +010068 "goog_cc:goog_cc_unittests",
Anastasia Koloskovaac50c6a2018-08-21 16:11:50 +020069 "pcc:pcc_unittests",
Sebastian Jansson56da2f72018-02-28 13:07:28 +010070 "rtp:congestion_controller_unittests",
ehmaldonado36268652017-01-19 08:27:11 -080071 ]
ehmaldonado36268652017-01-19 08:27:11 -080072 }
73}