blob: eee190dde9fd1d5397dd6146d2ae8e8a47e2d712 [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",
Sebastian Jansson57daeb72018-02-05 17:15:09 +010025 "pacer_controller.cc",
26 "pacer_controller.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
Olga Sharonova44e57be2017-12-20 13:13:32 +000031 # TODO(jschuh): Bug 1348: fix this warning.
32 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
33
kjellandere40a7ee2016-10-16 23:56:12 -070034 if (!build_with_chromium && is_clang) {
35 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070036 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Stefan Holmer80e12072016-02-23 13:30:42 +010037 }
38
39 deps = [
Danil Chapovalovbda50682018-02-14 09:08:28 +000040 ":goog_cc",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010041 ":transport_feedback",
mbonadei1140f972017-04-26 03:38:35 -070042 "..:module_api",
mbonadei49f465f2016-12-28 04:43:46 -080043 "../..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010044 "../../rtc_base:checks",
45 "../../rtc_base:rate_limiter",
Sebastian Jansson57daeb72018-02-05 17:15:09 +010046 "../../rtc_base:rtc_task_queue_api",
47 "../../rtc_base:sequenced_task_checker",
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",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +000051 "../../system_wrappers:runtime_enabled_features_api",
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",
Danil Chapovalovbda50682018-02-14 09:08:28 +000056 "./network_control",
Stefan Holmer80e12072016-02-23 13:30:42 +010057 ]
Dan Minor9c686132018-01-15 10:20:00 -050058
59 if (!build_with_mozilla) {
60 deps += [ "../../rtc_base:rtc_base" ]
61 }
Stefan Holmer80e12072016-02-23 13:30:42 +010062}
ehmaldonado36268652017-01-19 08:27:11 -080063
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010064rtc_static_library("transport_feedback") {
65 visibility = [ "*" ]
66 sources = [
67 "send_time_history.cc",
68 "send_time_history.h",
69 "transport_feedback_adapter.cc",
70 "transport_feedback_adapter.h",
71 ]
72
73 deps = [
Sebastian Jansson57daeb72018-02-05 17:15:09 +010074 "..:module_api",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010075 "../../rtc_base:checks",
76 "../../rtc_base:rtc_base_approved",
Sebastian Jansson57daeb72018-02-05 17:15:09 +010077 "../../system_wrappers",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010078 "../rtp_rtcp:rtp_rtcp_format",
79 ]
80}
81
Danil Chapovalovbda50682018-02-14 09:08:28 +000082rtc_static_library("goog_cc") {
83 configs += [ ":bwe_test_logging" ]
84 sources = [
85 "alr_detector.cc",
86 "alr_detector.h",
87 "goog_cc_network_control.cc",
88 "goog_cc_network_control.h",
89 "include/goog_cc_factory.h",
90 "probe_controller.cc",
91 "probe_controller.h",
92 ]
93
94 # TODO(jschuh): Bug 1348: fix this warning.
95 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
96
97 if (!build_with_chromium && is_clang) {
98 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
99 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
100 }
101
102 deps = [
103 ":delay_based_bwe",
104 ":estimators",
105 "..:module_api",
106 "../..:webrtc_common",
107 "../../:typedefs",
108 "../../api:optional",
109 "../../logging:rtc_event_log_api",
110 "../../logging:rtc_event_pacing",
111 "../../rtc_base:checks",
112 "../../rtc_base:rtc_base_approved",
113 "../../rtc_base/experiments:alr_experiment",
114 "../../system_wrappers",
115 "../../system_wrappers:field_trial_api",
116 "../../system_wrappers:metrics_api",
117 "../bitrate_controller",
118 "../pacing",
119 "../remote_bitrate_estimator",
120 "../rtp_rtcp:rtp_rtcp_format",
121 "./network_control",
122 ]
123}
124
125rtc_source_set("estimators") {
126 configs += [ ":bwe_test_logging" ]
127 sources = [
128 "acknowledged_bitrate_estimator.cc",
129 "acknowledged_bitrate_estimator.h",
130 "bitrate_estimator.cc",
131 "bitrate_estimator.h",
132 "delay_increase_detector_interface.h",
133 "median_slope_estimator.cc",
134 "median_slope_estimator.h",
135 "probe_bitrate_estimator.cc",
136 "probe_bitrate_estimator.h",
137 "trendline_estimator.cc",
138 "trendline_estimator.h",
139 ]
140
141 # TODO(jschuh): Bug 1348: fix this warning.
142 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
143
144 if (!build_with_chromium && is_clang) {
145 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
146 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
147 }
148
149 deps = [
150 "../../api:optional",
151 "../../logging:rtc_event_bwe",
152 "../../logging:rtc_event_log_api",
153 "../../rtc_base:checks",
154 "../../rtc_base:rtc_base_approved",
155 "../../rtc_base:rtc_numerics",
156 "../../system_wrappers:field_trial_api",
157 "../../system_wrappers:metrics_api",
158 "../remote_bitrate_estimator",
159 "../rtp_rtcp:rtp_rtcp_format",
160 ]
161}
162
163rtc_source_set("delay_based_bwe") {
164 configs += [ ":bwe_test_logging" ]
165 sources = [
166 "delay_based_bwe.cc",
167 "delay_based_bwe.h",
168 ]
169 deps = [
170 ":estimators",
171 "../../:typedefs",
172 "../../logging:rtc_event_bwe",
173 "../../logging:rtc_event_log_api",
174 "../../rtc_base:checks",
175 "../../rtc_base:rtc_base_approved",
176 "../../system_wrappers:field_trial_api",
177 "../../system_wrappers:metrics_api",
178 "../pacing",
179 "../remote_bitrate_estimator",
180 ]
181
182 if (!build_with_chromium && is_clang) {
183 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
184 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
185 }
186}
187
ehmaldonado36268652017-01-19 08:27:11 -0800188if (rtc_include_tests) {
189 rtc_source_set("congestion_controller_unittests") {
190 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700191
ehmaldonado36268652017-01-19 08:27:11 -0800192 sources = [
elad.alon5bbf43f2017-03-09 06:40:08 -0800193 "congestion_controller_unittests_helper.cc",
194 "congestion_controller_unittests_helper.h",
Niels Möller245f17e2017-08-21 10:45:07 +0200195 "receive_side_congestion_controller_unittest.cc",
196 "send_side_congestion_controller_unittest.cc",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +0100197 "send_time_history_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800198 "transport_feedback_adapter_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800199 ]
200 deps = [
201 ":congestion_controller",
Danil Chapovalovbda50682018-02-14 09:08:28 +0000202 ":goog_cc_unittests",
zstein7cb69d52017-05-08 11:52:38 -0700203 ":mock_congestion_controller",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +0100204 ":transport_feedback",
Patrik Höglund731082c2018-01-03 09:08:20 +0100205 "../../logging:mocks",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100206 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700207 "../../rtc_base:rtc_base",
208 "../../rtc_base:rtc_base_approved",
209 "../../rtc_base:rtc_base_tests_utils",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100210 "../../system_wrappers",
ehmaldonado36268652017-01-19 08:27:11 -0800211 "../../test:field_trial",
212 "../../test:test_support",
Patrik Höglund94dc1772018-01-02 14:20:17 +0100213 "../bitrate_controller:mocks",
mbonadei334f9e62017-09-04 04:57:11 -0700214 "../pacing:mock_paced_sender",
ehmaldonado36268652017-01-19 08:27:11 -0800215 "../pacing:pacing",
216 "../remote_bitrate_estimator:remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100217 "../rtp_rtcp:rtp_rtcp_format",
Danil Chapovalovbda50682018-02-14 09:08:28 +0000218 "./network_control",
219 "//testing/gmock",
220 ]
221 if (!build_with_chromium && is_clang) {
222 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
223 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
224 }
225 }
226
227 rtc_source_set("goog_cc_unittests") {
228 testonly = true
229
230 sources = [
231 "acknowledged_bitrate_estimator_unittest.cc",
232 "alr_detector_unittest.cc",
233 "delay_based_bwe_unittest.cc",
234 "delay_based_bwe_unittest_helper.cc",
235 "delay_based_bwe_unittest_helper.h",
236 "median_slope_estimator_unittest.cc",
237 "probe_bitrate_estimator_unittest.cc",
238 "probe_controller_unittest.cc",
239 "trendline_estimator_unittest.cc",
240 ]
241 deps = [
242 ":delay_based_bwe",
243 ":estimators",
244 ":goog_cc",
245 "../../rtc_base:checks",
246 "../../rtc_base:rtc_base_approved",
247 "../../rtc_base:rtc_base_tests_utils",
248 "../../rtc_base/experiments:alr_experiment",
249 "../../system_wrappers",
250 "../../test:field_trial",
251 "../../test:test_support",
252 "../pacing",
253 "../remote_bitrate_estimator",
254 "../rtp_rtcp:rtp_rtcp_format",
255 "./network_control",
256 "./network_control:network_control_unittests",
Sebastian Jansson57daeb72018-02-05 17:15:09 +0100257 "//testing/gmock",
ehmaldonado36268652017-01-19 08:27:11 -0800258 ]
259 if (!build_with_chromium && is_clang) {
260 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
261 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
262 }
263 }
zstein7cb69d52017-05-08 11:52:38 -0700264
265 rtc_source_set("mock_congestion_controller") {
266 testonly = true
267 sources = [
268 "include/mock/mock_congestion_observer.h",
269 "include/mock/mock_send_side_congestion_controller.h",
270 ]
271 deps = [
272 ":congestion_controller",
273 "../../test:test_support",
274 ]
275 }
ehmaldonado36268652017-01-19 08:27:11 -0800276}