blob: f4d1f7a4c31245d4b99d1498ccad75a5fa0ef283 [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öglund76134542018-01-02 09:15:05 +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") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000020 visibility = [ "*" ]
Patrik Höglund76134542018-01-02 09:15:05 +010021 configs += [ ":bwe_test_logging" ]
Stefan Holmer80e12072016-02-23 13:30:42 +010022 sources = [
Sebastian Janssone4be6da2018-02-15 16:51:41 +010023 "include/network_changed_observer.h",
nisse559af382017-03-21 06:41:12 -070024 "include/receive_side_congestion_controller.h",
25 "include/send_side_congestion_controller.h",
Sebastian Janssondfde3342018-02-22 12:32:27 +010026 "include/send_side_congestion_controller_interface.h",
Sebastian Janssonea86bb72018-02-14 16:53:38 +000027 "probe_controller.cc",
28 "probe_controller.h",
nisse559af382017-03-21 06:41:12 -070029 "receive_side_congestion_controller.cc",
30 "send_side_congestion_controller.cc",
Stefan Holmer80e12072016-02-23 13:30:42 +010031 ]
32
Olga Sharonova44e57be2017-12-20 13:13:32 +000033 # TODO(jschuh): Bug 1348: fix this warning.
34 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
35
kjellandere40a7ee2016-10-16 23:56:12 -070036 if (!build_with_chromium && is_clang) {
37 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070038 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Stefan Holmer80e12072016-02-23 13:30:42 +010039 }
40
41 deps = [
Sebastian Janssonea86bb72018-02-14 16:53:38 +000042 ":delay_based_bwe",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010043 ":transport_feedback",
mbonadei1140f972017-04-26 03:38:35 -070044 "..:module_api",
mbonadei49f465f2016-12-28 04:43:46 -080045 "../..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010046 "../../rtc_base:checks",
47 "../../rtc_base:rate_limiter",
mbonadei49f465f2016-12-28 04:43:46 -080048 "../../system_wrappers",
Mirko Bonadeia498ae82017-12-06 09:17:14 +010049 "../../system_wrappers:field_trial_api",
50 "../../system_wrappers:metrics_api",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +000051 "../../system_wrappers:runtime_enabled_features_api",
Stefan Holmer80e12072016-02-23 13:30:42 +010052 "../bitrate_controller",
53 "../pacing",
mbonadei49f465f2016-12-28 04:43:46 -080054 "../remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +010055 "../rtp_rtcp:rtp_rtcp_format",
Sebastian Jansson172fd852018-05-24 14:17:06 +020056 "goog_cc:estimators",
Stefan Holmer80e12072016-02-23 13:30:42 +010057 ]
Dan Minor9c686132018-01-15 10:20:00 -050058
59 if (!build_with_mozilla) {
60 deps += [ "../../rtc_base:rtc_base" ]
61 }
Stefan Holmer80e12072016-02-23 13:30:42 +010062}
ehmaldonado36268652017-01-19 08:27:11 -080063
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010064rtc_static_library("transport_feedback") {
65 visibility = [ "*" ]
66 sources = [
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010067 "transport_feedback_adapter.cc",
68 "transport_feedback_adapter.h",
69 ]
70
71 deps = [
Sebastian Janssonea86bb72018-02-14 16:53:38 +000072 "../../modules:module_api",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010073 "../../rtc_base:checks",
74 "../../rtc_base:rtc_base_approved",
Sebastian Janssonea86bb72018-02-14 16:53:38 +000075 "../../system_wrappers:system_wrappers",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +010076 "../rtp_rtcp:rtp_rtcp_format",
Sebastian Jansson172fd852018-05-24 14:17:06 +020077 "rtp:transport_feedback",
Danil Chapovalovbda50682018-02-14 09:08:28 +000078 ]
79}
80
81rtc_source_set("delay_based_bwe") {
82 configs += [ ":bwe_test_logging" ]
83 sources = [
84 "delay_based_bwe.cc",
85 "delay_based_bwe.h",
86 ]
87 deps = [
Danil Chapovalovbda50682018-02-14 09:08:28 +000088 "../../:typedefs",
89 "../../logging:rtc_event_bwe",
90 "../../logging:rtc_event_log_api",
91 "../../rtc_base:checks",
92 "../../rtc_base:rtc_base_approved",
93 "../../system_wrappers:field_trial_api",
94 "../../system_wrappers:metrics_api",
95 "../pacing",
96 "../remote_bitrate_estimator",
Sebastian Jansson172fd852018-05-24 14:17:06 +020097 "goog_cc:estimators",
Danil Chapovalovbda50682018-02-14 09:08:28 +000098 ]
99
100 if (!build_with_chromium && is_clang) {
101 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
102 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
103 }
104}
105
ehmaldonado36268652017-01-19 08:27:11 -0800106if (rtc_include_tests) {
107 rtc_source_set("congestion_controller_unittests") {
108 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700109
ehmaldonado36268652017-01-19 08:27:11 -0800110 sources = [
Sebastian Janssonea86bb72018-02-14 16:53:38 +0000111 "delay_based_bwe_unittest.cc",
112 "delay_based_bwe_unittest_helper.cc",
113 "delay_based_bwe_unittest_helper.h",
Sebastian Janssonea86bb72018-02-14 16:53:38 +0000114 "probe_controller_unittest.cc",
Niels Möller245f17e2017-08-21 10:45:07 +0200115 "receive_side_congestion_controller_unittest.cc",
116 "send_side_congestion_controller_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800117 "transport_feedback_adapter_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800118 ]
119 deps = [
120 ":congestion_controller",
Sebastian Janssonea86bb72018-02-14 16:53:38 +0000121 ":delay_based_bwe",
zstein7cb69d52017-05-08 11:52:38 -0700122 ":mock_congestion_controller",
Stefan Holmer4dbc7e42018-01-26 15:09:41 +0100123 ":transport_feedback",
Patrik Höglund731082c2018-01-03 09:08:20 +0100124 "../../logging:mocks",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100125 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700126 "../../rtc_base:rtc_base",
127 "../../rtc_base:rtc_base_approved",
128 "../../rtc_base:rtc_base_tests_utils",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100129 "../../system_wrappers",
ehmaldonado36268652017-01-19 08:27:11 -0800130 "../../test:field_trial",
131 "../../test:test_support",
Sebastian Janssonea86bb72018-02-14 16:53:38 +0000132 "../bitrate_controller:bitrate_controller",
Patrik Höglund94dc1772018-01-02 14:20:17 +0100133 "../bitrate_controller:mocks",
mbonadei334f9e62017-09-04 04:57:11 -0700134 "../pacing:mock_paced_sender",
ehmaldonado36268652017-01-19 08:27:11 -0800135 "../pacing:pacing",
136 "../remote_bitrate_estimator:remote_bitrate_estimator",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100137 "../rtp_rtcp:rtp_rtcp_format",
Sebastian Jansson9bd1af12018-03-22 15:34:01 +0100138 "bbr:bbr_unittests",
Sebastian Jansson172fd852018-05-24 14:17:06 +0200139 "goog_cc:estimators",
Sebastian Janssonfc7ec8e2018-02-28 16:48:00 +0100140 "goog_cc:goog_cc_unittests",
Sebastian Jansson56da2f72018-02-28 13:07:28 +0100141 "rtp:congestion_controller_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800142 ]
143 if (!build_with_chromium && is_clang) {
144 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
145 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
146 }
147 }
zstein7cb69d52017-05-08 11:52:38 -0700148
149 rtc_source_set("mock_congestion_controller") {
150 testonly = true
151 sources = [
152 "include/mock/mock_congestion_observer.h",
zstein7cb69d52017-05-08 11:52:38 -0700153 ]
154 deps = [
155 ":congestion_controller",
156 "../../test:test_support",
157 ]
158 }
ehmaldonado36268652017-01-19 08:27:11 -0800159}