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 9import("../../webrtc.gni") 10 11rtc_static_library("congestion_controller") { 12 sources = [ 13 "acknowledged_bitrate_estimator.cc", 14 "acknowledged_bitrate_estimator.h", 15 "bitrate_estimator.cc", 16 "bitrate_estimator.h", 17 "delay_based_bwe.cc", 18 "delay_based_bwe.h", 19 "include/receive_side_congestion_controller.h", 20 "include/send_side_congestion_controller.h", 21 "median_slope_estimator.cc", 22 "median_slope_estimator.h", 23 "probe_bitrate_estimator.cc", 24 "probe_bitrate_estimator.h", 25 "probe_controller.cc", 26 "probe_controller.h", 27 "receive_side_congestion_controller.cc", 28 "send_side_congestion_controller.cc", 29 "transport_feedback_adapter.cc", 30 "transport_feedback_adapter.h", 31 "trendline_estimator.cc", 32 "trendline_estimator.h", 33 ] 34 35 if (rtc_enable_bwe_test_logging) { 36 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ] 37 } else { 38 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ] 39 } 40 41 # TODO(jschuh): Bug 1348: fix this warning. 42 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] 43 44 if (!build_with_chromium && is_clang) { 45 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 46 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 47 } 48 49 deps = [ 50 "..:module_api", 51 "../..:webrtc_common", 52 "../../api:optional", 53 "../../logging:rtc_event_log_api", 54 "../../rtc_base:rtc_base", 55 "../../rtc_base:rtc_base_approved", 56 "../../rtc_base:rtc_numerics", 57 "../../system_wrappers", 58 "../bitrate_controller", 59 "../pacing", 60 "../remote_bitrate_estimator", 61 "../rtp_rtcp", 62 "../utility", 63 ] 64 65 if (!build_with_mozilla) { 66 deps += [ "../../rtc_base:rtc_base" ] 67 } 68} 69 70if (rtc_include_tests) { 71 rtc_source_set("congestion_controller_unittests") { 72 testonly = true 73 74 sources = [ 75 "acknowledged_bitrate_estimator_unittest.cc", 76 "congestion_controller_unittests_helper.cc", 77 "congestion_controller_unittests_helper.h", 78 "delay_based_bwe_unittest.cc", 79 "delay_based_bwe_unittest_helper.cc", 80 "delay_based_bwe_unittest_helper.h", 81 "median_slope_estimator_unittest.cc", 82 "probe_bitrate_estimator_unittest.cc", 83 "probe_controller_unittest.cc", 84 "receive_side_congestion_controller_unittest.cc", 85 "send_side_congestion_controller_unittest.cc", 86 "transport_feedback_adapter_unittest.cc", 87 "trendline_estimator_unittest.cc", 88 ] 89 deps = [ 90 ":congestion_controller", 91 ":mock_congestion_controller", 92 "../../rtc_base:rtc_base", 93 "../../rtc_base:rtc_base_approved", 94 "../../rtc_base:rtc_base_tests_utils", 95 "../../system_wrappers:system_wrappers", 96 "../../test:field_trial", 97 "../../test:test_support", 98 "../bitrate_controller:bitrate_controller", 99 "../pacing:mock_paced_sender", 100 "../pacing:pacing", 101 "../remote_bitrate_estimator:remote_bitrate_estimator", 102 "../rtp_rtcp:rtp_rtcp", 103 "//testing/gmock", 104 ] 105 if (!build_with_chromium && is_clang) { 106 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 107 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 108 } 109 } 110 111 rtc_source_set("mock_congestion_controller") { 112 testonly = true 113 sources = [ 114 "include/mock/mock_congestion_observer.h", 115 "include/mock/mock_send_side_congestion_controller.h", 116 ] 117 deps = [ 118 ":congestion_controller", 119 "../../test:test_support", 120 ] 121 } 122} 123