blob: bc17af14bccbc0d4735286d3301b541742feaf72 [file] [log] [blame]
Sebastian Janssonfc7ec8e2018-02-28 16:48:00 +01001# Copyright (c) 2018 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
9import("../../../webrtc.gni")
10
11config("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
19rtc_static_library("goog_cc") {
20 configs += [ ":bwe_test_logging" ]
21 sources = [
22 "alr_detector.cc",
23 "alr_detector.h",
24 "goog_cc_factory.cc",
25 "goog_cc_network_control.cc",
26 "goog_cc_network_control.h",
27 "include/goog_cc_factory.h",
28 "probe_controller.cc",
29 "probe_controller.h",
30 ]
31
32 # TODO(jschuh): Bug 1348: fix this warning.
33 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
34
35 if (!build_with_chromium && is_clang) {
36 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
37 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
38 }
39
40 deps = [
41 ":delay_based_bwe",
42 ":estimators",
43 "../..:module_api",
44 "../../..:webrtc_common",
45 "../../../:typedefs",
46 "../../../api:optional",
47 "../../../logging:rtc_event_log_api",
48 "../../../logging:rtc_event_pacing",
49 "../../../rtc_base:checks",
50 "../../../rtc_base:rtc_base_approved",
51 "../../../rtc_base/experiments:alr_experiment",
52 "../../../system_wrappers",
53 "../../../system_wrappers:field_trial_api",
54 "../../../system_wrappers:metrics_api",
55 "../../bitrate_controller",
56 "../../pacing",
57 "../../remote_bitrate_estimator",
58 "../../rtp_rtcp:rtp_rtcp_format",
59 "../network_control",
60 ]
61}
62
63rtc_source_set("estimators") {
64 configs += [ ":bwe_test_logging" ]
65 sources = [
66 "acknowledged_bitrate_estimator.cc",
67 "acknowledged_bitrate_estimator.h",
68 "bitrate_estimator.cc",
69 "bitrate_estimator.h",
70 "delay_increase_detector_interface.h",
71 "median_slope_estimator.cc",
72 "median_slope_estimator.h",
73 "probe_bitrate_estimator.cc",
74 "probe_bitrate_estimator.h",
75 "trendline_estimator.cc",
76 "trendline_estimator.h",
77 ]
78
79 # TODO(jschuh): Bug 1348: fix this warning.
80 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
81
82 if (!build_with_chromium && is_clang) {
83 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
84 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
85 }
86
87 deps = [
88 "../../../api:optional",
89 "../../../logging:rtc_event_bwe",
90 "../../../logging:rtc_event_log_api",
91 "../../../rtc_base:checks",
92 "../../../rtc_base:rtc_base_approved",
93 "../../../rtc_base:rtc_numerics",
94 "../../../system_wrappers:field_trial_api",
95 "../../../system_wrappers:metrics_api",
96 "../../remote_bitrate_estimator",
97 "../../rtp_rtcp:rtp_rtcp_format",
98 ]
99}
100
101rtc_source_set("delay_based_bwe") {
102 configs += [ ":bwe_test_logging" ]
103 sources = [
104 "delay_based_bwe.cc",
105 "delay_based_bwe.h",
106 ]
107
108 deps = [
109 ":estimators",
110 "../../../:typedefs",
111 "../../../logging:rtc_event_bwe",
112 "../../../logging:rtc_event_log_api",
113 "../../../rtc_base:checks",
114 "../../../rtc_base:rtc_base_approved",
115 "../../../system_wrappers:field_trial_api",
116 "../../../system_wrappers:metrics_api",
117 "../../pacing",
118 "../../remote_bitrate_estimator",
119 ]
120
121 if (!build_with_chromium && is_clang) {
122 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
123 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
124 }
125}
126
127if (rtc_include_tests) {
128 rtc_source_set("goog_cc_unittests") {
129 testonly = true
130
131 sources = [
132 "acknowledged_bitrate_estimator_unittest.cc",
133 "alr_detector_unittest.cc",
134 "delay_based_bwe_unittest.cc",
135 "delay_based_bwe_unittest_helper.cc",
136 "delay_based_bwe_unittest_helper.h",
137 "median_slope_estimator_unittest.cc",
138 "probe_bitrate_estimator_unittest.cc",
139 "probe_controller_unittest.cc",
140 "trendline_estimator_unittest.cc",
141 ]
142 deps = [
143 ":delay_based_bwe",
144 ":estimators",
145 ":goog_cc",
146 "../../../rtc_base:checks",
147 "../../../rtc_base:rtc_base_approved",
148 "../../../rtc_base:rtc_base_tests_utils",
149 "../../../rtc_base/experiments:alr_experiment",
150 "../../../system_wrappers",
151 "../../../test:field_trial",
152 "../../../test:test_support",
153 "../../pacing",
154 "../../remote_bitrate_estimator",
155 "../../rtp_rtcp:rtp_rtcp_format",
156 "../network_control",
157 "//testing/gmock",
158 ]
159 if (!build_with_chromium && is_clang) {
160 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
161 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
162 }
163 }
164}