blob: 81028f6b634de4430b8a5b04c7e215f2a8dd421f [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
kjellanderfb114242016-06-13 00:19:48 -07009import("../../build/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",
mbonadei49f465f2016-12-28 04:43:46 -080054 "../../base:rtc_base",
Henrik Kjellanderd4070c62016-06-09 11:55:29 +020055 "../../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",
75 "test/estimators/nada.cc",
76 "test/estimators/nada.h",
77 "test/estimators/remb.cc",
78 "test/estimators/remb.h",
79 "test/estimators/send_side.cc",
80 "test/estimators/send_side.h",
81 "test/estimators/tcp.cc",
82 "test/estimators/tcp.h",
83 "test/metric_recorder.cc",
84 "test/metric_recorder.h",
85 "test/packet.h",
86 "test/packet_receiver.cc",
87 "test/packet_receiver.h",
88 "test/packet_sender.cc",
89 "test/packet_sender.h",
90 ]
91
92 if (rtc_enable_bwe_test_logging) {
93 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
kjellanderfb114242016-06-13 00:19:48 -070094 } else {
95 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
96 }
97
kjellandere40a7ee2016-10-16 23:56:12 -070098 if (!build_with_chromium && is_clang) {
99 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700100 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderfb114242016-06-13 00:19:48 -0700101 }
102
103 if (is_win) {
104 cflags = [
105 # TODO(kjellander): Bug 261: fix this warning.
106 "/wd4373", # virtual function override.
107 ]
108 }
109
110 deps = [
mbonadei49f465f2016-12-28 04:43:46 -0800111 ":remote_bitrate_estimator",
112 "../..:webrtc_common",
113 "../../base:gtest_prod",
114 "../../base:rtc_base",
115 "../../base:rtc_base_approved",
116 "../../system_wrappers",
kjellanderfb114242016-06-13 00:19:48 -0700117 "../../test:test_support",
mbonadei49f465f2016-12-28 04:43:46 -0800118 "../../voice_engine",
119 "../bitrate_controller",
terelius95310922016-11-03 08:14:07 -0700120 "../congestion_controller",
kjellanderfb114242016-06-13 00:19:48 -0700121 "../pacing",
mbonadei49f465f2016-12-28 04:43:46 -0800122 "../rtp_rtcp",
kjellanderfb114242016-06-13 00:19:48 -0700123 "//testing/gmock",
124 "//testing/gtest",
125 ]
126 }
ehmaldonado021eef32017-01-05 07:09:50 -0800127
128 rtc_source_set("remote_bitrate_estimator_perf_tests") {
129 testonly = true
130 sources = [
131 "remote_bitrate_estimators_test.cc",
132 ]
133 deps = [
134 ":bwe_simulator_lib",
135 ":remote_bitrate_estimator",
136 "../../base:rtc_base_approved",
137 "../../test:fileutils",
138 ]
139 if (!build_with_chromium && is_clang) {
140 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
141 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
142 }
143 }
ehmaldonado36268652017-01-19 08:27:11 -0800144
145 rtc_source_set("remote_bitrate_estimator_unittests") {
146 testonly = true
147 sources = [
148 "aimd_rate_control_unittest.cc",
149 "include/mock/mock_remote_bitrate_estimator.h",
150 "include/mock/mock_remote_bitrate_observer.h",
151 "inter_arrival_unittest.cc",
152 "overuse_detector_unittest.cc",
153 "remote_bitrate_estimator_abs_send_time_unittest.cc",
154 "remote_bitrate_estimator_single_stream_unittest.cc",
155 "remote_bitrate_estimator_unittest_helper.cc",
156 "remote_bitrate_estimator_unittest_helper.h",
157 "remote_estimator_proxy_unittest.cc",
158 "send_time_history_unittest.cc",
159 "test/bwe_test_framework_unittest.cc",
160 "test/bwe_unittest.cc",
161 "test/estimators/nada_unittest.cc",
162 "test/metric_recorder_unittest.cc",
163 ]
164 deps = [
165 ":bwe_simulator_lib",
166 ":remote_bitrate_estimator",
167 "../..:webrtc_common",
168 "../../base:rtc_base",
169 "../../base:rtc_base_approved",
170 "../../system_wrappers:system_wrappers",
171 "../../test:field_trial",
172 "../../test:test_support",
173 "../pacing:pacing",
174 "../rtp_rtcp:rtp_rtcp",
175 "//testing/gmock",
176 ]
177 if (is_win) {
178 cflags = [
179 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
180 "/wd4373", # virtual function override.
181 ]
182 }
183 if (!build_with_chromium && is_clang) {
184 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
185 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
186 }
187 }
kjellanderfb114242016-06-13 00:19:48 -0700188}