blob: a94082a2ba31a834dff7b6eacc568c24f3257f58 [file] [log] [blame]
Stefan Holmer80e12072016-02-23 13:30:42 +01001# 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")
Stefan Holmer80e12072016-02-23 13:30:42 +010010
Patrik Höglund08279b52017-12-19 09:33:40 +010011config("bwe_test_logging") {
12 if (rtc_enable_bwe_test_logging) {
13 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
14 } else {
15 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
16 }
17}
18
kjellanderb62dbbe2016-09-23 00:38:52 -070019rtc_static_library("congestion_controller") {
Patrik Höglund08279b52017-12-19 09:33:40 +010020 configs += [ ":bwe_test_logging" ]
Stefan Holmer80e12072016-02-23 13:30:42 +010021 sources = [
nisse559af382017-03-21 06:41:12 -070022 "include/receive_side_congestion_controller.h",
23 "include/send_side_congestion_controller.h",
Irfan Sheriffb2540bb2016-09-12 12:28:54 -070024 "probe_controller.cc",
25 "probe_controller.h",
nisse559af382017-03-21 06:41:12 -070026 "receive_side_congestion_controller.cc",
27 "send_side_congestion_controller.cc",
Stefan Holmer280de9e2016-09-30 10:06:51 +020028 "transport_feedback_adapter.cc",
29 "transport_feedback_adapter.h",
Stefan Holmer80e12072016-02-23 13:30:42 +010030 ]
31
kjellandere40a7ee2016-10-16 23:56:12 -070032 if (!build_with_chromium && is_clang) {
33 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070034 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Stefan Holmer80e12072016-02-23 13:30:42 +010035 }
36
37 deps = [
Patrik Höglund08279b52017-12-19 09:33:40 +010038 ":delay_based_bwe",
39 ":estimators",
mbonadei1140f972017-04-26 03:38:35 -070040 "..:module_api",
mbonadei49f465f2016-12-28 04:43:46 -080041 "../..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010042 "../../rtc_base:checks",
43 "../../rtc_base:rate_limiter",
ehmaldonadof6a861a2017-07-19 10:40:47 -070044 "../../rtc_base:rtc_base",
mbonadei49f465f2016-12-28 04:43:46 -080045 "../../system_wrappers",
Mirko Bonadeia498ae82017-12-06 09:17:14 +010046 "../../system_wrappers:field_trial_api",
47 "../../system_wrappers:metrics_api",
Stefan Holmer80e12072016-02-23 13:30:42 +010048 "../bitrate_controller",
49 "../pacing",
mbonadei49f465f2016-12-28 04:43:46 -080050 "../remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +010051 "../rtp_rtcp:rtp_rtcp_format",
Stefan Holmer80e12072016-02-23 13:30:42 +010052 ]
53}
ehmaldonado36268652017-01-19 08:27:11 -080054
Patrik Höglund08279b52017-12-19 09:33:40 +010055rtc_source_set("estimators") {
56 configs += [ ":bwe_test_logging" ]
57 sources = [
58 "acknowledged_bitrate_estimator.cc",
59 "acknowledged_bitrate_estimator.h",
60 "bitrate_estimator.cc",
61 "bitrate_estimator.h",
62 "median_slope_estimator.cc",
63 "median_slope_estimator.h",
64 "probe_bitrate_estimator.cc",
65 "probe_bitrate_estimator.h",
66 "trendline_estimator.cc",
67 "trendline_estimator.h",
68 ]
69
70 if (!build_with_chromium && 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 deps = [
76 "../../api:optional",
77 "../../logging:rtc_event_log_api",
78 "../../rtc_base:checks",
79 "../../rtc_base:rtc_base_approved",
80 "../../rtc_base:rtc_numerics",
81 "../../system_wrappers:field_trial_api",
82 "../../system_wrappers:metrics_api",
83 "../remote_bitrate_estimator:remote_bitrate_estimator",
84 "../rtp_rtcp:rtp_rtcp_format",
85 ]
86}
87
88rtc_source_set("delay_based_bwe") {
89 configs += [ ":bwe_test_logging" ]
90 sources = [
91 "delay_based_bwe.cc",
92 "delay_based_bwe.h",
93 ]
94 deps = [
95 ":estimators",
96 "../../:typedefs",
97 "../../logging:rtc_event_log_api",
98 "../../rtc_base:checks",
99 "../../rtc_base:rtc_base_approved",
100 "../../system_wrappers:field_trial_api",
101 "../../system_wrappers:metrics_api",
102 "../pacing",
103 "../remote_bitrate_estimator",
104 ]
105
106 if (!build_with_chromium && is_clang) {
107 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
108 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
109 }
110}
111
ehmaldonado36268652017-01-19 08:27:11 -0800112if (rtc_include_tests) {
113 rtc_source_set("congestion_controller_unittests") {
114 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700115
ehmaldonado36268652017-01-19 08:27:11 -0800116 sources = [
tschumim9d117642017-07-17 01:41:41 -0700117 "acknowledged_bitrate_estimator_unittest.cc",
elad.alon5bbf43f2017-03-09 06:40:08 -0800118 "congestion_controller_unittests_helper.cc",
119 "congestion_controller_unittests_helper.h",
ehmaldonado36268652017-01-19 08:27:11 -0800120 "delay_based_bwe_unittest.cc",
121 "delay_based_bwe_unittest_helper.cc",
122 "delay_based_bwe_unittest_helper.h",
123 "median_slope_estimator_unittest.cc",
124 "probe_bitrate_estimator_unittest.cc",
125 "probe_controller_unittest.cc",
Niels Möller245f17e2017-08-21 10:45:07 +0200126 "receive_side_congestion_controller_unittest.cc",
127 "send_side_congestion_controller_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800128 "transport_feedback_adapter_unittest.cc",
129 "trendline_estimator_unittest.cc",
130 ]
131 deps = [
132 ":congestion_controller",
Patrik Höglund08279b52017-12-19 09:33:40 +0100133 ":delay_based_bwe",
134 ":estimators",
zstein7cb69d52017-05-08 11:52:38 -0700135 ":mock_congestion_controller",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100136 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700137 "../../rtc_base:rtc_base",
138 "../../rtc_base:rtc_base_approved",
139 "../../rtc_base:rtc_base_tests_utils",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100140 "../../system_wrappers",
ehmaldonado36268652017-01-19 08:27:11 -0800141 "../../test:field_trial",
142 "../../test:test_support",
143 "../bitrate_controller:bitrate_controller",
mbonadei334f9e62017-09-04 04:57:11 -0700144 "../pacing:mock_paced_sender",
ehmaldonado36268652017-01-19 08:27:11 -0800145 "../pacing:pacing",
146 "../remote_bitrate_estimator:remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100147 "../rtp_rtcp:rtp_rtcp_format",
ehmaldonado36268652017-01-19 08:27:11 -0800148 "//testing/gmock",
149 ]
150 if (!build_with_chromium && is_clang) {
151 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
152 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
153 }
154 }
zstein7cb69d52017-05-08 11:52:38 -0700155
156 rtc_source_set("mock_congestion_controller") {
157 testonly = true
158 sources = [
159 "include/mock/mock_congestion_observer.h",
160 "include/mock/mock_send_side_congestion_controller.h",
161 ]
162 deps = [
163 ":congestion_controller",
164 "../../test:test_support",
165 ]
166 }
ehmaldonado36268652017-01-19 08:27:11 -0800167}