blob: cf303a578c5d9bd73f23efd611c4cdfa11c3f666 [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 = [
nisse559af382017-03-21 06:41:12 -070023 "include/receive_side_congestion_controller.h",
24 "include/send_side_congestion_controller.h",
Irfan Sheriffb2540bb2016-09-12 12:28:54 -070025 "probe_controller.cc",
26 "probe_controller.h",
nisse559af382017-03-21 06:41:12 -070027 "receive_side_congestion_controller.cc",
28 "send_side_congestion_controller.cc",
Stefan Holmer280de9e2016-09-30 10:06:51 +020029 "transport_feedback_adapter.cc",
30 "transport_feedback_adapter.h",
Stefan Holmer80e12072016-02-23 13:30:42 +010031 ]
32
Olga Sharonova44e57be2017-12-20 13:13:32 +000033 # TODO(jschuh): Bug 1348: fix this warning.
34 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
35
kjellandere40a7ee2016-10-16 23:56:12 -070036 if (!build_with_chromium && is_clang) {
37 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070038 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Stefan Holmer80e12072016-02-23 13:30:42 +010039 }
40
41 deps = [
Patrik Höglund76134542018-01-02 09:15:05 +010042 ":delay_based_bwe",
43 ":estimators",
mbonadei1140f972017-04-26 03:38:35 -070044 "..:module_api",
mbonadei49f465f2016-12-28 04:43:46 -080045 "../..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010046 "../../rtc_base:checks",
47 "../../rtc_base:rate_limiter",
mbonadei49f465f2016-12-28 04:43:46 -080048 "../../system_wrappers",
Mirko Bonadeia498ae82017-12-06 09:17:14 +010049 "../../system_wrappers:field_trial_api",
50 "../../system_wrappers:metrics_api",
Stefan Holmer80e12072016-02-23 13:30:42 +010051 "../bitrate_controller",
52 "../pacing",
mbonadei49f465f2016-12-28 04:43:46 -080053 "../remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +010054 "../rtp_rtcp:rtp_rtcp_format",
Stefan Holmer80e12072016-02-23 13:30:42 +010055 ]
Dan Minor9c686132018-01-15 10:20:00 -050056
57 if (!build_with_mozilla) {
58 deps += [ "../../rtc_base:rtc_base" ]
59 }
Stefan Holmer80e12072016-02-23 13:30:42 +010060}
ehmaldonado36268652017-01-19 08:27:11 -080061
Patrik Höglund76134542018-01-02 09:15:05 +010062rtc_source_set("estimators") {
63 configs += [ ":bwe_test_logging" ]
64 sources = [
65 "acknowledged_bitrate_estimator.cc",
66 "acknowledged_bitrate_estimator.h",
67 "bitrate_estimator.cc",
68 "bitrate_estimator.h",
69 "median_slope_estimator.cc",
70 "median_slope_estimator.h",
71 "probe_bitrate_estimator.cc",
72 "probe_bitrate_estimator.h",
73 "trendline_estimator.cc",
74 "trendline_estimator.h",
75 ]
76
77 # TODO(jschuh): Bug 1348: fix this warning.
78 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
79
80 if (!build_with_chromium && is_clang) {
81 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
82 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
83 }
84
85 deps = [
86 "../../api:optional",
87 "../../logging:rtc_event_log_api",
88 "../../rtc_base:checks",
89 "../../rtc_base:rtc_base_approved",
90 "../../rtc_base:rtc_numerics",
91 "../../system_wrappers:field_trial_api",
92 "../../system_wrappers:metrics_api",
93 "../remote_bitrate_estimator:remote_bitrate_estimator",
94 "../rtp_rtcp:rtp_rtcp_format",
95 ]
96}
97
98rtc_source_set("delay_based_bwe") {
99 configs += [ ":bwe_test_logging" ]
100 sources = [
101 "delay_based_bwe.cc",
102 "delay_based_bwe.h",
103 ]
104 deps = [
105 ":estimators",
106 "../../:typedefs",
107 "../../logging:rtc_event_log_api",
108 "../../rtc_base:checks",
109 "../../rtc_base:rtc_base_approved",
110 "../../system_wrappers:field_trial_api",
111 "../../system_wrappers:metrics_api",
112 "../pacing",
113 "../remote_bitrate_estimator",
114 ]
115
116 if (!build_with_chromium && is_clang) {
117 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
118 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
119 }
120}
121
ehmaldonado36268652017-01-19 08:27:11 -0800122if (rtc_include_tests) {
123 rtc_source_set("congestion_controller_unittests") {
124 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700125
ehmaldonado36268652017-01-19 08:27:11 -0800126 sources = [
tschumim9d117642017-07-17 01:41:41 -0700127 "acknowledged_bitrate_estimator_unittest.cc",
elad.alon5bbf43f2017-03-09 06:40:08 -0800128 "congestion_controller_unittests_helper.cc",
129 "congestion_controller_unittests_helper.h",
ehmaldonado36268652017-01-19 08:27:11 -0800130 "delay_based_bwe_unittest.cc",
131 "delay_based_bwe_unittest_helper.cc",
132 "delay_based_bwe_unittest_helper.h",
133 "median_slope_estimator_unittest.cc",
134 "probe_bitrate_estimator_unittest.cc",
135 "probe_controller_unittest.cc",
Niels Möller245f17e2017-08-21 10:45:07 +0200136 "receive_side_congestion_controller_unittest.cc",
137 "send_side_congestion_controller_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800138 "transport_feedback_adapter_unittest.cc",
139 "trendline_estimator_unittest.cc",
140 ]
141 deps = [
142 ":congestion_controller",
Patrik Höglund76134542018-01-02 09:15:05 +0100143 ":delay_based_bwe",
144 ":estimators",
zstein7cb69d52017-05-08 11:52:38 -0700145 ":mock_congestion_controller",
Patrik Höglund731082c2018-01-03 09:08:20 +0100146 "../../logging:mocks",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100147 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700148 "../../rtc_base:rtc_base",
149 "../../rtc_base:rtc_base_approved",
150 "../../rtc_base:rtc_base_tests_utils",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100151 "../../system_wrappers",
ehmaldonado36268652017-01-19 08:27:11 -0800152 "../../test:field_trial",
153 "../../test:test_support",
154 "../bitrate_controller:bitrate_controller",
Patrik Höglund94dc1772018-01-02 14:20:17 +0100155 "../bitrate_controller:mocks",
mbonadei334f9e62017-09-04 04:57:11 -0700156 "../pacing:mock_paced_sender",
ehmaldonado36268652017-01-19 08:27:11 -0800157 "../pacing:pacing",
158 "../remote_bitrate_estimator:remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100159 "../rtp_rtcp:rtp_rtcp_format",
ehmaldonado36268652017-01-19 08:27:11 -0800160 "//testing/gmock",
161 ]
162 if (!build_with_chromium && is_clang) {
163 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
164 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
165 }
166 }
zstein7cb69d52017-05-08 11:52:38 -0700167
168 rtc_source_set("mock_congestion_controller") {
169 testonly = true
170 sources = [
171 "include/mock/mock_congestion_observer.h",
172 "include/mock/mock_send_side_congestion_controller.h",
173 ]
174 deps = [
175 ":congestion_controller",
176 "../../test:test_support",
177 ]
178 }
ehmaldonado36268652017-01-19 08:27:11 -0800179}