kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [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") |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 10 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 11 | rtc_static_library("bitrate_controller") { |
mbonadei | 49f465f | 2016-12-28 04:43:46 -0800 | [diff] [blame] | 12 | # TODO(mbonadei): Remove (bugs.webrtc.org/6828) |
| 13 | # Errors on cyclic dependency with: |
| 14 | # congestion_controller:congestion_controller if enabled. |
| 15 | check_includes = false |
| 16 | |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 17 | sources = [ |
| 18 | "bitrate_controller_impl.cc", |
| 19 | "bitrate_controller_impl.h", |
| 20 | "include/bitrate_controller.h", |
| 21 | "send_side_bandwidth_estimation.cc", |
| 22 | "send_side_bandwidth_estimation.h", |
| 23 | ] |
| 24 | |
gaetano.carlucci | 52a5703 | 2016-09-14 05:04:36 -0700 | [diff] [blame] | 25 | if (rtc_enable_bwe_test_logging) { |
| 26 | defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ] |
| 27 | } else { |
| 28 | defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ] |
| 29 | } |
| 30 | |
kjellander | 8f4419b | 2016-06-02 02:09:52 -0700 | [diff] [blame] | 31 | # TODO(jschuh): Bug 1348: fix this warning. |
| 32 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 33 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 34 | if (!build_with_chromium && is_clang) { |
| 35 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 36 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander@webrtc.org | 42ee5b5 | 2014-08-25 14:15:35 +0000 | [diff] [blame] | 37 | } |
| 38 | |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 39 | deps = [ |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 40 | "../../rtc_base:rtc_base_approved", |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 41 | "../../system_wrappers", |
mbonadei | 49f465f | 2016-12-28 04:43:46 -0800 | [diff] [blame] | 42 | "../rtp_rtcp", |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 43 | ] |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 44 | } |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 45 | |
| 46 | if (rtc_include_tests) { |
| 47 | rtc_source_set("bitrate_controller_unittests") { |
| 48 | testonly = true |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 49 | |
| 50 | # Skip restricting visibility on mobile platforms since the tests on those |
| 51 | # gets additional generated targets which would require many lines here to |
| 52 | # cover (which would be confusing to read and hard to maintain). |
| 53 | if (!is_android && !is_ios) { |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 54 | visibility = [ "..:modules_unittests" ] |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 55 | } |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 56 | sources = [ |
| 57 | "bitrate_controller_unittest.cc", |
| 58 | "send_side_bandwidth_estimation_unittest.cc", |
| 59 | ] |
| 60 | deps = [ |
| 61 | ":bitrate_controller", |
| 62 | "../../test:field_trial", |
| 63 | "../../test:test_support", |
mbonadei | 334f9e6 | 2017-09-04 04:57:11 -0700 | [diff] [blame] | 64 | "../pacing:mock_paced_sender", |
ehmaldonado | 3626865 | 2017-01-19 08:27:11 -0800 | [diff] [blame] | 65 | "../remote_bitrate_estimator:remote_bitrate_estimator", |
| 66 | "//testing/gmock", |
| 67 | ] |
| 68 | if (!build_with_chromium && is_clang) { |
| 69 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 70 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 71 | } |
| 72 | } |
| 73 | } |