Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 1 | # 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 | |
mbonadei | 9aa3f0a | 2017-01-24 06:58:22 -0800 | [diff] [blame] | 9 | import("../../webrtc.gni") |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 10 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 11 | rtc_static_library("congestion_controller") { |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 12 | sources = [ |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame^] | 13 | "acknowledged_bitrate_estimator.cc", |
| 14 | "acknowledged_bitrate_estimator.h", |
| 15 | "bitrate_estimator.cc", |
| 16 | "bitrate_estimator.h", |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 17 | "congestion_controller.cc", |
philipel | 863a826 | 2016-06-17 09:21:34 -0700 | [diff] [blame] | 18 | "delay_based_bwe.cc", |
| 19 | "delay_based_bwe.h", |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 20 | "include/congestion_controller.h", |
nisse | 559af38 | 2017-03-21 06:41:12 -0700 | [diff] [blame] | 21 | "include/receive_side_congestion_controller.h", |
| 22 | "include/send_side_congestion_controller.h", |
terelius | 5a38836 | 2016-12-09 05:50:01 -0800 | [diff] [blame] | 23 | "median_slope_estimator.cc", |
| 24 | "median_slope_estimator.h", |
philipel | 233c4ba | 2016-08-01 08:49:04 -0700 | [diff] [blame] | 25 | "probe_bitrate_estimator.cc", |
| 26 | "probe_bitrate_estimator.h", |
Irfan Sheriff | b2540bb | 2016-09-12 12:28:54 -0700 | [diff] [blame] | 27 | "probe_controller.cc", |
| 28 | "probe_controller.h", |
nisse | 559af38 | 2017-03-21 06:41:12 -0700 | [diff] [blame] | 29 | "receive_side_congestion_controller.cc", |
| 30 | "send_side_congestion_controller.cc", |
Stefan Holmer | 280de9e | 2016-09-30 10:06:51 +0200 | [diff] [blame] | 31 | "transport_feedback_adapter.cc", |
| 32 | "transport_feedback_adapter.h", |
terelius | afaef8b | 2016-11-17 03:48:18 -0800 | [diff] [blame] | 33 | "trendline_estimator.cc", |
| 34 | "trendline_estimator.h", |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 35 | ] |
| 36 | |
terelius | afaef8b | 2016-11-17 03:48:18 -0800 | [diff] [blame] | 37 | if (rtc_enable_bwe_test_logging) { |
| 38 | defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ] |
| 39 | } else { |
| 40 | defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ] |
| 41 | } |
| 42 | |
kjellander | 8f4419b | 2016-06-02 02:09:52 -0700 | [diff] [blame] | 43 | # TODO(jschuh): Bug 1348: fix this warning. |
| 44 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 45 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 46 | if (!build_with_chromium && is_clang) { |
| 47 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 48 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | deps = [ |
mbonadei | 1140f97 | 2017-04-26 03:38:35 -0700 | [diff] [blame] | 52 | "..:module_api", |
mbonadei | 49f465f | 2016-12-28 04:43:46 -0800 | [diff] [blame] | 53 | "../..:webrtc_common", |
ehmaldonado | 370dd47 | 2017-07-10 05:58:42 -0700 | [diff] [blame] | 54 | "../../base:rtc_base", |
| 55 | "../../base:rtc_base_approved", |
| 56 | "../../base:rtc_numerics", |
terelius | 0baf55d | 2017-02-17 03:38:28 -0800 | [diff] [blame] | 57 | "../../logging:rtc_event_log_api", |
mbonadei | 49f465f | 2016-12-28 04:43:46 -0800 | [diff] [blame] | 58 | "../../system_wrappers", |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 59 | "../bitrate_controller", |
| 60 | "../pacing", |
mbonadei | 49f465f | 2016-12-28 04:43:46 -0800 | [diff] [blame] | 61 | "../remote_bitrate_estimator", |
| 62 | "../rtp_rtcp", |
| 63 | "../utility", |
Stefan Holmer | 80e1207 | 2016-02-23 13:30:42 +0100 | [diff] [blame] | 64 | ] |
| 65 | } |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 66 | |
| 67 | if (rtc_include_tests) { |
| 68 | rtc_source_set("congestion_controller_unittests") { |
| 69 | testonly = true |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 70 | |
| 71 | # Skip restricting visibility on mobile platforms since the tests on those |
| 72 | # gets additional generated targets which would require many lines here to |
| 73 | # cover (which would be confusing to read and hard to maintain). |
| 74 | if (!is_android && !is_ios) { |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 75 | visibility = [ "..:modules_unittests" ] |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 76 | } |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 77 | sources = [ |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame^] | 78 | "acknowledged_bitrate_estimator_unittest.cc", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 79 | "congestion_controller_unittest.cc", |
elad.alon | 5bbf43f | 2017-03-09 06:40:08 -0800 | [diff] [blame] | 80 | "congestion_controller_unittests_helper.cc", |
| 81 | "congestion_controller_unittests_helper.h", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 82 | "delay_based_bwe_unittest.cc", |
| 83 | "delay_based_bwe_unittest_helper.cc", |
| 84 | "delay_based_bwe_unittest_helper.h", |
| 85 | "median_slope_estimator_unittest.cc", |
| 86 | "probe_bitrate_estimator_unittest.cc", |
| 87 | "probe_controller_unittest.cc", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 88 | "transport_feedback_adapter_unittest.cc", |
| 89 | "trendline_estimator_unittest.cc", |
| 90 | ] |
| 91 | deps = [ |
| 92 | ":congestion_controller", |
zstein | 7cb69d5 | 2017-05-08 11:52:38 -0700 | [diff] [blame] | 93 | ":mock_congestion_controller", |
ehmaldonado | 370dd47 | 2017-07-10 05:58:42 -0700 | [diff] [blame] | 94 | "../../base:rtc_base", |
| 95 | "../../base:rtc_base_approved", |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame^] | 96 | "../../base:rtc_base_tests_utils", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 97 | "../../system_wrappers:system_wrappers", |
| 98 | "../../test:field_trial", |
| 99 | "../../test:test_support", |
| 100 | "../bitrate_controller:bitrate_controller", |
| 101 | "../pacing:pacing", |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 102 | "../remote_bitrate_estimator:mock_remote_bitrate_observer", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 103 | "../remote_bitrate_estimator:remote_bitrate_estimator", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 104 | "../rtp_rtcp:rtp_rtcp", |
| 105 | "//testing/gmock", |
| 106 | ] |
| 107 | if (!build_with_chromium && is_clang) { |
| 108 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 109 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 110 | } |
| 111 | } |
zstein | 7cb69d5 | 2017-05-08 11:52:38 -0700 | [diff] [blame] | 112 | |
| 113 | rtc_source_set("mock_congestion_controller") { |
| 114 | testonly = true |
| 115 | sources = [ |
| 116 | "include/mock/mock_congestion_observer.h", |
| 117 | "include/mock/mock_send_side_congestion_controller.h", |
| 118 | ] |
| 119 | deps = [ |
| 120 | ":congestion_controller", |
| 121 | "../../test:test_support", |
| 122 | ] |
| 123 | } |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 124 | } |