blob: b9bf792864584c28a2a6655638a9037f15c4e773 [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") {
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000012 sources = [
pbos@webrtc.org9f79fe62014-12-04 15:34:06 +000013 "aimd_rate_control.cc",
14 "aimd_rate_control.h",
stefan64636dd2016-08-03 00:29:03 -070015 "bwe_defines.cc",
kjellander5c1d0432016-06-09 02:40:58 -070016 "include/bwe_defines.h",
17 "include/remote_bitrate_estimator.h",
sprang318673c2015-09-04 04:43:21 -070018 "include/send_time_history.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",
sprang318673c2015-09-04 04:43:21 -070031 "send_time_history.cc",
kjellander5c1d0432016-06-09 02:40:58 -070032 "test/bwe_test_logging.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000033 ]
kjellander@webrtc.org9bef5512014-07-13 09:02:54 +000034
gaetano.carlucci61050f62016-09-30 06:29:54 -070035 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" ]
brucedawson07df20b2016-05-22 17:15:02 -070040 }
41
kjellandere40a7ee2016-10-16 23:56:12 -070042 if (!build_with_chromium && is_clang) {
43 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070044 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000045 }
kjellander5c1d0432016-06-09 02:40:58 -070046
47 deps = [
48 "../..:webrtc_common",
Danil Chapovalov599df852017-09-25 15:19:35 +020049 "../../api:optional",
50 "../../modules:module_api",
51 "../../modules/rtp_rtcp:rtp_rtcp_format",
ehmaldonadof6a861a2017-07-19 10:40:47 -070052 "../../rtc_base:rtc_base_approved",
kjellander5c1d0432016-06-09 02:40:58 -070053 "../../system_wrappers",
54 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000055}
kjellanderfb114242016-06-13 00:19:48 -070056
mbonadei2877eaf2017-09-05 03:01:45 -070057if (!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",
Mirko Bonadeib5728d92017-12-06 07:51:33 +010068 "../rtp_rtcp",
mbonadei2877eaf2017-09-05 03:01:45 -070069 ]
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
kjellanderfb114242016-06-13 00:19:48 -070077if (rtc_include_tests) {
terelius3dcfd642016-10-07 00:39:56 -070078 rtc_static_library("bwe_simulator_lib") {
kjellanderfb114242016-06-13 00:19:48 -070079 testonly = true
80 sources = [
gnisha36165c2017-08-20 09:19:58 -070081 "test/bbr_paced_sender.cc",
82 "test/bbr_paced_sender.h",
kjellanderfb114242016-06-13 00:19:48 -070083 "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",
gnish6dcdf102017-06-05 06:01:26 -070094 "test/estimators/bbr.cc",
95 "test/estimators/bbr.h",
gnish157cbbd2017-07-18 02:50:22 -070096 "test/estimators/congestion_window.cc",
gnish6dcdf102017-06-05 06:01:26 -070097 "test/estimators/congestion_window.h",
gnish191113a2017-07-05 05:00:46 -070098 "test/estimators/max_bandwidth_filter.cc",
gnish6dcdf102017-06-05 06:01:26 -070099 "test/estimators/max_bandwidth_filter.h",
100 "test/estimators/min_rtt_filter.h",
kjellanderfb114242016-06-13 00:19:48 -0700101 "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" ]
kjellanderfb114242016-06-13 00:19:48 -0700120 } else {
121 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
122 }
123
kjellandere40a7ee2016-10-16 23:56:12 -0700124 if (!build_with_chromium && is_clang) {
125 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700126 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -0700127 }
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 = [
mbonadei49f465f2016-12-28 04:43:46 -0800137 ":remote_bitrate_estimator",
mbonadei1140f972017-04-26 03:38:35 -0700138 "..:module_api",
mbonadei49f465f2016-12-28 04:43:46 -0800139 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -0700140 "../../api:optional",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700141 "../../rtc_base:gtest_prod",
142 "../../rtc_base:rtc_base",
143 "../../rtc_base:rtc_base_approved",
Bjorn Tereliusa194e582017-10-25 13:07:09 +0200144 "../../rtc_base:rtc_numerics",
mbonadei49f465f2016-12-28 04:43:46 -0800145 "../../system_wrappers",
kjellanderfb114242016-06-13 00:19:48 -0700146 "../../test:test_support",
mbonadei49f465f2016-12-28 04:43:46 -0800147 "../../voice_engine",
148 "../bitrate_controller",
terelius95310922016-11-03 08:14:07 -0700149 "../congestion_controller",
kjellanderfb114242016-06-13 00:19:48 -0700150 "../pacing",
mbonadei49f465f2016-12-28 04:43:46 -0800151 "../rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100152 "../rtp_rtcp:rtp_rtcp_format",
charujaincb728ea2017-09-18 03:08:08 -0700153 "../video_coding:video_coding_utility",
kjellanderfb114242016-06-13 00:19:48 -0700154 "//testing/gmock",
155 "//testing/gtest",
156 ]
157 }
ehmaldonado021eef32017-01-05 07:09:50 -0800158
159 rtc_source_set("remote_bitrate_estimator_perf_tests") {
160 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700161
ehmaldonado021eef32017-01-05 07:09:50 -0800162 sources = [
163 "remote_bitrate_estimators_test.cc",
164 ]
165 deps = [
166 ":bwe_simulator_lib",
167 ":remote_bitrate_estimator",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700168 "../../rtc_base:rtc_base_approved",
Stefan Holmerea00e482017-10-06 08:43:34 +0200169 "../../test:field_trial",
ehmaldonado90474cc2017-03-17 03:47:24 -0700170 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800171 ]
172 if (!build_with_chromium && is_clang) {
173 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
174 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
175 }
176 }
ehmaldonado36268652017-01-19 08:27:11 -0800177
178 rtc_source_set("remote_bitrate_estimator_unittests") {
179 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700180
ehmaldonado36268652017-01-19 08:27:11 -0800181 sources = [
182 "aimd_rate_control_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800183 "inter_arrival_unittest.cc",
184 "overuse_detector_unittest.cc",
185 "remote_bitrate_estimator_abs_send_time_unittest.cc",
186 "remote_bitrate_estimator_single_stream_unittest.cc",
187 "remote_bitrate_estimator_unittest_helper.cc",
188 "remote_bitrate_estimator_unittest_helper.h",
189 "remote_estimator_proxy_unittest.cc",
190 "send_time_history_unittest.cc",
191 "test/bwe_test_framework_unittest.cc",
192 "test/bwe_unittest.cc",
gnish157cbbd2017-07-18 02:50:22 -0700193 "test/estimators/congestion_window_unittest.cc",
194 "test/estimators/max_bandwidth_filter_unittest.cc",
195 "test/estimators/min_rtt_filter_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800196 "test/estimators/nada_unittest.cc",
197 "test/metric_recorder_unittest.cc",
198 ]
199 deps = [
200 ":bwe_simulator_lib",
201 ":remote_bitrate_estimator",
202 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700203 "../../rtc_base:rtc_base",
204 "../../rtc_base:rtc_base_approved",
ehmaldonado36268652017-01-19 08:27:11 -0800205 "../../system_wrappers:system_wrappers",
206 "../../test:field_trial",
207 "../../test:test_support",
208 "../pacing:pacing",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100209 "../rtp_rtcp:rtp_rtcp_format",
ehmaldonado36268652017-01-19 08:27:11 -0800210 "//testing/gmock",
211 ]
212 if (is_win) {
213 cflags = [
214 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
215 "/wd4373", # virtual function override.
216 ]
217 }
218 if (!build_with_chromium && is_clang) {
219 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
220 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
221 }
222 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800223
224 rtc_test("bwe_simulations_tests") {
225 testonly = true
226
227 sources = [
228 "bwe_simulations.cc",
229 ]
230 deps = [
231 ":bwe_simulator_lib",
232 ":remote_bitrate_estimator",
233 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700234 "../../rtc_base:rtc_base_approved",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800235 "../../test:test_main",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800236 "//testing/gmock",
237 "//testing/gtest",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800238 ]
Edward Lemur09d90142017-10-11 20:47:48 +0200239 data = [
240 "//resources/sprint-uplink.rx",
241 "//resources/verizon4g-downlink.rx",
242 "//resources/google-wifi-3mbps.rx",
243 ]
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800244
245 if (!build_with_chromium && is_clang) {
246 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
247 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
248 }
249
250 if (is_win) {
251 cflags = [
252 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
253 "/wd4373", # virtual function override.
254 ]
255 }
256 }
kjellanderfb114242016-06-13 00:19:48 -0700257}