blob: fe9833c78952eff323199b5249087efcd2aec7b3 [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",
sprang318673c2015-09-04 04:43:21 -070019 "include/send_time_history.h",
pbos@webrtc.org9f79fe62014-12-04 15:34:06 +000020 "inter_arrival.cc",
21 "inter_arrival.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000022 "overuse_detector.cc",
23 "overuse_detector.h",
pbos@webrtc.org9f79fe62014-12-04 15:34:06 +000024 "overuse_estimator.cc",
25 "overuse_estimator.h",
26 "remote_bitrate_estimator_abs_send_time.cc",
kjellander5c1d0432016-06-09 02:40:58 -070027 "remote_bitrate_estimator_abs_send_time.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000028 "remote_bitrate_estimator_single_stream.cc",
kjellander5c1d0432016-06-09 02:40:58 -070029 "remote_bitrate_estimator_single_stream.h",
Erik Språng6b8d3552015-09-24 15:06:57 +020030 "remote_estimator_proxy.cc",
31 "remote_estimator_proxy.h",
sprang318673c2015-09-04 04:43:21 -070032 "send_time_history.cc",
kjellander5c1d0432016-06-09 02:40:58 -070033 "test/bwe_test_logging.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000034 ]
kjellander@webrtc.org9bef5512014-07-13 09:02:54 +000035
gaetano.carlucci61050f62016-09-30 06:29:54 -070036 if (rtc_enable_bwe_test_logging) {
37 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
38 sources += [ "test/bwe_test_logging.cc" ]
39 } else {
40 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
brucedawson07df20b2016-05-22 17:15:02 -070041 }
42
kjellandere40a7ee2016-10-16 23:56:12 -070043 if (!build_with_chromium && is_clang) {
44 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070045 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000046 }
kjellander5c1d0432016-06-09 02:40:58 -070047
48 deps = [
49 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +010050 "../../:typedefs",
Danil Chapovalov599df852017-09-25 15:19:35 +020051 "../../api:optional",
52 "../../modules:module_api",
53 "../../modules/rtp_rtcp:rtp_rtcp_format",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010054 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -070055 "../../rtc_base:rtc_base_approved",
kjellander5c1d0432016-06-09 02:40:58 -070056 "../../system_wrappers",
Mirko Bonadeia498ae82017-12-06 09:17:14 +010057 "../../system_wrappers:field_trial_api",
58 "../../system_wrappers:metrics_api",
kjellander5c1d0432016-06-09 02:40:58 -070059 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000060}
kjellanderfb114242016-06-13 00:19:48 -070061
mbonadei2877eaf2017-09-05 03:01:45 -070062if (!build_with_chromium) {
63 rtc_source_set("bwe_rtp") {
64 testonly = true
65 sources = [
66 "tools/bwe_rtp.cc",
67 "tools/bwe_rtp.h",
68 ]
69 deps = [
70 ":remote_bitrate_estimator",
71 "../../rtc_base:rtc_base_approved",
72 "../../test:rtp_test_utils",
Mirko Bonadeib5728d92017-12-06 07:51:33 +010073 "../rtp_rtcp",
mbonadei2877eaf2017-09-05 03:01:45 -070074 ]
75 if (is_clang) {
76 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
77 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
78 }
79 }
80}
81
kjellanderfb114242016-06-13 00:19:48 -070082if (rtc_include_tests) {
terelius3dcfd642016-10-07 00:39:56 -070083 rtc_static_library("bwe_simulator_lib") {
kjellanderfb114242016-06-13 00:19:48 -070084 testonly = true
85 sources = [
gnisha36165c2017-08-20 09:19:58 -070086 "test/bbr_paced_sender.cc",
87 "test/bbr_paced_sender.h",
kjellanderfb114242016-06-13 00:19:48 -070088 "test/bwe.cc",
89 "test/bwe.h",
90 "test/bwe_test.cc",
91 "test/bwe_test.h",
92 "test/bwe_test_baselinefile.cc",
93 "test/bwe_test_baselinefile.h",
94 "test/bwe_test_fileutils.cc",
95 "test/bwe_test_fileutils.h",
96 "test/bwe_test_framework.cc",
97 "test/bwe_test_framework.h",
98 "test/bwe_test_logging.h",
gnish6dcdf102017-06-05 06:01:26 -070099 "test/estimators/bbr.cc",
100 "test/estimators/bbr.h",
gnish157cbbd2017-07-18 02:50:22 -0700101 "test/estimators/congestion_window.cc",
gnish6dcdf102017-06-05 06:01:26 -0700102 "test/estimators/congestion_window.h",
gnish191113a2017-07-05 05:00:46 -0700103 "test/estimators/max_bandwidth_filter.cc",
gnish6dcdf102017-06-05 06:01:26 -0700104 "test/estimators/max_bandwidth_filter.h",
105 "test/estimators/min_rtt_filter.h",
kjellanderfb114242016-06-13 00:19:48 -0700106 "test/estimators/nada.cc",
107 "test/estimators/nada.h",
108 "test/estimators/remb.cc",
109 "test/estimators/remb.h",
110 "test/estimators/send_side.cc",
111 "test/estimators/send_side.h",
112 "test/estimators/tcp.cc",
113 "test/estimators/tcp.h",
114 "test/metric_recorder.cc",
115 "test/metric_recorder.h",
116 "test/packet.h",
117 "test/packet_receiver.cc",
118 "test/packet_receiver.h",
119 "test/packet_sender.cc",
120 "test/packet_sender.h",
121 ]
122
123 if (rtc_enable_bwe_test_logging) {
124 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
kjellanderfb114242016-06-13 00:19:48 -0700125 } else {
126 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
127 }
128
kjellandere40a7ee2016-10-16 23:56:12 -0700129 if (!build_with_chromium && is_clang) {
130 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700131 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -0700132 }
133
kjellanderfb114242016-06-13 00:19:48 -0700134 deps = [
mbonadei49f465f2016-12-28 04:43:46 -0800135 ":remote_bitrate_estimator",
mbonadei1140f972017-04-26 03:38:35 -0700136 "..:module_api",
mbonadei49f465f2016-12-28 04:43:46 -0800137 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100138 "../../:typedefs",
kwiberg84f6a3f2017-09-05 08:43:13 -0700139 "../../api:optional",
Patrik Höglund731082c2018-01-03 09:08:20 +0100140 "../../logging:mocks",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100141 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700142 "../../rtc_base:gtest_prod",
143 "../../rtc_base:rtc_base",
144 "../../rtc_base:rtc_base_approved",
Bjorn Tereliusa194e582017-10-25 13:07:09 +0200145 "../../rtc_base:rtc_numerics",
Sebastian Janssoncabe3832018-01-12 10:54:18 +0100146 "../../rtc_base/experiments:alr_experiment",
mbonadei49f465f2016-12-28 04:43:46 -0800147 "../../system_wrappers",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100148 "../../system_wrappers:field_trial_api",
Edward Lemure66572b2018-01-05 15:34:09 +0100149 "../../test:perf_test",
kjellanderfb114242016-06-13 00:19:48 -0700150 "../../test:test_support",
mbonadei49f465f2016-12-28 04:43:46 -0800151 "../bitrate_controller",
terelius95310922016-11-03 08:14:07 -0700152 "../congestion_controller",
Patrik Höglund76134542018-01-02 09:15:05 +0100153 "../congestion_controller:delay_based_bwe",
154 "../congestion_controller:estimators",
kjellanderfb114242016-06-13 00:19:48 -0700155 "../pacing",
mbonadei49f465f2016-12-28 04:43:46 -0800156 "../rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100157 "../rtp_rtcp:rtp_rtcp_format",
charujaincb728ea2017-09-18 03:08:08 -0700158 "../video_coding:video_coding_utility",
kjellanderfb114242016-06-13 00:19:48 -0700159 "//testing/gtest",
160 ]
161 }
ehmaldonado021eef32017-01-05 07:09:50 -0800162
163 rtc_source_set("remote_bitrate_estimator_perf_tests") {
164 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700165
ehmaldonado021eef32017-01-05 07:09:50 -0800166 sources = [
167 "remote_bitrate_estimators_test.cc",
168 ]
169 deps = [
170 ":bwe_simulator_lib",
171 ":remote_bitrate_estimator",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700172 "../../rtc_base:rtc_base_approved",
Stefan Holmerea00e482017-10-06 08:43:34 +0200173 "../../test:field_trial",
ehmaldonado90474cc2017-03-17 03:47:24 -0700174 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800175 ]
176 if (!build_with_chromium && is_clang) {
177 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
178 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
179 }
180 }
ehmaldonado36268652017-01-19 08:27:11 -0800181
182 rtc_source_set("remote_bitrate_estimator_unittests") {
183 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700184
ehmaldonado36268652017-01-19 08:27:11 -0800185 sources = [
186 "aimd_rate_control_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800187 "inter_arrival_unittest.cc",
188 "overuse_detector_unittest.cc",
189 "remote_bitrate_estimator_abs_send_time_unittest.cc",
190 "remote_bitrate_estimator_single_stream_unittest.cc",
191 "remote_bitrate_estimator_unittest_helper.cc",
192 "remote_bitrate_estimator_unittest_helper.h",
193 "remote_estimator_proxy_unittest.cc",
194 "send_time_history_unittest.cc",
195 "test/bwe_test_framework_unittest.cc",
196 "test/bwe_unittest.cc",
gnish157cbbd2017-07-18 02:50:22 -0700197 "test/estimators/congestion_window_unittest.cc",
198 "test/estimators/max_bandwidth_filter_unittest.cc",
199 "test/estimators/min_rtt_filter_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800200 "test/estimators/nada_unittest.cc",
201 "test/metric_recorder_unittest.cc",
202 ]
203 deps = [
204 ":bwe_simulator_lib",
205 ":remote_bitrate_estimator",
206 "../..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100207 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700208 "../../rtc_base:rtc_base",
209 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100210 "../../system_wrappers",
ehmaldonado36268652017-01-19 08:27:11 -0800211 "../../test:field_trial",
212 "../../test:test_support",
213 "../pacing:pacing",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100214 "../rtp_rtcp:rtp_rtcp_format",
ehmaldonado36268652017-01-19 08:27:11 -0800215 ]
216 if (is_win) {
217 cflags = [
218 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
219 "/wd4373", # virtual function override.
220 ]
221 }
222 if (!build_with_chromium && is_clang) {
223 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
224 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
225 }
226 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800227
228 rtc_test("bwe_simulations_tests") {
229 testonly = true
230
231 sources = [
232 "bwe_simulations.cc",
233 ]
234 deps = [
235 ":bwe_simulator_lib",
236 ":remote_bitrate_estimator",
237 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700238 "../../rtc_base:rtc_base_approved",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800239 "../../test:test_main",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800240 "//testing/gtest",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800241 ]
Edward Lemur09d90142017-10-11 20:47:48 +0200242 data = [
243 "//resources/sprint-uplink.rx",
244 "//resources/verizon4g-downlink.rx",
245 "//resources/google-wifi-3mbps.rx",
246 ]
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800247
248 if (!build_with_chromium && is_clang) {
249 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
250 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
251 }
252
253 if (is_win) {
254 cflags = [
255 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
256 "/wd4373", # virtual function override.
257 ]
258 }
259 }
kjellanderfb114242016-06-13 00:19:48 -0700260}