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