blob: 58d2e253b4e28f62772fecbc5bc439b1d8dedf05 [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
kjellanderb62dbbe2016-09-23 00:38:52 -070011rtc_static_library("congestion_controller") {
Stefan Holmer80e12072016-02-23 13:30:42 +010012 sources = [
tschumim9d117642017-07-17 01:41:41 -070013 "acknowledged_bitrate_estimator.cc",
14 "acknowledged_bitrate_estimator.h",
15 "bitrate_estimator.cc",
16 "bitrate_estimator.h",
philipel863a8262016-06-17 09:21:34 -070017 "delay_based_bwe.cc",
18 "delay_based_bwe.h",
nisse559af382017-03-21 06:41:12 -070019 "include/receive_side_congestion_controller.h",
20 "include/send_side_congestion_controller.h",
terelius5a388362016-12-09 05:50:01 -080021 "median_slope_estimator.cc",
22 "median_slope_estimator.h",
philipel233c4ba2016-08-01 08:49:04 -070023 "probe_bitrate_estimator.cc",
24 "probe_bitrate_estimator.h",
Irfan Sheriffb2540bb2016-09-12 12:28:54 -070025 "probe_controller.cc",
26 "probe_controller.h",
nisse559af382017-03-21 06:41:12 -070027 "receive_side_congestion_controller.cc",
28 "send_side_congestion_controller.cc",
Stefan Holmer280de9e2016-09-30 10:06:51 +020029 "transport_feedback_adapter.cc",
30 "transport_feedback_adapter.h",
tereliusafaef8b2016-11-17 03:48:18 -080031 "trendline_estimator.cc",
32 "trendline_estimator.h",
Stefan Holmer80e12072016-02-23 13:30:42 +010033 ]
34
tereliusafaef8b2016-11-17 03:48:18 -080035 if (rtc_enable_bwe_test_logging) {
36 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
37 } else {
38 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
39 }
40
kjellander8f4419b2016-06-02 02:09:52 -070041 # TODO(jschuh): Bug 1348: fix this warning.
42 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
43
kjellandere40a7ee2016-10-16 23:56:12 -070044 if (!build_with_chromium && is_clang) {
45 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070046 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Stefan Holmer80e12072016-02-23 13:30:42 +010047 }
48
49 deps = [
mbonadei1140f972017-04-26 03:38:35 -070050 "..:module_api",
mbonadei49f465f2016-12-28 04:43:46 -080051 "../..:webrtc_common",
kwiberg84f6a3f2017-09-05 08:43:13 -070052 "../../api:optional",
terelius0baf55d2017-02-17 03:38:28 -080053 "../../logging:rtc_event_log_api",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010054 "../../rtc_base:checks",
55 "../../rtc_base:rate_limiter",
ehmaldonadof6a861a2017-07-19 10:40:47 -070056 "../../rtc_base:rtc_base",
57 "../../rtc_base:rtc_base_approved",
58 "../../rtc_base:rtc_numerics",
mbonadei49f465f2016-12-28 04:43:46 -080059 "../../system_wrappers",
Mirko Bonadeia498ae82017-12-06 09:17:14 +010060 "../../system_wrappers:field_trial_api",
61 "../../system_wrappers:metrics_api",
Stefan Holmer80e12072016-02-23 13:30:42 +010062 "../bitrate_controller",
63 "../pacing",
mbonadei49f465f2016-12-28 04:43:46 -080064 "../remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +010065 "../rtp_rtcp:rtp_rtcp_format",
mbonadei49f465f2016-12-28 04:43:46 -080066 "../utility",
Stefan Holmer80e12072016-02-23 13:30:42 +010067 ]
68}
ehmaldonado36268652017-01-19 08:27:11 -080069
70if (rtc_include_tests) {
71 rtc_source_set("congestion_controller_unittests") {
72 testonly = true
kjellandere0629c02017-04-25 04:04:50 -070073
ehmaldonado36268652017-01-19 08:27:11 -080074 sources = [
tschumim9d117642017-07-17 01:41:41 -070075 "acknowledged_bitrate_estimator_unittest.cc",
elad.alon5bbf43f2017-03-09 06:40:08 -080076 "congestion_controller_unittests_helper.cc",
77 "congestion_controller_unittests_helper.h",
ehmaldonado36268652017-01-19 08:27:11 -080078 "delay_based_bwe_unittest.cc",
79 "delay_based_bwe_unittest_helper.cc",
80 "delay_based_bwe_unittest_helper.h",
81 "median_slope_estimator_unittest.cc",
82 "probe_bitrate_estimator_unittest.cc",
83 "probe_controller_unittest.cc",
Niels Möller245f17e2017-08-21 10:45:07 +020084 "receive_side_congestion_controller_unittest.cc",
85 "send_side_congestion_controller_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -080086 "transport_feedback_adapter_unittest.cc",
87 "trendline_estimator_unittest.cc",
88 ]
89 deps = [
90 ":congestion_controller",
zstein7cb69d52017-05-08 11:52:38 -070091 ":mock_congestion_controller",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010092 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -070093 "../../rtc_base:rtc_base",
94 "../../rtc_base:rtc_base_approved",
95 "../../rtc_base:rtc_base_tests_utils",
Mirko Bonadeia498ae82017-12-06 09:17:14 +010096 "../../system_wrappers",
ehmaldonado36268652017-01-19 08:27:11 -080097 "../../test:field_trial",
98 "../../test:test_support",
99 "../bitrate_controller:bitrate_controller",
mbonadei334f9e62017-09-04 04:57:11 -0700100 "../pacing:mock_paced_sender",
ehmaldonado36268652017-01-19 08:27:11 -0800101 "../pacing:pacing",
102 "../remote_bitrate_estimator:remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100103 "../rtp_rtcp:rtp_rtcp_format",
ehmaldonado36268652017-01-19 08:27:11 -0800104 "//testing/gmock",
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 }
zstein7cb69d52017-05-08 11:52:38 -0700111
112 rtc_source_set("mock_congestion_controller") {
113 testonly = true
114 sources = [
115 "include/mock/mock_congestion_observer.h",
116 "include/mock/mock_send_side_congestion_controller.h",
117 ]
118 deps = [
119 ":congestion_controller",
120 "../../test:test_support",
121 ]
122 }
ehmaldonado36268652017-01-19 08:27:11 -0800123}