blob: e55a9f15a778645d1062cbc02c41a530bb490328 [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",
Sebastian Janssonea86bb72018-02-14 16:53:38 +000027 "probe_controller.cc",
28 "probe_controller.h",
nisse559af382017-03-21 06:41:12 -070029 "receive_side_congestion_controller.cc",
30 "send_side_congestion_controller.cc",
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 = [
Sebastian Janssonea86bb72018-02-14 16:53:38 +000042 ":delay_based_bwe",
43 ":estimators",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010044 ":transport_feedback",
mbonadei1140f972017-04-26 03:38:35 -070045 "..:module_api",
mbonadei49f465f2016-12-28 04:43:46 -080046 "../..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010047 "../../rtc_base:checks",
48 "../../rtc_base:rate_limiter",
mbonadei49f465f2016-12-28 04:43:46 -080049 "../../system_wrappers",
Mirko Bonadeia498ae82017-12-06 09:17:14 +010050 "../../system_wrappers:field_trial_api",
51 "../../system_wrappers:metrics_api",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +000052 "../../system_wrappers:runtime_enabled_features_api",
Stefan Holmer80e12072016-02-23 13:30:42 +010053 "../bitrate_controller",
54 "../pacing",
mbonadei49f465f2016-12-28 04:43:46 -080055 "../remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +010056 "../rtp_rtcp:rtp_rtcp_format",
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 Janssonea86bb72018-02-14 16:53:38 +000074 "../../modules:module_api",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010075 "../../rtc_base:checks",
76 "../../rtc_base:rtc_base_approved",
Sebastian Janssonea86bb72018-02-14 16:53:38 +000077 "../../system_wrappers: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_source_set("estimators") {
83 configs += [ ":bwe_test_logging" ]
84 sources = [
85 "acknowledged_bitrate_estimator.cc",
86 "acknowledged_bitrate_estimator.h",
87 "bitrate_estimator.cc",
88 "bitrate_estimator.h",
89 "delay_increase_detector_interface.h",
90 "median_slope_estimator.cc",
91 "median_slope_estimator.h",
92 "probe_bitrate_estimator.cc",
93 "probe_bitrate_estimator.h",
94 "trendline_estimator.cc",
95 "trendline_estimator.h",
96 ]
97
98 # TODO(jschuh): Bug 1348: fix this warning.
99 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
100
101 if (!build_with_chromium && is_clang) {
102 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
103 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
104 }
105
106 deps = [
107 "../../api:optional",
108 "../../logging:rtc_event_bwe",
109 "../../logging:rtc_event_log_api",
110 "../../rtc_base:checks",
111 "../../rtc_base:rtc_base_approved",
112 "../../rtc_base:rtc_numerics",
113 "../../system_wrappers:field_trial_api",
114 "../../system_wrappers:metrics_api",
Sebastian Janssonea86bb72018-02-14 16:53:38 +0000115 "../remote_bitrate_estimator:remote_bitrate_estimator",
Danil Chapovalovbda50682018-02-14 09:08:28 +0000116 "../rtp_rtcp:rtp_rtcp_format",
117 ]
118}
119
120rtc_source_set("delay_based_bwe") {
121 configs += [ ":bwe_test_logging" ]
122 sources = [
123 "delay_based_bwe.cc",
124 "delay_based_bwe.h",
125 ]
126 deps = [
127 ":estimators",
128 "../../:typedefs",
129 "../../logging:rtc_event_bwe",
130 "../../logging:rtc_event_log_api",
131 "../../rtc_base:checks",
132 "../../rtc_base:rtc_base_approved",
133 "../../system_wrappers:field_trial_api",
134 "../../system_wrappers:metrics_api",
135 "../pacing",
136 "../remote_bitrate_estimator",
137 ]
138
139 if (!build_with_chromium && is_clang) {
140 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
141 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
142 }
143}
144
ehmaldonado36268652017-01-19 08:27:11 -0800145if (rtc_include_tests) {
146 rtc_source_set("congestion_controller_unittests") {
147 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700148
ehmaldonado36268652017-01-19 08:27:11 -0800149 sources = [
Sebastian Janssonea86bb72018-02-14 16:53:38 +0000150 "acknowledged_bitrate_estimator_unittest.cc",
elad.alon5bbf43f2017-03-09 06:40:08 -0800151 "congestion_controller_unittests_helper.cc",
152 "congestion_controller_unittests_helper.h",
Sebastian Janssonea86bb72018-02-14 16:53:38 +0000153 "delay_based_bwe_unittest.cc",
154 "delay_based_bwe_unittest_helper.cc",
155 "delay_based_bwe_unittest_helper.h",
156 "median_slope_estimator_unittest.cc",
157 "probe_bitrate_estimator_unittest.cc",
158 "probe_controller_unittest.cc",
Niels Möller245f17e2017-08-21 10:45:07 +0200159 "receive_side_congestion_controller_unittest.cc",
160 "send_side_congestion_controller_unittest.cc",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +0100161 "send_time_history_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800162 "transport_feedback_adapter_unittest.cc",
Sebastian Janssonea86bb72018-02-14 16:53:38 +0000163 "trendline_estimator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800164 ]
165 deps = [
166 ":congestion_controller",
Sebastian Janssonea86bb72018-02-14 16:53:38 +0000167 ":delay_based_bwe",
168 ":estimators",
zstein7cb69d52017-05-08 11:52:38 -0700169 ":mock_congestion_controller",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +0100170 ":transport_feedback",
Patrik Höglund731082c2018-01-03 09:08:20 +0100171 "../../logging:mocks",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100172 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700173 "../../rtc_base:rtc_base",
174 "../../rtc_base:rtc_base_approved",
175 "../../rtc_base:rtc_base_tests_utils",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100176 "../../system_wrappers",
ehmaldonado36268652017-01-19 08:27:11 -0800177 "../../test:field_trial",
178 "../../test:test_support",
Sebastian Janssonea86bb72018-02-14 16:53:38 +0000179 "../bitrate_controller:bitrate_controller",
Patrik Höglund94dc1772018-01-02 14:20:17 +0100180 "../bitrate_controller:mocks",
mbonadei334f9e62017-09-04 04:57:11 -0700181 "../pacing:mock_paced_sender",
ehmaldonado36268652017-01-19 08:27:11 -0800182 "../pacing:pacing",
183 "../remote_bitrate_estimator:remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100184 "../rtp_rtcp:rtp_rtcp_format",
Sebastian Jansson56da2f72018-02-28 13:07:28 +0100185 "rtp:congestion_controller_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800186 ]
187 if (!build_with_chromium && is_clang) {
188 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
189 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
190 }
191 }
zstein7cb69d52017-05-08 11:52:38 -0700192
193 rtc_source_set("mock_congestion_controller") {
194 testonly = true
195 sources = [
196 "include/mock/mock_congestion_observer.h",
zstein7cb69d52017-05-08 11:52:38 -0700197 ]
198 deps = [
199 ":congestion_controller",
200 "../../test:test_support",
201 ]
202 }
ehmaldonado36268652017-01-19 08:27:11 -0800203}