blob: 8a48077a7875c35975a26c94a39529829dd37aea [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") {
mbonadei49f465f2016-12-28 04:43:46 -080012 # TODO(mbonadei): Remove (bugs.webrtc.org/6828)
13 # Errors on cyclic dependency with:
14 # rtp_rtcp:rtp_rtcp if enabled.
15 check_includes = false
16
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000017 sources = [
pbos@webrtc.org9f79fe62014-12-04 15:34:06 +000018 "aimd_rate_control.cc",
19 "aimd_rate_control.h",
stefan64636dd2016-08-03 00:29:03 -070020 "bwe_defines.cc",
kjellander5c1d0432016-06-09 02:40:58 -070021 "include/bwe_defines.h",
22 "include/remote_bitrate_estimator.h",
sprang318673c2015-09-04 04:43:21 -070023 "include/send_time_history.h",
pbos@webrtc.org9f79fe62014-12-04 15:34:06 +000024 "inter_arrival.cc",
25 "inter_arrival.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000026 "overuse_detector.cc",
27 "overuse_detector.h",
pbos@webrtc.org9f79fe62014-12-04 15:34:06 +000028 "overuse_estimator.cc",
29 "overuse_estimator.h",
30 "remote_bitrate_estimator_abs_send_time.cc",
kjellander5c1d0432016-06-09 02:40:58 -070031 "remote_bitrate_estimator_abs_send_time.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000032 "remote_bitrate_estimator_single_stream.cc",
kjellander5c1d0432016-06-09 02:40:58 -070033 "remote_bitrate_estimator_single_stream.h",
Erik Språng6b8d3552015-09-24 15:06:57 +020034 "remote_estimator_proxy.cc",
35 "remote_estimator_proxy.h",
sprang318673c2015-09-04 04:43:21 -070036 "send_time_history.cc",
kjellander5c1d0432016-06-09 02:40:58 -070037 "test/bwe_test_logging.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000038 ]
kjellander@webrtc.org9bef5512014-07-13 09:02:54 +000039
gaetano.carlucci61050f62016-09-30 06:29:54 -070040 if (rtc_enable_bwe_test_logging) {
41 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
42 sources += [ "test/bwe_test_logging.cc" ]
43 } else {
44 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
brucedawson07df20b2016-05-22 17:15:02 -070045 }
46
kjellandere40a7ee2016-10-16 23:56:12 -070047 if (!build_with_chromium && is_clang) {
48 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070049 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000050 }
kjellander5c1d0432016-06-09 02:40:58 -070051
52 deps = [
53 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -070054 "../../rtc_base:rtc_base",
55 "../../rtc_base:rtc_base_approved",
kjellander5c1d0432016-06-09 02:40:58 -070056 "../../system_wrappers",
57 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000058}
kjellanderfb114242016-06-13 00:19:48 -070059
60if (rtc_include_tests) {
terelius3dcfd642016-10-07 00:39:56 -070061 rtc_static_library("bwe_simulator_lib") {
kjellanderfb114242016-06-13 00:19:48 -070062 testonly = true
63 sources = [
64 "test/bwe.cc",
65 "test/bwe.h",
66 "test/bwe_test.cc",
67 "test/bwe_test.h",
68 "test/bwe_test_baselinefile.cc",
69 "test/bwe_test_baselinefile.h",
70 "test/bwe_test_fileutils.cc",
71 "test/bwe_test_fileutils.h",
72 "test/bwe_test_framework.cc",
73 "test/bwe_test_framework.h",
74 "test/bwe_test_logging.h",
gnish6dcdf102017-06-05 06:01:26 -070075 "test/estimators/bbr.cc",
76 "test/estimators/bbr.h",
gnish157cbbd2017-07-18 02:50:22 -070077 "test/estimators/congestion_window.cc",
gnish6dcdf102017-06-05 06:01:26 -070078 "test/estimators/congestion_window.h",
gnish191113a2017-07-05 05:00:46 -070079 "test/estimators/max_bandwidth_filter.cc",
gnish6dcdf102017-06-05 06:01:26 -070080 "test/estimators/max_bandwidth_filter.h",
81 "test/estimators/min_rtt_filter.h",
kjellanderfb114242016-06-13 00:19:48 -070082 "test/estimators/nada.cc",
83 "test/estimators/nada.h",
84 "test/estimators/remb.cc",
85 "test/estimators/remb.h",
86 "test/estimators/send_side.cc",
87 "test/estimators/send_side.h",
88 "test/estimators/tcp.cc",
89 "test/estimators/tcp.h",
90 "test/metric_recorder.cc",
91 "test/metric_recorder.h",
92 "test/packet.h",
93 "test/packet_receiver.cc",
94 "test/packet_receiver.h",
95 "test/packet_sender.cc",
96 "test/packet_sender.h",
97 ]
98
99 if (rtc_enable_bwe_test_logging) {
100 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
kjellanderfb114242016-06-13 00:19:48 -0700101 } else {
102 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
103 }
104
kjellandere40a7ee2016-10-16 23:56:12 -0700105 if (!build_with_chromium && is_clang) {
106 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700107 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -0700108 }
109
110 if (is_win) {
111 cflags = [
112 # TODO(kjellander): Bug 261: fix this warning.
113 "/wd4373", # virtual function override.
114 ]
115 }
116
117 deps = [
mbonadei49f465f2016-12-28 04:43:46 -0800118 ":remote_bitrate_estimator",
mbonadei1140f972017-04-26 03:38:35 -0700119 "..:module_api",
mbonadei49f465f2016-12-28 04:43:46 -0800120 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700121 "../../rtc_base:gtest_prod",
122 "../../rtc_base:rtc_base",
123 "../../rtc_base:rtc_base_approved",
mbonadei49f465f2016-12-28 04:43:46 -0800124 "../../system_wrappers",
kjellanderfb114242016-06-13 00:19:48 -0700125 "../../test:test_support",
mbonadei49f465f2016-12-28 04:43:46 -0800126 "../../voice_engine",
127 "../bitrate_controller",
terelius95310922016-11-03 08:14:07 -0700128 "../congestion_controller",
kjellanderfb114242016-06-13 00:19:48 -0700129 "../pacing",
mbonadei49f465f2016-12-28 04:43:46 -0800130 "../rtp_rtcp",
kjellanderfb114242016-06-13 00:19:48 -0700131 "//testing/gmock",
132 "//testing/gtest",
133 ]
134 }
ehmaldonado021eef32017-01-05 07:09:50 -0800135
136 rtc_source_set("remote_bitrate_estimator_perf_tests") {
137 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700138
139 # Skip restricting visibility on mobile platforms since the tests on those
140 # gets additional generated targets which would require many lines here to
141 # cover (which would be confusing to read and hard to maintain).
142 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700143 visibility = [ "../..:webrtc_perf_tests" ]
kjellandere0629c02017-04-25 04:04:50 -0700144 }
ehmaldonado021eef32017-01-05 07:09:50 -0800145 sources = [
146 "remote_bitrate_estimators_test.cc",
147 ]
148 deps = [
149 ":bwe_simulator_lib",
150 ":remote_bitrate_estimator",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700151 "../../rtc_base:rtc_base_approved",
ehmaldonado90474cc2017-03-17 03:47:24 -0700152 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800153 ]
154 if (!build_with_chromium && is_clang) {
155 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
156 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
157 }
158 }
ehmaldonado36268652017-01-19 08:27:11 -0800159
160 rtc_source_set("remote_bitrate_estimator_unittests") {
161 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700162
163 # Skip restricting visibility on mobile platforms since the tests on those
164 # gets additional generated targets which would require many lines here to
165 # cover (which would be confusing to read and hard to maintain).
166 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700167 visibility = [ "..:modules_unittests" ]
kjellandere0629c02017-04-25 04:04:50 -0700168 }
ehmaldonado36268652017-01-19 08:27:11 -0800169 sources = [
170 "aimd_rate_control_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800171 "inter_arrival_unittest.cc",
172 "overuse_detector_unittest.cc",
173 "remote_bitrate_estimator_abs_send_time_unittest.cc",
174 "remote_bitrate_estimator_single_stream_unittest.cc",
175 "remote_bitrate_estimator_unittest_helper.cc",
176 "remote_bitrate_estimator_unittest_helper.h",
177 "remote_estimator_proxy_unittest.cc",
178 "send_time_history_unittest.cc",
179 "test/bwe_test_framework_unittest.cc",
180 "test/bwe_unittest.cc",
gnish157cbbd2017-07-18 02:50:22 -0700181 "test/estimators/congestion_window_unittest.cc",
182 "test/estimators/max_bandwidth_filter_unittest.cc",
183 "test/estimators/min_rtt_filter_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800184 "test/estimators/nada_unittest.cc",
185 "test/metric_recorder_unittest.cc",
186 ]
187 deps = [
188 ":bwe_simulator_lib",
kjellandere0629c02017-04-25 04:04:50 -0700189 ":mock_remote_bitrate_observer",
ehmaldonado36268652017-01-19 08:27:11 -0800190 ":remote_bitrate_estimator",
191 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700192 "../../rtc_base:rtc_base",
193 "../../rtc_base:rtc_base_approved",
ehmaldonado36268652017-01-19 08:27:11 -0800194 "../../system_wrappers:system_wrappers",
195 "../../test:field_trial",
196 "../../test:test_support",
197 "../pacing:pacing",
198 "../rtp_rtcp:rtp_rtcp",
199 "//testing/gmock",
200 ]
201 if (is_win) {
202 cflags = [
203 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
204 "/wd4373", # virtual function override.
205 ]
206 }
207 if (!build_with_chromium && is_clang) {
208 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
209 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
210 }
211 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800212
kjellandere0629c02017-04-25 04:04:50 -0700213 rtc_source_set("mock_remote_bitrate_observer") {
214 testonly = true
215 sources = [
216 "include/mock/mock_remote_bitrate_observer.h",
217 ]
218 deps = [
219 ":remote_bitrate_estimator",
220 "../../test:test_support",
221 ]
222 }
223
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800224 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",
238 "//third_party/gflags",
239 ]
240
241 if (!build_with_chromium && is_clang) {
242 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
243 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
244 }
245
246 if (is_win) {
247 cflags = [
248 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
249 "/wd4373", # virtual function override.
250 ]
251 }
252 }
kjellanderfb114242016-06-13 00:19:48 -0700253}