kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [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") |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 10 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 11 | rtc_static_library("remote_bitrate_estimator") { |
mbonadei | 49f465f | 2016-12-28 04:43:46 -0800 | [diff] [blame] | 12 | # TODO(mbonadei): Remove (bugs.webrtc.org/6828) |
| 13 | # Errors on cyclic dependency with: |
| 14 | # rtp_rtcp:rtp_rtcp if enabled. |
| 15 | check_includes = false |
| 16 | |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 17 | sources = [ |
pbos@webrtc.org | 9f79fe6 | 2014-12-04 15:34:06 +0000 | [diff] [blame] | 18 | "aimd_rate_control.cc", |
| 19 | "aimd_rate_control.h", |
stefan | 64636dd | 2016-08-03 00:29:03 -0700 | [diff] [blame] | 20 | "bwe_defines.cc", |
kjellander | 5c1d043 | 2016-06-09 02:40:58 -0700 | [diff] [blame] | 21 | "include/bwe_defines.h", |
| 22 | "include/remote_bitrate_estimator.h", |
sprang | 318673c | 2015-09-04 04:43:21 -0700 | [diff] [blame] | 23 | "include/send_time_history.h", |
pbos@webrtc.org | 9f79fe6 | 2014-12-04 15:34:06 +0000 | [diff] [blame] | 24 | "inter_arrival.cc", |
| 25 | "inter_arrival.h", |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 26 | "overuse_detector.cc", |
| 27 | "overuse_detector.h", |
pbos@webrtc.org | 9f79fe6 | 2014-12-04 15:34:06 +0000 | [diff] [blame] | 28 | "overuse_estimator.cc", |
| 29 | "overuse_estimator.h", |
| 30 | "remote_bitrate_estimator_abs_send_time.cc", |
kjellander | 5c1d043 | 2016-06-09 02:40:58 -0700 | [diff] [blame] | 31 | "remote_bitrate_estimator_abs_send_time.h", |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 32 | "remote_bitrate_estimator_single_stream.cc", |
kjellander | 5c1d043 | 2016-06-09 02:40:58 -0700 | [diff] [blame] | 33 | "remote_bitrate_estimator_single_stream.h", |
Erik Språng | 6b8d355 | 2015-09-24 15:06:57 +0200 | [diff] [blame] | 34 | "remote_estimator_proxy.cc", |
| 35 | "remote_estimator_proxy.h", |
sprang | 318673c | 2015-09-04 04:43:21 -0700 | [diff] [blame] | 36 | "send_time_history.cc", |
kjellander | 5c1d043 | 2016-06-09 02:40:58 -0700 | [diff] [blame] | 37 | "test/bwe_test_logging.h", |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 38 | ] |
kjellander@webrtc.org | 9bef551 | 2014-07-13 09:02:54 +0000 | [diff] [blame] | 39 | |
gaetano.carlucci | 61050f6 | 2016-09-30 06:29:54 -0700 | [diff] [blame] | 40 | if (rtc_enable_bwe_test_logging) { |
| 41 | defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ] |
| 42 | sources += [ "test/bwe_test_logging.cc" ] |
| 43 | } else { |
| 44 | defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ] |
brucedawson | 07df20b | 2016-05-22 17:15:02 -0700 | [diff] [blame] | 45 | } |
| 46 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 47 | if (!build_with_chromium && is_clang) { |
| 48 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 49 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander@webrtc.org | 42ee5b5 | 2014-08-25 14:15:35 +0000 | [diff] [blame] | 50 | } |
kjellander | 5c1d043 | 2016-06-09 02:40:58 -0700 | [diff] [blame] | 51 | |
| 52 | deps = [ |
| 53 | "../..:webrtc_common", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 54 | "../../rtc_base:rtc_base", |
| 55 | "../../rtc_base:rtc_base_approved", |
kjellander | 5c1d043 | 2016-06-09 02:40:58 -0700 | [diff] [blame] | 56 | "../../system_wrappers", |
| 57 | ] |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 58 | } |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 59 | |
| 60 | if (rtc_include_tests) { |
terelius | 3dcfd64 | 2016-10-07 00:39:56 -0700 | [diff] [blame] | 61 | rtc_static_library("bwe_simulator_lib") { |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 62 | testonly = true |
| 63 | sources = [ |
gnish | a36165c | 2017-08-20 09:19:58 -0700 | [diff] [blame^] | 64 | "test/bbr_paced_sender.cc", |
| 65 | "test/bbr_paced_sender.h", |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 66 | "test/bwe.cc", |
| 67 | "test/bwe.h", |
| 68 | "test/bwe_test.cc", |
| 69 | "test/bwe_test.h", |
| 70 | "test/bwe_test_baselinefile.cc", |
| 71 | "test/bwe_test_baselinefile.h", |
| 72 | "test/bwe_test_fileutils.cc", |
| 73 | "test/bwe_test_fileutils.h", |
| 74 | "test/bwe_test_framework.cc", |
| 75 | "test/bwe_test_framework.h", |
| 76 | "test/bwe_test_logging.h", |
gnish | 6dcdf10 | 2017-06-05 06:01:26 -0700 | [diff] [blame] | 77 | "test/estimators/bbr.cc", |
| 78 | "test/estimators/bbr.h", |
gnish | 157cbbd | 2017-07-18 02:50:22 -0700 | [diff] [blame] | 79 | "test/estimators/congestion_window.cc", |
gnish | 6dcdf10 | 2017-06-05 06:01:26 -0700 | [diff] [blame] | 80 | "test/estimators/congestion_window.h", |
gnish | 191113a | 2017-07-05 05:00:46 -0700 | [diff] [blame] | 81 | "test/estimators/max_bandwidth_filter.cc", |
gnish | 6dcdf10 | 2017-06-05 06:01:26 -0700 | [diff] [blame] | 82 | "test/estimators/max_bandwidth_filter.h", |
| 83 | "test/estimators/min_rtt_filter.h", |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 84 | "test/estimators/nada.cc", |
| 85 | "test/estimators/nada.h", |
| 86 | "test/estimators/remb.cc", |
| 87 | "test/estimators/remb.h", |
| 88 | "test/estimators/send_side.cc", |
| 89 | "test/estimators/send_side.h", |
| 90 | "test/estimators/tcp.cc", |
| 91 | "test/estimators/tcp.h", |
| 92 | "test/metric_recorder.cc", |
| 93 | "test/metric_recorder.h", |
| 94 | "test/packet.h", |
| 95 | "test/packet_receiver.cc", |
| 96 | "test/packet_receiver.h", |
| 97 | "test/packet_sender.cc", |
| 98 | "test/packet_sender.h", |
| 99 | ] |
| 100 | |
| 101 | if (rtc_enable_bwe_test_logging) { |
| 102 | defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ] |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 103 | } else { |
| 104 | defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ] |
| 105 | } |
| 106 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 107 | if (!build_with_chromium && is_clang) { |
| 108 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 109 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 110 | } |
| 111 | |
| 112 | if (is_win) { |
| 113 | cflags = [ |
| 114 | # TODO(kjellander): Bug 261: fix this warning. |
| 115 | "/wd4373", # virtual function override. |
| 116 | ] |
| 117 | } |
| 118 | |
| 119 | deps = [ |
mbonadei | 49f465f | 2016-12-28 04:43:46 -0800 | [diff] [blame] | 120 | ":remote_bitrate_estimator", |
mbonadei | 1140f97 | 2017-04-26 03:38:35 -0700 | [diff] [blame] | 121 | "..:module_api", |
mbonadei | 49f465f | 2016-12-28 04:43:46 -0800 | [diff] [blame] | 122 | "../..:webrtc_common", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 123 | "../../rtc_base:gtest_prod", |
| 124 | "../../rtc_base:rtc_base", |
| 125 | "../../rtc_base:rtc_base_approved", |
mbonadei | 49f465f | 2016-12-28 04:43:46 -0800 | [diff] [blame] | 126 | "../../system_wrappers", |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 127 | "../../test:test_support", |
mbonadei | 49f465f | 2016-12-28 04:43:46 -0800 | [diff] [blame] | 128 | "../../voice_engine", |
| 129 | "../bitrate_controller", |
terelius | 9531092 | 2016-11-03 08:14:07 -0700 | [diff] [blame] | 130 | "../congestion_controller", |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 131 | "../pacing", |
mbonadei | 49f465f | 2016-12-28 04:43:46 -0800 | [diff] [blame] | 132 | "../rtp_rtcp", |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 133 | "//testing/gmock", |
| 134 | "//testing/gtest", |
| 135 | ] |
| 136 | } |
ehmaldonado | 021eef3 | 2017-01-05 07:09:50 -0800 | [diff] [blame] | 137 | |
| 138 | rtc_source_set("remote_bitrate_estimator_perf_tests") { |
| 139 | testonly = true |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 140 | |
| 141 | # Skip restricting visibility on mobile platforms since the tests on those |
| 142 | # gets additional generated targets which would require many lines here to |
| 143 | # cover (which would be confusing to read and hard to maintain). |
| 144 | if (!is_android && !is_ios) { |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 145 | visibility = [ "../..:webrtc_perf_tests" ] |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 146 | } |
ehmaldonado | 021eef3 | 2017-01-05 07:09:50 -0800 | [diff] [blame] | 147 | sources = [ |
| 148 | "remote_bitrate_estimators_test.cc", |
| 149 | ] |
| 150 | deps = [ |
| 151 | ":bwe_simulator_lib", |
| 152 | ":remote_bitrate_estimator", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 153 | "../../rtc_base:rtc_base_approved", |
ehmaldonado | 90474cc | 2017-03-17 03:47:24 -0700 | [diff] [blame] | 154 | "../../test:test_support", |
ehmaldonado | 021eef3 | 2017-01-05 07:09:50 -0800 | [diff] [blame] | 155 | ] |
| 156 | if (!build_with_chromium && is_clang) { |
| 157 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 158 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 159 | } |
| 160 | } |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 161 | |
| 162 | rtc_source_set("remote_bitrate_estimator_unittests") { |
| 163 | testonly = true |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 164 | |
| 165 | # Skip restricting visibility on mobile platforms since the tests on those |
| 166 | # gets additional generated targets which would require many lines here to |
| 167 | # cover (which would be confusing to read and hard to maintain). |
| 168 | if (!is_android && !is_ios) { |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 169 | visibility = [ "..:modules_unittests" ] |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 170 | } |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 171 | sources = [ |
| 172 | "aimd_rate_control_unittest.cc", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 173 | "inter_arrival_unittest.cc", |
| 174 | "overuse_detector_unittest.cc", |
| 175 | "remote_bitrate_estimator_abs_send_time_unittest.cc", |
| 176 | "remote_bitrate_estimator_single_stream_unittest.cc", |
| 177 | "remote_bitrate_estimator_unittest_helper.cc", |
| 178 | "remote_bitrate_estimator_unittest_helper.h", |
| 179 | "remote_estimator_proxy_unittest.cc", |
| 180 | "send_time_history_unittest.cc", |
| 181 | "test/bwe_test_framework_unittest.cc", |
| 182 | "test/bwe_unittest.cc", |
gnish | 157cbbd | 2017-07-18 02:50:22 -0700 | [diff] [blame] | 183 | "test/estimators/congestion_window_unittest.cc", |
| 184 | "test/estimators/max_bandwidth_filter_unittest.cc", |
| 185 | "test/estimators/min_rtt_filter_unittest.cc", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 186 | "test/estimators/nada_unittest.cc", |
| 187 | "test/metric_recorder_unittest.cc", |
| 188 | ] |
| 189 | deps = [ |
| 190 | ":bwe_simulator_lib", |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 191 | ":mock_remote_bitrate_observer", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 192 | ":remote_bitrate_estimator", |
| 193 | "../..:webrtc_common", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 194 | "../../rtc_base:rtc_base", |
| 195 | "../../rtc_base:rtc_base_approved", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 196 | "../../system_wrappers:system_wrappers", |
| 197 | "../../test:field_trial", |
| 198 | "../../test:test_support", |
| 199 | "../pacing:pacing", |
| 200 | "../rtp_rtcp:rtp_rtcp", |
| 201 | "//testing/gmock", |
| 202 | ] |
| 203 | if (is_win) { |
| 204 | cflags = [ |
| 205 | # TODO(kjellander): bugs.webrtc.org/261: Fix this warning. |
| 206 | "/wd4373", # virtual function override. |
| 207 | ] |
| 208 | } |
| 209 | if (!build_with_chromium && is_clang) { |
| 210 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 211 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 212 | } |
| 213 | } |
ehmaldonado | 9cbb0a1 | 2017-01-30 03:07:03 -0800 | [diff] [blame] | 214 | |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 215 | rtc_source_set("mock_remote_bitrate_observer") { |
| 216 | testonly = true |
| 217 | sources = [ |
| 218 | "include/mock/mock_remote_bitrate_observer.h", |
| 219 | ] |
| 220 | deps = [ |
| 221 | ":remote_bitrate_estimator", |
| 222 | "../../test:test_support", |
| 223 | ] |
| 224 | } |
| 225 | |
ehmaldonado | 9cbb0a1 | 2017-01-30 03:07:03 -0800 | [diff] [blame] | 226 | rtc_test("bwe_simulations_tests") { |
| 227 | testonly = true |
| 228 | |
| 229 | sources = [ |
| 230 | "bwe_simulations.cc", |
| 231 | ] |
| 232 | deps = [ |
| 233 | ":bwe_simulator_lib", |
| 234 | ":remote_bitrate_estimator", |
| 235 | "../..:webrtc_common", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 236 | "../../rtc_base:rtc_base_approved", |
ehmaldonado | 9cbb0a1 | 2017-01-30 03:07:03 -0800 | [diff] [blame] | 237 | "../../test:test_main", |
ehmaldonado | 9cbb0a1 | 2017-01-30 03:07:03 -0800 | [diff] [blame] | 238 | "//testing/gmock", |
| 239 | "//testing/gtest", |
| 240 | "//third_party/gflags", |
| 241 | ] |
| 242 | |
| 243 | if (!build_with_chromium && is_clang) { |
| 244 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 245 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 246 | } |
| 247 | |
| 248 | if (is_win) { |
| 249 | cflags = [ |
| 250 | # TODO(kjellander): bugs.webrtc.org/261: Fix this warning. |
| 251 | "/wd4373", # virtual function override. |
| 252 | ] |
| 253 | } |
| 254 | } |
kjellander | fb11424 | 2016-06-13 00:19:48 -0700 | [diff] [blame] | 255 | } |