blob: 72046f0a015e02a8272f9430294bad0e4887addd [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",
18 "send_side_bandwidth_estimation.cc",
19 "send_side_bandwidth_estimation.h",
20 ]
21
gaetano.carlucci52a57032016-09-14 05:04:36 -070022 if (rtc_enable_bwe_test_logging) {
23 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
24 } else {
25 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
26 }
kjellandere40a7ee2016-10-16 23:56:12 -070027 if (!build_with_chromium && is_clang) {
28 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070029 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000030 }
31
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020032 deps = [
Patrik Höglund76134542018-01-02 09:15:05 +010033 "..:module_api",
Qingsi Wang970b0882018-02-01 11:04:46 -080034 "../../logging:rtc_event_bwe",
Patrik Höglund76134542018-01-02 09:15:05 +010035 "../../logging:rtc_event_log_api",
36 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -070037 "../../rtc_base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020038 "../../system_wrappers",
Mirko Bonadei17f48782018-09-28 08:51:10 +020039 "../../system_wrappers:field_trial",
40 "../../system_wrappers:metrics",
Sebastian Jansson04b18cb2018-07-02 09:25:25 +020041 "../congestion_controller/goog_cc:delay_based_bwe",
Patrik Höglund76134542018-01-02 09:15:05 +010042 "../pacing",
43 "../remote_bitrate_estimator:remote_bitrate_estimator",
mbonadei49f465f2016-12-28 04:43:46 -080044 "../rtp_rtcp",
Patrik Höglund76134542018-01-02 09:15:05 +010045 "../rtp_rtcp:rtp_rtcp_format",
Karl Wiberg918f50c2018-07-05 11:40:33 +020046 "//third_party/abseil-cpp/absl/memory",
Sebastian Jansson7c1744d2018-10-08 11:00:50 +020047 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020048 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000049}
ehmaldonado36268652017-01-19 08:27:11 -080050
51if (rtc_include_tests) {
Patrik Höglund94dc1772018-01-02 14:20:17 +010052 rtc_source_set("mocks") {
53 testonly = true
54 sources = [
55 "include/mock/mock_bitrate_controller.h",
56 ]
57 deps = [
58 ":bitrate_controller",
59 "../../test:test_support",
60 ]
61 }
62
ehmaldonado36268652017-01-19 08:27:11 -080063 rtc_source_set("bitrate_controller_unittests") {
64 testonly = true
kjellandere0629c02017-04-25 04:04:50 -070065
ehmaldonado36268652017-01-19 08:27:11 -080066 sources = [
67 "bitrate_controller_unittest.cc",
68 "send_side_bandwidth_estimation_unittest.cc",
69 ]
70 deps = [
71 ":bitrate_controller",
Patrik Höglund731082c2018-01-03 09:08:20 +010072 "../../logging:mocks",
Qingsi Wang970b0882018-02-01 11:04:46 -080073 "../../logging:rtc_event_bwe",
Elad Alon4a87e1c2017-10-03 16:11:34 +020074 "../../logging:rtc_event_log_api",
ehmaldonado36268652017-01-19 08:27:11 -080075 "../../test:field_trial",
76 "../../test:test_support",
mbonadei334f9e62017-09-04 04:57:11 -070077 "../pacing:mock_paced_sender",
ehmaldonado36268652017-01-19 08:27:11 -080078 "../remote_bitrate_estimator:remote_bitrate_estimator",
ehmaldonado36268652017-01-19 08:27:11 -080079 ]
80 if (!build_with_chromium && is_clang) {
81 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
82 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
83 }
84 }
85}