Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 1 | # 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 | |
mbonadei | 9aa3f0a | 2017-01-24 06:58:22 -0800 | [diff] [blame] | 9 | import("../../webrtc.gni") |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 10 | |
Patrik Höglund | 7613454 | 2018-01-02 09:15:05 +0100 | [diff] [blame] | 11 | config("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 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 19 | rtc_static_library("congestion_controller") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 20 | visibility = [ "*" ] |
Patrik Höglund | 7613454 | 2018-01-02 09:15:05 +0100 | [diff] [blame] | 21 | configs += [ ":bwe_test_logging" ] |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 22 | sources = [ |
nisse | 559af38 | 2017-03-21 06:41:12 -0700 | [diff] [blame] | 23 | "include/receive_side_congestion_controller.h", |
| 24 | "include/send_side_congestion_controller.h", |
Sebastian Jansson | 57daeb7 | 2018-02-05 17:15:09 +0100 | [diff] [blame] | 25 | "pacer_controller.cc", |
| 26 | "pacer_controller.h", |
nisse | 559af38 | 2017-03-21 06:41:12 -0700 | [diff] [blame] | 27 | "receive_side_congestion_controller.cc", |
| 28 | "send_side_congestion_controller.cc", |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 29 | ] |
| 30 | |
Olga Sharonova | 44e57be | 2017-12-20 13:13:32 +0000 | [diff] [blame] | 31 | # TODO(jschuh): Bug 1348: fix this warning. |
| 32 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 33 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 34 | if (!build_with_chromium && is_clang) { |
| 35 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 36 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | deps = [ |
Danil Chapovalov | bda5068 | 2018-02-14 09:08:28 +0000 | [diff] [blame^] | 40 | ":goog_cc", |
Stefan Holmer | 4dbc7e4 | 2018-01-26 15:09:41 +0100 | [diff] [blame] | 41 | ":transport_feedback", |
mbonadei | 1140f97 | 2017-04-26 03:38:35 -0700 | [diff] [blame] | 42 | "..:module_api", |
mbonadei | 49f465f | 2016-12-28 04:43:46 -0800 | [diff] [blame] | 43 | "../..:webrtc_common", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 44 | "../../rtc_base:checks", |
| 45 | "../../rtc_base:rate_limiter", |
Sebastian Jansson | 57daeb7 | 2018-02-05 17:15:09 +0100 | [diff] [blame] | 46 | "../../rtc_base:rtc_task_queue_api", |
| 47 | "../../rtc_base:sequenced_task_checker", |
mbonadei | 49f465f | 2016-12-28 04:43:46 -0800 | [diff] [blame] | 48 | "../../system_wrappers", |
Mirko Bonadei | a498ae8 | 2017-12-06 09:17:14 +0100 | [diff] [blame] | 49 | "../../system_wrappers:field_trial_api", |
| 50 | "../../system_wrappers:metrics_api", |
Ilya Nikolaevskiy | 2ffe3e8 | 2018-01-17 19:57:24 +0000 | [diff] [blame] | 51 | "../../system_wrappers:runtime_enabled_features_api", |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 52 | "../bitrate_controller", |
| 53 | "../pacing", |
mbonadei | 49f465f | 2016-12-28 04:43:46 -0800 | [diff] [blame] | 54 | "../remote_bitrate_estimator", |
Mirko Bonadei | b5728d9 | 2017-12-06 07:51:33 +0100 | [diff] [blame] | 55 | "../rtp_rtcp:rtp_rtcp_format", |
Danil Chapovalov | bda5068 | 2018-02-14 09:08:28 +0000 | [diff] [blame^] | 56 | "./network_control", |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 57 | ] |
Dan Minor | 9c68613 | 2018-01-15 10:20:00 -0500 | [diff] [blame] | 58 | |
| 59 | if (!build_with_mozilla) { |
| 60 | deps += [ "../../rtc_base:rtc_base" ] |
| 61 | } |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 62 | } |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 63 | |
Stefan Holmer | 4dbc7e4 | 2018-01-26 15:09:41 +0100 | [diff] [blame] | 64 | rtc_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 Jansson | 57daeb7 | 2018-02-05 17:15:09 +0100 | [diff] [blame] | 74 | "..:module_api", |
Stefan Holmer | 4dbc7e4 | 2018-01-26 15:09:41 +0100 | [diff] [blame] | 75 | "../../rtc_base:checks", |
| 76 | "../../rtc_base:rtc_base_approved", |
Sebastian Jansson | 57daeb7 | 2018-02-05 17:15:09 +0100 | [diff] [blame] | 77 | "../../system_wrappers", |
Stefan Holmer | 4dbc7e4 | 2018-01-26 15:09:41 +0100 | [diff] [blame] | 78 | "../rtp_rtcp:rtp_rtcp_format", |
| 79 | ] |
| 80 | } |
| 81 | |
Danil Chapovalov | bda5068 | 2018-02-14 09:08:28 +0000 | [diff] [blame^] | 82 | rtc_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 | |
| 125 | rtc_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 | |
| 163 | rtc_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 | |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 188 | if (rtc_include_tests) { |
| 189 | rtc_source_set("congestion_controller_unittests") { |
| 190 | testonly = true |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 191 | |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 192 | sources = [ |
elad.alon | 5bbf43f | 2017-03-09 06:40:08 -0800 | [diff] [blame] | 193 | "congestion_controller_unittests_helper.cc", |
| 194 | "congestion_controller_unittests_helper.h", |
Niels Möller | 245f17e | 2017-08-21 10:45:07 +0200 | [diff] [blame] | 195 | "receive_side_congestion_controller_unittest.cc", |
| 196 | "send_side_congestion_controller_unittest.cc", |
Stefan Holmer | 4dbc7e4 | 2018-01-26 15:09:41 +0100 | [diff] [blame] | 197 | "send_time_history_unittest.cc", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 198 | "transport_feedback_adapter_unittest.cc", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 199 | ] |
| 200 | deps = [ |
| 201 | ":congestion_controller", |
Danil Chapovalov | bda5068 | 2018-02-14 09:08:28 +0000 | [diff] [blame^] | 202 | ":goog_cc_unittests", |
zstein | 7cb69d5 | 2017-05-08 11:52:38 -0700 | [diff] [blame] | 203 | ":mock_congestion_controller", |
Stefan Holmer | 4dbc7e4 | 2018-01-26 15:09:41 +0100 | [diff] [blame] | 204 | ":transport_feedback", |
Patrik Höglund | 731082c | 2018-01-03 09:08:20 +0100 | [diff] [blame] | 205 | "../../logging:mocks", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 206 | "../../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 207 | "../../rtc_base:rtc_base", |
| 208 | "../../rtc_base:rtc_base_approved", |
| 209 | "../../rtc_base:rtc_base_tests_utils", |
Mirko Bonadei | a498ae8 | 2017-12-06 09:17:14 +0100 | [diff] [blame] | 210 | "../../system_wrappers", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 211 | "../../test:field_trial", |
| 212 | "../../test:test_support", |
Patrik Höglund | 94dc177 | 2018-01-02 14:20:17 +0100 | [diff] [blame] | 213 | "../bitrate_controller:mocks", |
mbonadei | 334f9e6 | 2017-09-04 04:57:11 -0700 | [diff] [blame] | 214 | "../pacing:mock_paced_sender", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 215 | "../pacing:pacing", |
| 216 | "../remote_bitrate_estimator:remote_bitrate_estimator", |
Mirko Bonadei | b5728d9 | 2017-12-06 07:51:33 +0100 | [diff] [blame] | 217 | "../rtp_rtcp:rtp_rtcp_format", |
Danil Chapovalov | bda5068 | 2018-02-14 09:08:28 +0000 | [diff] [blame^] | 218 | "./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 Jansson | 57daeb7 | 2018-02-05 17:15:09 +0100 | [diff] [blame] | 257 | "//testing/gmock", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 258 | ] |
| 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 | } |
zstein | 7cb69d5 | 2017-05-08 11:52:38 -0700 | [diff] [blame] | 264 | |
| 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 | } |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 276 | } |