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") { |
Patrik Höglund | 7613454 | 2018-01-02 09:15:05 +0100 | [diff] [blame] | 20 | configs += [ ":bwe_test_logging" ] |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 21 | sources = [ |
nisse | 559af38 | 2017-03-21 06:41:12 -0700 | [diff] [blame] | 22 | "include/receive_side_congestion_controller.h", |
| 23 | "include/send_side_congestion_controller.h", |
Irfan Sheriff | b2540bb | 2016-09-12 12:28:54 -0700 | [diff] [blame] | 24 | "probe_controller.cc", |
| 25 | "probe_controller.h", |
nisse | 559af38 | 2017-03-21 06:41:12 -0700 | [diff] [blame] | 26 | "receive_side_congestion_controller.cc", |
| 27 | "send_side_congestion_controller.cc", |
Stefan Holmer | 280de9e | 2016-09-30 10:06:51 +0200 | [diff] [blame] | 28 | "transport_feedback_adapter.cc", |
| 29 | "transport_feedback_adapter.h", |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 30 | ] |
| 31 | |
Olga Sharonova | 44e57be | 2017-12-20 13:13:32 +0000 | [diff] [blame] | 32 | # TODO(jschuh): Bug 1348: fix this warning. |
| 33 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 34 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 35 | if (!build_with_chromium && is_clang) { |
| 36 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 37 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | deps = [ |
Patrik Höglund | 7613454 | 2018-01-02 09:15:05 +0100 | [diff] [blame] | 41 | ":delay_based_bwe", |
| 42 | ":estimators", |
mbonadei | 1140f97 | 2017-04-26 03:38:35 -0700 | [diff] [blame] | 43 | "..:module_api", |
mbonadei | 49f465f | 2016-12-28 04:43:46 -0800 | [diff] [blame] | 44 | "../..:webrtc_common", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 45 | "../../rtc_base:checks", |
| 46 | "../../rtc_base:rate_limiter", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 47 | "../../rtc_base:rtc_base", |
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", |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 51 | "../bitrate_controller", |
| 52 | "../pacing", |
mbonadei | 49f465f | 2016-12-28 04:43:46 -0800 | [diff] [blame] | 53 | "../remote_bitrate_estimator", |
Mirko Bonadei | b5728d9 | 2017-12-06 07:51:33 +0100 | [diff] [blame] | 54 | "../rtp_rtcp:rtp_rtcp_format", |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 55 | ] |
| 56 | } |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 57 | |
Patrik Höglund | 7613454 | 2018-01-02 09:15:05 +0100 | [diff] [blame] | 58 | rtc_source_set("estimators") { |
| 59 | configs += [ ":bwe_test_logging" ] |
| 60 | sources = [ |
| 61 | "acknowledged_bitrate_estimator.cc", |
| 62 | "acknowledged_bitrate_estimator.h", |
| 63 | "bitrate_estimator.cc", |
| 64 | "bitrate_estimator.h", |
| 65 | "median_slope_estimator.cc", |
| 66 | "median_slope_estimator.h", |
| 67 | "probe_bitrate_estimator.cc", |
| 68 | "probe_bitrate_estimator.h", |
| 69 | "trendline_estimator.cc", |
| 70 | "trendline_estimator.h", |
| 71 | ] |
| 72 | |
| 73 | # TODO(jschuh): Bug 1348: fix this warning. |
| 74 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 75 | |
| 76 | if (!build_with_chromium && is_clang) { |
| 77 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 78 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 79 | } |
| 80 | |
| 81 | deps = [ |
| 82 | "../../api:optional", |
| 83 | "../../logging:rtc_event_log_api", |
| 84 | "../../rtc_base:checks", |
| 85 | "../../rtc_base:rtc_base_approved", |
| 86 | "../../rtc_base:rtc_numerics", |
| 87 | "../../system_wrappers:field_trial_api", |
| 88 | "../../system_wrappers:metrics_api", |
| 89 | "../remote_bitrate_estimator:remote_bitrate_estimator", |
| 90 | "../rtp_rtcp:rtp_rtcp_format", |
| 91 | ] |
| 92 | } |
| 93 | |
| 94 | rtc_source_set("delay_based_bwe") { |
| 95 | configs += [ ":bwe_test_logging" ] |
| 96 | sources = [ |
| 97 | "delay_based_bwe.cc", |
| 98 | "delay_based_bwe.h", |
| 99 | ] |
| 100 | deps = [ |
| 101 | ":estimators", |
| 102 | "../../:typedefs", |
| 103 | "../../logging:rtc_event_log_api", |
| 104 | "../../rtc_base:checks", |
| 105 | "../../rtc_base:rtc_base_approved", |
| 106 | "../../system_wrappers:field_trial_api", |
| 107 | "../../system_wrappers:metrics_api", |
| 108 | "../pacing", |
| 109 | "../remote_bitrate_estimator", |
| 110 | ] |
| 111 | |
| 112 | if (!build_with_chromium && is_clang) { |
| 113 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 114 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 115 | } |
| 116 | } |
| 117 | |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 118 | if (rtc_include_tests) { |
| 119 | rtc_source_set("congestion_controller_unittests") { |
| 120 | testonly = true |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 121 | |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 122 | sources = [ |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 123 | "acknowledged_bitrate_estimator_unittest.cc", |
elad.alon | 5bbf43f | 2017-03-09 06:40:08 -0800 | [diff] [blame] | 124 | "congestion_controller_unittests_helper.cc", |
| 125 | "congestion_controller_unittests_helper.h", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 126 | "delay_based_bwe_unittest.cc", |
| 127 | "delay_based_bwe_unittest_helper.cc", |
| 128 | "delay_based_bwe_unittest_helper.h", |
| 129 | "median_slope_estimator_unittest.cc", |
| 130 | "probe_bitrate_estimator_unittest.cc", |
| 131 | "probe_controller_unittest.cc", |
Niels Möller | 245f17e | 2017-08-21 10:45:07 +0200 | [diff] [blame] | 132 | "receive_side_congestion_controller_unittest.cc", |
| 133 | "send_side_congestion_controller_unittest.cc", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 134 | "transport_feedback_adapter_unittest.cc", |
| 135 | "trendline_estimator_unittest.cc", |
| 136 | ] |
| 137 | deps = [ |
| 138 | ":congestion_controller", |
Patrik Höglund | 7613454 | 2018-01-02 09:15:05 +0100 | [diff] [blame] | 139 | ":delay_based_bwe", |
| 140 | ":estimators", |
zstein | 7cb69d5 | 2017-05-08 11:52:38 -0700 | [diff] [blame] | 141 | ":mock_congestion_controller", |
Patrik Höglund | 731082c | 2018-01-03 09:08:20 +0100 | [diff] [blame] | 142 | "../../logging:mocks", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 143 | "../../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 144 | "../../rtc_base:rtc_base", |
| 145 | "../../rtc_base:rtc_base_approved", |
| 146 | "../../rtc_base:rtc_base_tests_utils", |
Mirko Bonadei | a498ae8 | 2017-12-06 09:17:14 +0100 | [diff] [blame] | 147 | "../../system_wrappers", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 148 | "../../test:field_trial", |
| 149 | "../../test:test_support", |
| 150 | "../bitrate_controller:bitrate_controller", |
Patrik Höglund | 94dc177 | 2018-01-02 14:20:17 +0100 | [diff] [blame] | 151 | "../bitrate_controller:mocks", |
mbonadei | 334f9e6 | 2017-09-04 04:57:11 -0700 | [diff] [blame] | 152 | "../pacing:mock_paced_sender", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 153 | "../pacing:pacing", |
| 154 | "../remote_bitrate_estimator:remote_bitrate_estimator", |
Mirko Bonadei | b5728d9 | 2017-12-06 07:51:33 +0100 | [diff] [blame] | 155 | "../rtp_rtcp:rtp_rtcp_format", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 156 | "//testing/gmock", |
| 157 | ] |
| 158 | if (!build_with_chromium && is_clang) { |
| 159 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 160 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 161 | } |
| 162 | } |
zstein | 7cb69d5 | 2017-05-08 11:52:38 -0700 | [diff] [blame] | 163 | |
| 164 | rtc_source_set("mock_congestion_controller") { |
| 165 | testonly = true |
| 166 | sources = [ |
| 167 | "include/mock/mock_congestion_observer.h", |
| 168 | "include/mock/mock_send_side_congestion_controller.h", |
| 169 | ] |
| 170 | deps = [ |
| 171 | ":congestion_controller", |
| 172 | "../../test:test_support", |
| 173 | ] |
| 174 | } |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 175 | } |