blob: d29969afd2c3296244714d07660d4aed2adc351a [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
mbonadei2877eaf2017-09-05 03:01:45 -070060if (!build_with_chromium) {
61 rtc_source_set("bwe_rtp") {
62 testonly = true
63 sources = [
64 "tools/bwe_rtp.cc",
65 "tools/bwe_rtp.h",
66 ]
67 deps = [
68 ":remote_bitrate_estimator",
69 "../../rtc_base:rtc_base_approved",
70 "../../test:rtp_test_utils",
71 "../rtp_rtcp:rtp_rtcp",
72 ]
73 if (is_clang) {
74 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
75 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
76 }
77 }
78}
79
kjellanderfb114242016-06-13 00:19:48 -070080if (rtc_include_tests) {
terelius3dcfd642016-10-07 00:39:56 -070081 rtc_static_library("bwe_simulator_lib") {
kjellanderfb114242016-06-13 00:19:48 -070082 testonly = true
83 sources = [
gnisha36165c2017-08-20 09:19:58 -070084 "test/bbr_paced_sender.cc",
85 "test/bbr_paced_sender.h",
kjellanderfb114242016-06-13 00:19:48 -070086 "test/bwe.cc",
87 "test/bwe.h",
88 "test/bwe_test.cc",
89 "test/bwe_test.h",
90 "test/bwe_test_baselinefile.cc",
91 "test/bwe_test_baselinefile.h",
92 "test/bwe_test_fileutils.cc",
93 "test/bwe_test_fileutils.h",
94 "test/bwe_test_framework.cc",
95 "test/bwe_test_framework.h",
96 "test/bwe_test_logging.h",
gnish6dcdf102017-06-05 06:01:26 -070097 "test/estimators/bbr.cc",
98 "test/estimators/bbr.h",
gnish157cbbd2017-07-18 02:50:22 -070099 "test/estimators/congestion_window.cc",
gnish6dcdf102017-06-05 06:01:26 -0700100 "test/estimators/congestion_window.h",
gnish191113a2017-07-05 05:00:46 -0700101 "test/estimators/max_bandwidth_filter.cc",
gnish6dcdf102017-06-05 06:01:26 -0700102 "test/estimators/max_bandwidth_filter.h",
103 "test/estimators/min_rtt_filter.h",
kjellanderfb114242016-06-13 00:19:48 -0700104 "test/estimators/nada.cc",
105 "test/estimators/nada.h",
106 "test/estimators/remb.cc",
107 "test/estimators/remb.h",
108 "test/estimators/send_side.cc",
109 "test/estimators/send_side.h",
110 "test/estimators/tcp.cc",
111 "test/estimators/tcp.h",
112 "test/metric_recorder.cc",
113 "test/metric_recorder.h",
114 "test/packet.h",
115 "test/packet_receiver.cc",
116 "test/packet_receiver.h",
117 "test/packet_sender.cc",
118 "test/packet_sender.h",
119 ]
120
121 if (rtc_enable_bwe_test_logging) {
122 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
kjellanderfb114242016-06-13 00:19:48 -0700123 } else {
124 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
125 }
126
kjellandere40a7ee2016-10-16 23:56:12 -0700127 if (!build_with_chromium && is_clang) {
128 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700129 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -0700130 }
131
132 if (is_win) {
133 cflags = [
134 # TODO(kjellander): Bug 261: fix this warning.
135 "/wd4373", # virtual function override.
136 ]
137 }
138
139 deps = [
mbonadei49f465f2016-12-28 04:43:46 -0800140 ":remote_bitrate_estimator",
mbonadei1140f972017-04-26 03:38:35 -0700141 "..:module_api",
mbonadei49f465f2016-12-28 04:43:46 -0800142 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -0700143 "../../api:optional",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700144 "../../rtc_base:gtest_prod",
145 "../../rtc_base:rtc_base",
146 "../../rtc_base:rtc_base_approved",
mbonadei49f465f2016-12-28 04:43:46 -0800147 "../../system_wrappers",
kjellanderfb114242016-06-13 00:19:48 -0700148 "../../test:test_support",
mbonadei49f465f2016-12-28 04:43:46 -0800149 "../../voice_engine",
150 "../bitrate_controller",
terelius95310922016-11-03 08:14:07 -0700151 "../congestion_controller",
kjellanderfb114242016-06-13 00:19:48 -0700152 "../pacing",
mbonadei49f465f2016-12-28 04:43:46 -0800153 "../rtp_rtcp",
charujaincb728ea2017-09-18 03:08:08 -0700154 "../video_coding:video_coding_utility",
kjellanderfb114242016-06-13 00:19:48 -0700155 "//testing/gmock",
156 "//testing/gtest",
157 ]
158 }
ehmaldonado021eef32017-01-05 07:09:50 -0800159
160 rtc_source_set("remote_bitrate_estimator_perf_tests") {
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 = [ "../..:webrtc_perf_tests" ]
kjellandere0629c02017-04-25 04:04:50 -0700168 }
ehmaldonado021eef32017-01-05 07:09:50 -0800169 sources = [
170 "remote_bitrate_estimators_test.cc",
171 ]
172 deps = [
173 ":bwe_simulator_lib",
174 ":remote_bitrate_estimator",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700175 "../../rtc_base:rtc_base_approved",
ehmaldonado90474cc2017-03-17 03:47:24 -0700176 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800177 ]
178 if (!build_with_chromium && is_clang) {
179 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
180 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
181 }
182 }
ehmaldonado36268652017-01-19 08:27:11 -0800183
184 rtc_source_set("remote_bitrate_estimator_unittests") {
185 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700186
187 # Skip restricting visibility on mobile platforms since the tests on those
188 # gets additional generated targets which would require many lines here to
189 # cover (which would be confusing to read and hard to maintain).
190 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700191 visibility = [ "..:modules_unittests" ]
kjellandere0629c02017-04-25 04:04:50 -0700192 }
ehmaldonado36268652017-01-19 08:27:11 -0800193 sources = [
194 "aimd_rate_control_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800195 "inter_arrival_unittest.cc",
196 "overuse_detector_unittest.cc",
197 "remote_bitrate_estimator_abs_send_time_unittest.cc",
198 "remote_bitrate_estimator_single_stream_unittest.cc",
199 "remote_bitrate_estimator_unittest_helper.cc",
200 "remote_bitrate_estimator_unittest_helper.h",
201 "remote_estimator_proxy_unittest.cc",
202 "send_time_history_unittest.cc",
203 "test/bwe_test_framework_unittest.cc",
204 "test/bwe_unittest.cc",
gnish157cbbd2017-07-18 02:50:22 -0700205 "test/estimators/congestion_window_unittest.cc",
206 "test/estimators/max_bandwidth_filter_unittest.cc",
207 "test/estimators/min_rtt_filter_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800208 "test/estimators/nada_unittest.cc",
209 "test/metric_recorder_unittest.cc",
210 ]
211 deps = [
212 ":bwe_simulator_lib",
213 ":remote_bitrate_estimator",
214 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700215 "../../rtc_base:rtc_base",
216 "../../rtc_base:rtc_base_approved",
ehmaldonado36268652017-01-19 08:27:11 -0800217 "../../system_wrappers:system_wrappers",
218 "../../test:field_trial",
219 "../../test:test_support",
220 "../pacing:pacing",
221 "../rtp_rtcp:rtp_rtcp",
222 "//testing/gmock",
223 ]
224 if (is_win) {
225 cflags = [
226 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
227 "/wd4373", # virtual function override.
228 ]
229 }
230 if (!build_with_chromium && is_clang) {
231 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
232 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
233 }
234 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800235
236 rtc_test("bwe_simulations_tests") {
237 testonly = true
238
239 sources = [
240 "bwe_simulations.cc",
241 ]
242 deps = [
243 ":bwe_simulator_lib",
244 ":remote_bitrate_estimator",
245 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700246 "../../rtc_base:rtc_base_approved",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800247 "../../test:test_main",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800248 "//testing/gmock",
249 "//testing/gtest",
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800250 ]
251
252 if (!build_with_chromium && is_clang) {
253 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
254 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
255 }
256
257 if (is_win) {
258 cflags = [
259 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
260 "/wd4373", # virtual function override.
261 ]
262 }
263 }
kjellanderfb114242016-06-13 00:19:48 -0700264}