blob: f9c715658e72c55c7e854300310072aab03ff9d5 [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 = [
14 "bitrate_controller_impl.cc",
15 "bitrate_controller_impl.h",
16 "include/bitrate_controller.h",
17 "send_side_bandwidth_estimation.cc",
18 "send_side_bandwidth_estimation.h",
19 ]
20
gaetano.carlucci52a57032016-09-14 05:04:36 -070021 if (rtc_enable_bwe_test_logging) {
22 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
23 } else {
24 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
25 }
kjellandere40a7ee2016-10-16 23:56:12 -070026 if (!build_with_chromium && is_clang) {
27 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070028 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000029 }
30
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020031 deps = [
Patrik Höglund76134542018-01-02 09:15:05 +010032 "..:module_api",
Qingsi Wang970b0882018-02-01 11:04:46 -080033 "../../logging:rtc_event_bwe",
Patrik Höglund76134542018-01-02 09:15:05 +010034 "../../logging:rtc_event_log_api",
35 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -070036 "../../rtc_base:rtc_base_approved",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020037 "../../system_wrappers",
Patrik Höglund76134542018-01-02 09:15:05 +010038 "../../system_wrappers:field_trial_api",
39 "../../system_wrappers:metrics_api",
Sebastian Jansson04b18cb2018-07-02 09:25:25 +020040 "../congestion_controller/goog_cc:delay_based_bwe",
Patrik Höglund76134542018-01-02 09:15:05 +010041 "../pacing",
42 "../remote_bitrate_estimator:remote_bitrate_estimator",
mbonadei49f465f2016-12-28 04:43:46 -080043 "../rtp_rtcp",
Patrik Höglund76134542018-01-02 09:15:05 +010044 "../rtp_rtcp:rtp_rtcp_format",
Karl Wiberg918f50c2018-07-05 11:40:33 +020045 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020046 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000047}
ehmaldonado36268652017-01-19 08:27:11 -080048
49if (rtc_include_tests) {
Patrik Höglund94dc1772018-01-02 14:20:17 +010050 rtc_source_set("mocks") {
51 testonly = true
52 sources = [
53 "include/mock/mock_bitrate_controller.h",
54 ]
55 deps = [
56 ":bitrate_controller",
57 "../../test:test_support",
58 ]
59 }
60
ehmaldonado36268652017-01-19 08:27:11 -080061 rtc_source_set("bitrate_controller_unittests") {
62 testonly = true
kjellandere0629c02017-04-25 04:04:50 -070063
ehmaldonado36268652017-01-19 08:27:11 -080064 sources = [
65 "bitrate_controller_unittest.cc",
66 "send_side_bandwidth_estimation_unittest.cc",
67 ]
68 deps = [
69 ":bitrate_controller",
Patrik Höglund731082c2018-01-03 09:08:20 +010070 "../../logging:mocks",
Qingsi Wang970b0882018-02-01 11:04:46 -080071 "../../logging:rtc_event_bwe",
Elad Alon4a87e1c2017-10-03 16:11:34 +020072 "../../logging:rtc_event_log_api",
ehmaldonado36268652017-01-19 08:27:11 -080073 "../../test:field_trial",
74 "../../test:test_support",
mbonadei334f9e62017-09-04 04:57:11 -070075 "../pacing:mock_paced_sender",
ehmaldonado36268652017-01-19 08:27:11 -080076 "../remote_bitrate_estimator:remote_bitrate_estimator",
ehmaldonado36268652017-01-19 08:27:11 -080077 ]
78 if (!build_with_chromium && is_clang) {
79 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
80 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
81 }
82 }
83}