blob: 20977b261995b71247562124f2e1e287b585bacc [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001# 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")
kjellanderfb114242016-06-13 00:19:48 -070010
kjellanderb62dbbe2016-09-23 00:38:52 -070011rtc_static_library("remote_bitrate_estimator") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000012 visibility = [ "*" ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000013 sources = [
pbos@webrtc.org9f79fe62014-12-04 15:34:06 +000014 "aimd_rate_control.cc",
15 "aimd_rate_control.h",
stefan64636dd2016-08-03 00:29:03 -070016 "bwe_defines.cc",
kjellander5c1d0432016-06-09 02:40:58 -070017 "include/bwe_defines.h",
18 "include/remote_bitrate_estimator.h",
pbos@webrtc.org9f79fe62014-12-04 15:34:06 +000019 "inter_arrival.cc",
20 "inter_arrival.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000021 "overuse_detector.cc",
22 "overuse_detector.h",
pbos@webrtc.org9f79fe62014-12-04 15:34:06 +000023 "overuse_estimator.cc",
24 "overuse_estimator.h",
25 "remote_bitrate_estimator_abs_send_time.cc",
kjellander5c1d0432016-06-09 02:40:58 -070026 "remote_bitrate_estimator_abs_send_time.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000027 "remote_bitrate_estimator_single_stream.cc",
kjellander5c1d0432016-06-09 02:40:58 -070028 "remote_bitrate_estimator_single_stream.h",
Erik Språng6b8d3552015-09-24 15:06:57 +020029 "remote_estimator_proxy.cc",
30 "remote_estimator_proxy.h",
kjellander5c1d0432016-06-09 02:40:58 -070031 "test/bwe_test_logging.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000032 ]
kjellander@webrtc.org9bef5512014-07-13 09:02:54 +000033
gaetano.carlucci61050f62016-09-30 06:29:54 -070034 if (rtc_enable_bwe_test_logging) {
35 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
Mirko Bonadei7255fef2018-09-11 10:49:41 +020036
gaetano.carlucci61050f62016-09-30 06:29:54 -070037 sources += [ "test/bwe_test_logging.cc" ]
38 } else {
39 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
brucedawson07df20b2016-05-22 17:15:02 -070040 }
41
kjellander5c1d0432016-06-09 02:40:58 -070042 deps = [
43 "../..:webrtc_common",
Ying Wang0810a7c2019-04-10 13:48:24 +020044 "../../api:network_state_predictor_api",
Niels Mölleref1052a2019-03-20 08:40:23 +010045 "../../api:rtp_headers",
Per Kjellander494947b2019-04-16 14:50:08 +020046 "../../api/transport:field_trial_based_config",
Sebastian Janssondf88cc02019-04-15 15:42:25 +020047 "../../api/transport:network_control",
Per Kjellander494947b2019-04-16 14:50:08 +020048 "../../api/transport:webrtc_key_value_config",
Sebastian Jansson7c1744d2018-10-08 11:00:50 +020049 "../../api/units:data_rate",
Sebastian Jansson5f009952018-11-19 18:02:20 +010050 "../../api/units:timestamp",
Danil Chapovalov599df852017-09-25 15:19:35 +020051 "../../modules:module_api",
Yves Gerey988cc082018-10-23 12:03:01 +020052 "../../modules:module_api_public",
Sebastian Jansson051251f2018-11-29 18:36:42 +010053 "../../modules/congestion_controller/goog_cc:link_capacity_estimator",
Danil Chapovalov599df852017-09-25 15:19:35 +020054 "../../modules/rtp_rtcp:rtp_rtcp_format",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010055 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -070056 "../../rtc_base:rtc_base_approved",
Johannes Kron3c15f462019-04-02 15:54:22 +020057 "../../rtc_base:rtc_numerics",
Karl Wiberg12edf4c2018-03-07 14:18:56 +010058 "../../rtc_base:safe_minmax",
Christoffer Rodbroed2207a2019-03-27 16:18:39 +010059 "../../rtc_base/experiments:field_trial_parser",
kjellander5c1d0432016-06-09 02:40:58 -070060 "../../system_wrappers",
Mirko Bonadei17f48782018-09-28 08:51:10 +020061 "../../system_wrappers:field_trial",
62 "../../system_wrappers:metrics",
Danil Chapovalov0040b662018-06-18 10:48:16 +020063 "//third_party/abseil-cpp/absl/types:optional",
kjellander5c1d0432016-06-09 02:40:58 -070064 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000065}
kjellanderfb114242016-06-13 00:19:48 -070066
mbonadei2877eaf2017-09-05 03:01:45 -070067if (!build_with_chromium) {
68 rtc_source_set("bwe_rtp") {
69 testonly = true
70 sources = [
71 "tools/bwe_rtp.cc",
72 "tools/bwe_rtp.h",
73 ]
74 deps = [
75 ":remote_bitrate_estimator",
76 "../../rtc_base:rtc_base_approved",
77 "../../test:rtp_test_utils",
Mirko Bonadeib5728d92017-12-06 07:51:33 +010078 "../rtp_rtcp",
mbonadei2877eaf2017-09-05 03:01:45 -070079 ]
mbonadei2877eaf2017-09-05 03:01:45 -070080 }
81}
82
kjellanderfb114242016-06-13 00:19:48 -070083if (rtc_include_tests) {
terelius3dcfd642016-10-07 00:39:56 -070084 rtc_static_library("bwe_simulator_lib") {
kjellanderfb114242016-06-13 00:19:48 -070085 testonly = true
86 sources = [
gnisha36165c2017-08-20 09:19:58 -070087 "test/bbr_paced_sender.cc",
88 "test/bbr_paced_sender.h",
kjellanderfb114242016-06-13 00:19:48 -070089 "test/bwe.cc",
90 "test/bwe.h",
91 "test/bwe_test.cc",
92 "test/bwe_test.h",
93 "test/bwe_test_baselinefile.cc",
94 "test/bwe_test_baselinefile.h",
95 "test/bwe_test_fileutils.cc",
96 "test/bwe_test_fileutils.h",
97 "test/bwe_test_framework.cc",
98 "test/bwe_test_framework.h",
99 "test/bwe_test_logging.h",
gnish6dcdf102017-06-05 06:01:26 -0700100 "test/estimators/bbr.cc",
101 "test/estimators/bbr.h",
gnish157cbbd2017-07-18 02:50:22 -0700102 "test/estimators/congestion_window.cc",
gnish6dcdf102017-06-05 06:01:26 -0700103 "test/estimators/congestion_window.h",
gnish191113a2017-07-05 05:00:46 -0700104 "test/estimators/max_bandwidth_filter.cc",
gnish6dcdf102017-06-05 06:01:26 -0700105 "test/estimators/max_bandwidth_filter.h",
Mirko Bonadei64f813e2018-07-18 15:37:01 +0200106 "test/estimators/min_rtt_filter.cc",
gnish6dcdf102017-06-05 06:01:26 -0700107 "test/estimators/min_rtt_filter.h",
kjellanderfb114242016-06-13 00:19:48 -0700108 "test/estimators/nada.cc",
109 "test/estimators/nada.h",
110 "test/estimators/remb.cc",
111 "test/estimators/remb.h",
112 "test/estimators/send_side.cc",
113 "test/estimators/send_side.h",
114 "test/estimators/tcp.cc",
115 "test/estimators/tcp.h",
116 "test/metric_recorder.cc",
117 "test/metric_recorder.h",
Mirko Bonadei64f813e2018-07-18 15:37:01 +0200118 "test/packet.cc",
kjellanderfb114242016-06-13 00:19:48 -0700119 "test/packet.h",
120 "test/packet_receiver.cc",
121 "test/packet_receiver.h",
122 "test/packet_sender.cc",
123 "test/packet_sender.h",
124 ]
125
126 if (rtc_enable_bwe_test_logging) {
127 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
kjellanderfb114242016-06-13 00:19:48 -0700128 } else {
129 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
130 }
131
kjellanderfb114242016-06-13 00:19:48 -0700132 deps = [
mbonadei49f465f2016-12-28 04:43:46 -0800133 ":remote_bitrate_estimator",
mbonadei1140f972017-04-26 03:38:35 -0700134 "..:module_api",
Yves Gerey3e707812018-11-28 16:47:49 +0100135 "..:module_api_public",
mbonadei49f465f2016-12-28 04:43:46 -0800136 "../..:webrtc_common",
Niels Mölleref1052a2019-03-20 08:40:23 +0100137 "../../api:rtp_headers",
Sebastian Jansson95edb032019-01-17 16:24:12 +0100138 "../../api/transport:field_trial_based_config",
Yves Gerey3e707812018-11-28 16:47:49 +0100139 "../../api/transport:network_control",
Patrik Höglund731082c2018-01-03 09:08:20 +0100140 "../../logging:mocks",
Artem Titov94b57c02019-03-21 13:35:10 +0100141 "../../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100142 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700143 "../../rtc_base:gtest_prod",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700144 "../../rtc_base:rtc_base_approved",
Bjorn Tereliusa194e582017-10-25 13:07:09 +0200145 "../../rtc_base:rtc_numerics",
Karl Wiberg12edf4c2018-03-07 14:18:56 +0100146 "../../rtc_base:safe_minmax",
Sebastian Janssoncabe3832018-01-12 10:54:18 +0100147 "../../rtc_base/experiments:alr_experiment",
Karl Wiberg80ba3332018-02-05 10:33:35 +0100148 "../../rtc_base/system:fallthrough",
Niels Möllera12c42a2018-07-25 16:05:48 +0200149 "../../rtc_base/system:unused",
mbonadei49f465f2016-12-28 04:43:46 -0800150 "../../system_wrappers",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200151 "../../system_wrappers:field_trial",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100152 "../../test:fileutils",
Edward Lemure66572b2018-01-05 15:34:09 +0100153 "../../test:perf_test",
kjellanderfb114242016-06-13 00:19:48 -0700154 "../../test:test_support",
mbonadei49f465f2016-12-28 04:43:46 -0800155 "../bitrate_controller",
terelius95310922016-11-03 08:14:07 -0700156 "../congestion_controller",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +0100157 "../congestion_controller:transport_feedback",
Sebastian Jansson04b18cb2018-07-02 09:25:25 +0200158 "../congestion_controller/goog_cc:delay_based_bwe",
Sebastian Jansson172fd852018-05-24 14:17:06 +0200159 "../congestion_controller/goog_cc:estimators",
160 "../congestion_controller/rtp:transport_feedback",
kjellanderfb114242016-06-13 00:19:48 -0700161 "../pacing",
mbonadei49f465f2016-12-28 04:43:46 -0800162 "../rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100163 "../rtp_rtcp:rtp_rtcp_format",
charujaincb728ea2017-09-18 03:08:08 -0700164 "../video_coding:video_coding_utility",
kjellanderfb114242016-06-13 00:19:48 -0700165 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200166 "//third_party/abseil-cpp/absl/memory",
Danil Chapovalov0040b662018-06-18 10:48:16 +0200167 "//third_party/abseil-cpp/absl/types:optional",
kjellanderfb114242016-06-13 00:19:48 -0700168 ]
169 }
ehmaldonado021eef32017-01-05 07:09:50 -0800170
171 rtc_source_set("remote_bitrate_estimator_perf_tests") {
172 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700173
ehmaldonado021eef32017-01-05 07:09:50 -0800174 sources = [
175 "remote_bitrate_estimators_test.cc",
176 ]
177 deps = [
178 ":bwe_simulator_lib",
179 ":remote_bitrate_estimator",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700180 "../../rtc_base:rtc_base_approved",
Artem Titov94b57c02019-03-21 13:35:10 +0100181 "../../system_wrappers",
Stefan Holmerea00e482017-10-06 08:43:34 +0200182 "../../test:field_trial",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100183 "../../test:fileutils",
ehmaldonado90474cc2017-03-17 03:47:24 -0700184 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800185 ]
ehmaldonado021eef32017-01-05 07:09:50 -0800186 }
ehmaldonado36268652017-01-19 08:27:11 -0800187
188 rtc_source_set("remote_bitrate_estimator_unittests") {
189 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700190
ehmaldonado36268652017-01-19 08:27:11 -0800191 sources = [
192 "aimd_rate_control_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800193 "inter_arrival_unittest.cc",
194 "overuse_detector_unittest.cc",
195 "remote_bitrate_estimator_abs_send_time_unittest.cc",
196 "remote_bitrate_estimator_single_stream_unittest.cc",
197 "remote_bitrate_estimator_unittest_helper.cc",
198 "remote_bitrate_estimator_unittest_helper.h",
199 "remote_estimator_proxy_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800200 "test/bwe_test_framework_unittest.cc",
201 "test/bwe_unittest.cc",
gnish157cbbd2017-07-18 02:50:22 -0700202 "test/estimators/congestion_window_unittest.cc",
203 "test/estimators/max_bandwidth_filter_unittest.cc",
204 "test/estimators/min_rtt_filter_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800205 "test/estimators/nada_unittest.cc",
206 "test/metric_recorder_unittest.cc",
207 ]
208 deps = [
209 ":bwe_simulator_lib",
210 ":remote_bitrate_estimator",
Yves Gerey3e707812018-11-28 16:47:49 +0100211 "..:module_api_public",
ehmaldonado36268652017-01-19 08:27:11 -0800212 "../..:webrtc_common",
Per Kjellander494947b2019-04-16 14:50:08 +0200213 "../../api/transport:field_trial_based_config",
Artem Titov94b57c02019-03-21 13:35:10 +0100214 "../../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100215 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700216 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100217 "../../system_wrappers",
ehmaldonado36268652017-01-19 08:27:11 -0800218 "../../test:field_trial",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100219 "../../test:fileutils",
ehmaldonado36268652017-01-19 08:27:11 -0800220 "../../test:test_support",
Artem Titov94b57c02019-03-21 13:35:10 +0100221 "../pacing",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100222 "../rtp_rtcp:rtp_rtcp_format",
ehmaldonado36268652017-01-19 08:27:11 -0800223 ]
ehmaldonado36268652017-01-19 08:27:11 -0800224 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800225
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",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700236 "../../rtc_base:rtc_base_approved",
Artem Titov94b57c02019-03-21 13:35:10 +0100237 "../../system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100238 "../../test:fileutils",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800239 "../../test:test_main",
Yves Gerey21cddff2018-10-30 21:12:42 +0100240 "../../test:test_support",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800241 "//testing/gtest",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800242 ]
Edward Lemur09d90142017-10-11 20:47:48 +0200243 data = [
244 "//resources/sprint-uplink.rx",
245 "//resources/verizon4g-downlink.rx",
246 "//resources/google-wifi-3mbps.rx",
247 ]
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800248 }
kjellanderfb114242016-06-13 00:19:48 -0700249}