blob: 06b8669c5e3b3189cedca3937141ad1e15275181 [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
kjellandere40a7ee2016-10-16 23:56:12 -070031 if (!build_with_chromium && is_clang) {
32 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070033 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Stefan Holmer80e12072016-02-23 13:30:42 +010034 }
35
36 deps = [
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010037 ":transport_feedback",
mbonadei1140f972017-04-26 03:38:35 -070038 "..:module_api",
mbonadei49f465f2016-12-28 04:43:46 -080039 "../..:webrtc_common",
Sebastian Jansson95edb032019-01-17 16:24:12 +010040 "../../api/transport:field_trial_based_config",
Ying Wange1d7b232018-07-17 16:01:25 +020041 "../../api/transport:network_control",
Sebastian Jansson95edb032019-01-17 16:24:12 +010042 "../../api/transport:webrtc_key_value_config",
Yves Gerey3e707812018-11-28 16:47:49 +010043 "../../api/units:data_rate",
44 "../../api/units:timestamp",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010045 "../../rtc_base:checks",
Sebastian Jansson7d92de62018-12-17 11:14:11 +010046 "../../rtc_base:deprecation",
Ying Wange1d7b232018-07-17 16:01:25 +020047 "../../rtc_base:ptr_util",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010048 "../../rtc_base:rate_limiter",
Sebastian Jansson12985412018-10-15 21:06:26 +020049 "../../rtc_base/network:sent_packet",
mbonadei49f465f2016-12-28 04:43:46 -080050 "../../system_wrappers",
Mirko Bonadei17f48782018-09-28 08:51:10 +020051 "../../system_wrappers:field_trial",
Stefan Holmer80e12072016-02-23 13:30:42 +010052 "../bitrate_controller",
53 "../pacing",
mbonadei49f465f2016-12-28 04:43:46 -080054 "../remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +010055 "../rtp_rtcp:rtp_rtcp_format",
Sebastian Jansson04b18cb2018-07-02 09:25:25 +020056 "goog_cc:delay_based_bwe",
Sebastian Jansson172fd852018-05-24 14:17:06 +020057 "goog_cc:estimators",
Sebastian Janssonb2ecc3d2018-07-13 17:22:01 +020058 "goog_cc:probe_controller",
Sebastian Jansson3bdbc842018-10-11 15:02:12 +020059 "goog_cc:pushback_controller",
Karl Wiberg918f50c2018-07-05 11:40:33 +020060 "//third_party/abseil-cpp/absl/memory",
Yves Gerey3e707812018-11-28 16:47:49 +010061 "//third_party/abseil-cpp/absl/types:optional",
Stefan Holmer80e12072016-02-23 13:30:42 +010062 ]
Dan Minor9c686132018-01-15 10:20:00 -050063
64 if (!build_with_mozilla) {
65 deps += [ "../../rtc_base:rtc_base" ]
66 }
Stefan Holmer80e12072016-02-23 13:30:42 +010067}
ehmaldonado36268652017-01-19 08:27:11 -080068
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010069rtc_static_library("transport_feedback") {
70 visibility = [ "*" ]
71 sources = [
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010072 "transport_feedback_adapter.cc",
73 "transport_feedback_adapter.h",
74 ]
75
76 deps = [
Danil Chapovalovdb128562018-09-17 13:11:50 +020077 "../../api/transport:network_control",
Yves Gerey3e707812018-11-28 16:47:49 +010078 "../../api/units:data_size",
Sebastian Janssonea86bb72018-02-14 16:53:38 +000079 "../../modules:module_api",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010080 "../../rtc_base:checks",
81 "../../rtc_base:rtc_base_approved",
Sebastian Janssonea86bb72018-02-14 16:53:38 +000082 "../../system_wrappers:system_wrappers",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010083 "../rtp_rtcp:rtp_rtcp_format",
Sebastian Jansson172fd852018-05-24 14:17:06 +020084 "rtp:transport_feedback",
Danil Chapovalovbda50682018-02-14 09:08:28 +000085 ]
86}
87
ehmaldonado36268652017-01-19 08:27:11 -080088if (rtc_include_tests) {
Sebastian Jansson13171bd2018-07-03 18:11:45 +020089 rtc_source_set("test_controller_printer") {
90 testonly = true
91 sources = [
92 "test/controller_printer.cc",
93 "test/controller_printer.h",
94 ]
95 if (!build_with_chromium && is_clang) {
96 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
97 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
98 }
99 deps = [
100 "../../api/transport:network_control",
Yves Gerey3e707812018-11-28 16:47:49 +0100101 "../../api/units:data_rate",
102 "../../api/units:data_size",
103 "../../api/units:time_delta",
104 "../../api/units:timestamp",
Sebastian Jansson13171bd2018-07-03 18:11:45 +0200105 "../../rtc_base:checks",
Sebastian Jansson52de8b02019-01-16 17:25:44 +0100106 "../../test/logging:log_writer",
Yves Gerey3e707812018-11-28 16:47:49 +0100107 "//third_party/abseil-cpp/absl/types:optional",
Sebastian Jansson13171bd2018-07-03 18:11:45 +0200108 ]
109 }
ehmaldonado36268652017-01-19 08:27:11 -0800110 rtc_source_set("congestion_controller_unittests") {
111 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700112
ehmaldonado36268652017-01-19 08:27:11 -0800113 sources = [
Niels Möller245f17e2017-08-21 10:45:07 +0200114 "receive_side_congestion_controller_unittest.cc",
115 "send_side_congestion_controller_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800116 "transport_feedback_adapter_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800117 ]
118 deps = [
119 ":congestion_controller",
zstein7cb69d52017-05-08 11:52:38 -0700120 ":mock_congestion_controller",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +0100121 ":transport_feedback",
Patrik Höglund731082c2018-01-03 09:08:20 +0100122 "../../logging:mocks",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100123 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700124 "../../rtc_base:rtc_base",
125 "../../rtc_base:rtc_base_approved",
Sebastian Jansson12985412018-10-15 21:06:26 +0200126 "../../rtc_base/network:sent_packet",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100127 "../../system_wrappers",
ehmaldonado36268652017-01-19 08:27:11 -0800128 "../../test:field_trial",
129 "../../test:test_support",
Sebastian Janssonea86bb72018-02-14 16:53:38 +0000130 "../bitrate_controller:bitrate_controller",
Patrik Höglund94dc1772018-01-02 14:20:17 +0100131 "../bitrate_controller:mocks",
mbonadei334f9e62017-09-04 04:57:11 -0700132 "../pacing:mock_paced_sender",
ehmaldonado36268652017-01-19 08:27:11 -0800133 "../pacing:pacing",
134 "../remote_bitrate_estimator:remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100135 "../rtp_rtcp:rtp_rtcp_format",
Sebastian Jansson9bd1af12018-03-22 15:34:01 +0100136 "bbr:bbr_unittests",
Sebastian Jansson172fd852018-05-24 14:17:06 +0200137 "goog_cc:estimators",
Sebastian Janssonfc7ec8e2018-02-28 16:48:00 +0100138 "goog_cc:goog_cc_unittests",
Anastasia Koloskovaac50c6a2018-08-21 16:11:50 +0200139 "pcc:pcc_unittests",
Sebastian Jansson56da2f72018-02-28 13:07:28 +0100140 "rtp:congestion_controller_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800141 ]
142 if (!build_with_chromium && is_clang) {
143 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
144 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
145 }
146 }
zstein7cb69d52017-05-08 11:52:38 -0700147
148 rtc_source_set("mock_congestion_controller") {
149 testonly = true
150 sources = [
151 "include/mock/mock_congestion_observer.h",
zstein7cb69d52017-05-08 11:52:38 -0700152 ]
153 deps = [
154 ":congestion_controller",
155 "../../test:test_support",
156 ]
157 }
ehmaldonado36268652017-01-19 08:27:11 -0800158}