blob: 12612032bff1bd532564209784b80f80cb6d29b9 [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" ]
36 sources += [ "test/bwe_test_logging.cc" ]
37 } else {
38 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
brucedawson07df20b2016-05-22 17:15:02 -070039 }
40
kjellander5c1d0432016-06-09 02:40:58 -070041 deps = [
42 "../..:webrtc_common",
Danil Chapovalov599df852017-09-25 15:19:35 +020043 "../../modules:module_api",
44 "../../modules/rtp_rtcp:rtp_rtcp_format",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010045 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -070046 "../../rtc_base:rtc_base_approved",
Karl Wiberg12edf4c2018-03-07 14:18:56 +010047 "../../rtc_base:safe_minmax",
kjellander5c1d0432016-06-09 02:40:58 -070048 "../../system_wrappers",
Mirko Bonadeia498ae82017-12-06 09:17:14 +010049 "../../system_wrappers:field_trial_api",
50 "../../system_wrappers:metrics_api",
Danil Chapovalov0040b662018-06-18 10:48:16 +020051 "//third_party/abseil-cpp/absl/types:optional",
kjellander5c1d0432016-06-09 02:40:58 -070052 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000053}
kjellanderfb114242016-06-13 00:19:48 -070054
mbonadei2877eaf2017-09-05 03:01:45 -070055if (!build_with_chromium) {
56 rtc_source_set("bwe_rtp") {
57 testonly = true
58 sources = [
59 "tools/bwe_rtp.cc",
60 "tools/bwe_rtp.h",
61 ]
62 deps = [
63 ":remote_bitrate_estimator",
64 "../../rtc_base:rtc_base_approved",
65 "../../test:rtp_test_utils",
Mirko Bonadeib5728d92017-12-06 07:51:33 +010066 "../rtp_rtcp",
mbonadei2877eaf2017-09-05 03:01:45 -070067 ]
mbonadei2877eaf2017-09-05 03:01:45 -070068 }
69}
70
kjellanderfb114242016-06-13 00:19:48 -070071if (rtc_include_tests) {
terelius3dcfd642016-10-07 00:39:56 -070072 rtc_static_library("bwe_simulator_lib") {
kjellanderfb114242016-06-13 00:19:48 -070073 testonly = true
74 sources = [
gnisha36165c2017-08-20 09:19:58 -070075 "test/bbr_paced_sender.cc",
76 "test/bbr_paced_sender.h",
kjellanderfb114242016-06-13 00:19:48 -070077 "test/bwe.cc",
78 "test/bwe.h",
79 "test/bwe_test.cc",
80 "test/bwe_test.h",
81 "test/bwe_test_baselinefile.cc",
82 "test/bwe_test_baselinefile.h",
83 "test/bwe_test_fileutils.cc",
84 "test/bwe_test_fileutils.h",
85 "test/bwe_test_framework.cc",
86 "test/bwe_test_framework.h",
87 "test/bwe_test_logging.h",
gnish6dcdf102017-06-05 06:01:26 -070088 "test/estimators/bbr.cc",
89 "test/estimators/bbr.h",
gnish157cbbd2017-07-18 02:50:22 -070090 "test/estimators/congestion_window.cc",
gnish6dcdf102017-06-05 06:01:26 -070091 "test/estimators/congestion_window.h",
gnish191113a2017-07-05 05:00:46 -070092 "test/estimators/max_bandwidth_filter.cc",
gnish6dcdf102017-06-05 06:01:26 -070093 "test/estimators/max_bandwidth_filter.h",
Mirko Bonadei64f813e2018-07-18 15:37:01 +020094 "test/estimators/min_rtt_filter.cc",
gnish6dcdf102017-06-05 06:01:26 -070095 "test/estimators/min_rtt_filter.h",
kjellanderfb114242016-06-13 00:19:48 -070096 "test/estimators/nada.cc",
97 "test/estimators/nada.h",
98 "test/estimators/remb.cc",
99 "test/estimators/remb.h",
100 "test/estimators/send_side.cc",
101 "test/estimators/send_side.h",
102 "test/estimators/tcp.cc",
103 "test/estimators/tcp.h",
104 "test/metric_recorder.cc",
105 "test/metric_recorder.h",
Mirko Bonadei64f813e2018-07-18 15:37:01 +0200106 "test/packet.cc",
kjellanderfb114242016-06-13 00:19:48 -0700107 "test/packet.h",
108 "test/packet_receiver.cc",
109 "test/packet_receiver.h",
110 "test/packet_sender.cc",
111 "test/packet_sender.h",
112 ]
113
114 if (rtc_enable_bwe_test_logging) {
115 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
kjellanderfb114242016-06-13 00:19:48 -0700116 } else {
117 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
118 }
119
kjellanderfb114242016-06-13 00:19:48 -0700120 deps = [
mbonadei49f465f2016-12-28 04:43:46 -0800121 ":remote_bitrate_estimator",
mbonadei1140f972017-04-26 03:38:35 -0700122 "..:module_api",
mbonadei49f465f2016-12-28 04:43:46 -0800123 "../..:webrtc_common",
Patrik Höglund731082c2018-01-03 09:08:20 +0100124 "../../logging:mocks",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100125 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700126 "../../rtc_base:gtest_prod",
127 "../../rtc_base:rtc_base",
128 "../../rtc_base:rtc_base_approved",
Bjorn Tereliusa194e582017-10-25 13:07:09 +0200129 "../../rtc_base:rtc_numerics",
Karl Wiberg12edf4c2018-03-07 14:18:56 +0100130 "../../rtc_base:safe_minmax",
Sebastian Janssoncabe3832018-01-12 10:54:18 +0100131 "../../rtc_base/experiments:alr_experiment",
Karl Wiberg80ba3332018-02-05 10:33:35 +0100132 "../../rtc_base/system:fallthrough",
Niels Möllera12c42a2018-07-25 16:05:48 +0200133 "../../rtc_base/system:unused",
mbonadei49f465f2016-12-28 04:43:46 -0800134 "../../system_wrappers",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100135 "../../system_wrappers:field_trial_api",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100136 "../../test:fileutils",
Edward Lemure66572b2018-01-05 15:34:09 +0100137 "../../test:perf_test",
kjellanderfb114242016-06-13 00:19:48 -0700138 "../../test:test_support",
mbonadei49f465f2016-12-28 04:43:46 -0800139 "../bitrate_controller",
terelius95310922016-11-03 08:14:07 -0700140 "../congestion_controller",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +0100141 "../congestion_controller:transport_feedback",
Sebastian Jansson04b18cb2018-07-02 09:25:25 +0200142 "../congestion_controller/goog_cc:delay_based_bwe",
Sebastian Jansson172fd852018-05-24 14:17:06 +0200143 "../congestion_controller/goog_cc:estimators",
144 "../congestion_controller/rtp:transport_feedback",
kjellanderfb114242016-06-13 00:19:48 -0700145 "../pacing",
mbonadei49f465f2016-12-28 04:43:46 -0800146 "../rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100147 "../rtp_rtcp:rtp_rtcp_format",
charujaincb728ea2017-09-18 03:08:08 -0700148 "../video_coding:video_coding_utility",
kjellanderfb114242016-06-13 00:19:48 -0700149 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200150 "//third_party/abseil-cpp/absl/memory",
Danil Chapovalov0040b662018-06-18 10:48:16 +0200151 "//third_party/abseil-cpp/absl/types:optional",
kjellanderfb114242016-06-13 00:19:48 -0700152 ]
153 }
ehmaldonado021eef32017-01-05 07:09:50 -0800154
155 rtc_source_set("remote_bitrate_estimator_perf_tests") {
156 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700157
ehmaldonado021eef32017-01-05 07:09:50 -0800158 sources = [
159 "remote_bitrate_estimators_test.cc",
160 ]
161 deps = [
162 ":bwe_simulator_lib",
163 ":remote_bitrate_estimator",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700164 "../../rtc_base:rtc_base_approved",
Stefan Holmerea00e482017-10-06 08:43:34 +0200165 "../../test:field_trial",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100166 "../../test:fileutils",
ehmaldonado90474cc2017-03-17 03:47:24 -0700167 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800168 ]
169 if (!build_with_chromium && is_clang) {
170 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
171 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
172 }
173 }
ehmaldonado36268652017-01-19 08:27:11 -0800174
175 rtc_source_set("remote_bitrate_estimator_unittests") {
176 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700177
ehmaldonado36268652017-01-19 08:27:11 -0800178 sources = [
179 "aimd_rate_control_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800180 "inter_arrival_unittest.cc",
181 "overuse_detector_unittest.cc",
182 "remote_bitrate_estimator_abs_send_time_unittest.cc",
183 "remote_bitrate_estimator_single_stream_unittest.cc",
184 "remote_bitrate_estimator_unittest_helper.cc",
185 "remote_bitrate_estimator_unittest_helper.h",
186 "remote_estimator_proxy_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800187 "test/bwe_test_framework_unittest.cc",
188 "test/bwe_unittest.cc",
gnish157cbbd2017-07-18 02:50:22 -0700189 "test/estimators/congestion_window_unittest.cc",
190 "test/estimators/max_bandwidth_filter_unittest.cc",
191 "test/estimators/min_rtt_filter_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800192 "test/estimators/nada_unittest.cc",
193 "test/metric_recorder_unittest.cc",
194 ]
195 deps = [
196 ":bwe_simulator_lib",
197 ":remote_bitrate_estimator",
198 "../..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100199 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700200 "../../rtc_base:rtc_base",
201 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100202 "../../system_wrappers",
ehmaldonado36268652017-01-19 08:27:11 -0800203 "../../test:field_trial",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100204 "../../test:fileutils",
ehmaldonado36268652017-01-19 08:27:11 -0800205 "../../test:test_support",
206 "../pacing:pacing",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100207 "../rtp_rtcp:rtp_rtcp_format",
ehmaldonado36268652017-01-19 08:27:11 -0800208 ]
ehmaldonado36268652017-01-19 08:27:11 -0800209 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 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800214
215 rtc_test("bwe_simulations_tests") {
216 testonly = true
217
218 sources = [
219 "bwe_simulations.cc",
220 ]
221 deps = [
222 ":bwe_simulator_lib",
223 ":remote_bitrate_estimator",
224 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700225 "../../rtc_base:rtc_base_approved",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100226 "../../test:fileutils",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800227 "../../test:test_main",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800228 "//testing/gtest",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800229 ]
Edward Lemur09d90142017-10-11 20:47:48 +0200230 data = [
231 "//resources/sprint-uplink.rx",
232 "//resources/verizon4g-downlink.rx",
233 "//resources/google-wifi-3mbps.rx",
234 ]
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800235
236 if (!build_with_chromium && is_clang) {
237 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
238 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
239 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800240 }
kjellanderfb114242016-06-13 00:19:48 -0700241}