blob: 1302326c4b570ee53a48f83f8a98e4e51275cebb [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")
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000010
kjellanderb62dbbe2016-09-23 00:38:52 -070011rtc_static_library("bitrate_controller") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000012 visibility = [ "*" ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000013 sources = [
Mirko Bonadei64f813e2018-07-18 15:37:01 +020014 "bitrate_controller.cc",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000015 "bitrate_controller_impl.cc",
16 "bitrate_controller_impl.h",
17 "include/bitrate_controller.h",
Christoffer Rodbro3a837482018-11-19 15:30:23 +010018 "loss_based_bandwidth_estimation.cc",
19 "loss_based_bandwidth_estimation.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000020 "send_side_bandwidth_estimation.cc",
21 "send_side_bandwidth_estimation.h",
22 ]
23
gaetano.carlucci52a57032016-09-14 05:04:36 -070024 if (rtc_enable_bwe_test_logging) {
25 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
26 } else {
27 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
28 }
kjellandere40a7ee2016-10-16 23:56:12 -070029 if (!build_with_chromium && is_clang) {
30 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070031 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000032 }
33
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020034 deps = [
Patrik Höglund76134542018-01-02 09:15:05 +010035 "..:module_api",
Yves Gerey988cc082018-10-23 12:03:01 +020036 "../../api/transport:network_control",
37 "../../api/units:data_rate",
38 "../../api/units:time_delta",
39 "../../api/units:timestamp",
Qingsi Wang970b0882018-02-01 11:04:46 -080040 "../../logging:rtc_event_bwe",
Patrik Höglund76134542018-01-02 09:15:05 +010041 "../../logging:rtc_event_log_api",
42 "../../rtc_base:checks",
Yves Gerey988cc082018-10-23 12:03:01 +020043 "../../rtc_base:deprecation",
ehmaldonadof6a861a2017-07-19 10:40:47 -070044 "../../rtc_base:rtc_base_approved",
Sebastian Jansson2e068e82018-10-08 12:49:53 +020045 "../../rtc_base/experiments:field_trial_parser",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020046 "../../system_wrappers",
Mirko Bonadei17f48782018-09-28 08:51:10 +020047 "../../system_wrappers:field_trial",
48 "../../system_wrappers:metrics",
Sebastian Jansson04b18cb2018-07-02 09:25:25 +020049 "../congestion_controller/goog_cc:delay_based_bwe",
Patrik Höglund76134542018-01-02 09:15:05 +010050 "../pacing",
51 "../remote_bitrate_estimator:remote_bitrate_estimator",
mbonadei49f465f2016-12-28 04:43:46 -080052 "../rtp_rtcp",
Patrik Höglund76134542018-01-02 09:15:05 +010053 "../rtp_rtcp:rtp_rtcp_format",
Karl Wiberg918f50c2018-07-05 11:40:33 +020054 "//third_party/abseil-cpp/absl/memory",
Sebastian Jansson7c1744d2018-10-08 11:00:50 +020055 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020056 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000057}
ehmaldonado36268652017-01-19 08:27:11 -080058
59if (rtc_include_tests) {
Patrik Höglund94dc1772018-01-02 14:20:17 +010060 rtc_source_set("mocks") {
61 testonly = true
62 sources = [
63 "include/mock/mock_bitrate_controller.h",
64 ]
65 deps = [
66 ":bitrate_controller",
67 "../../test:test_support",
68 ]
69 }
70
ehmaldonado36268652017-01-19 08:27:11 -080071 rtc_source_set("bitrate_controller_unittests") {
72 testonly = true
kjellandere0629c02017-04-25 04:04:50 -070073
ehmaldonado36268652017-01-19 08:27:11 -080074 sources = [
75 "bitrate_controller_unittest.cc",
76 "send_side_bandwidth_estimation_unittest.cc",
77 ]
78 deps = [
79 ":bitrate_controller",
Patrik Höglund731082c2018-01-03 09:08:20 +010080 "../../logging:mocks",
Qingsi Wang970b0882018-02-01 11:04:46 -080081 "../../logging:rtc_event_bwe",
Elad Alon4a87e1c2017-10-03 16:11:34 +020082 "../../logging:rtc_event_log_api",
Yves Gerey3e707812018-11-28 16:47:49 +010083 "../../system_wrappers:system_wrappers",
ehmaldonado36268652017-01-19 08:27:11 -080084 "../../test:field_trial",
85 "../../test:test_support",
Yves Gerey3e707812018-11-28 16:47:49 +010086 "../congestion_controller/goog_cc:delay_based_bwe",
mbonadei334f9e62017-09-04 04:57:11 -070087 "../pacing:mock_paced_sender",
Yves Gerey3e707812018-11-28 16:47:49 +010088 "../pacing:pacing",
ehmaldonado36268652017-01-19 08:27:11 -080089 "../remote_bitrate_estimator:remote_bitrate_estimator",
Yves Gerey3e707812018-11-28 16:47:49 +010090 "../rtp_rtcp:rtp_rtcp_format",
ehmaldonado36268652017-01-19 08:27:11 -080091 ]
92 if (!build_with_chromium && is_clang) {
93 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
94 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
95 }
96 }
97}