blob: bbf74aba7ccbcb06d55eb56275443291df7c9add [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
kjellanderfb114242016-06-13 00:19:48 -07009import("../../build/webrtc.gni")
10import("//testing/test.gni")
11
brucedawson07df20b2016-05-22 17:15:02 -070012declare_args() {
13 # Set this to true to enable BWE test logging.
kjellander5c1d0432016-06-09 02:40:58 -070014 rtc_enable_bwe_test_logging = false
brucedawson07df20b2016-05-22 17:15:02 -070015}
16
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000017source_set("remote_bitrate_estimator") {
18 sources = [
pbos@webrtc.org9f79fe62014-12-04 15:34:06 +000019 "aimd_rate_control.cc",
20 "aimd_rate_control.h",
stefan64636dd2016-08-03 00:29:03 -070021 "bwe_defines.cc",
kjellander5c1d0432016-06-09 02:40:58 -070022 "include/bwe_defines.h",
23 "include/remote_bitrate_estimator.h",
sprang318673c2015-09-04 04:43:21 -070024 "include/send_time_history.h",
pbos@webrtc.org9f79fe62014-12-04 15:34:06 +000025 "inter_arrival.cc",
26 "inter_arrival.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000027 "overuse_detector.cc",
28 "overuse_detector.h",
pbos@webrtc.org9f79fe62014-12-04 15:34:06 +000029 "overuse_estimator.cc",
30 "overuse_estimator.h",
31 "remote_bitrate_estimator_abs_send_time.cc",
kjellander5c1d0432016-06-09 02:40:58 -070032 "remote_bitrate_estimator_abs_send_time.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000033 "remote_bitrate_estimator_single_stream.cc",
kjellander5c1d0432016-06-09 02:40:58 -070034 "remote_bitrate_estimator_single_stream.h",
Erik Språng6b8d3552015-09-24 15:06:57 +020035 "remote_estimator_proxy.cc",
36 "remote_estimator_proxy.h",
sprang318673c2015-09-04 04:43:21 -070037 "send_time_history.cc",
kjellander5c1d0432016-06-09 02:40:58 -070038 "test/bwe_test_logging.h",
Erik Språng6b8d3552015-09-24 15:06:57 +020039 "transport_feedback_adapter.cc",
40 "transport_feedback_adapter.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000041 ]
kjellander@webrtc.org9bef5512014-07-13 09:02:54 +000042
kjellander5c1d0432016-06-09 02:40:58 -070043 if (rtc_enable_bwe_test_logging) {
44 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
brucedawson07df20b2016-05-22 17:15:02 -070045 sources += [ "test/bwe_test_logging.cc" ]
kjellander5c1d0432016-06-09 02:40:58 -070046 } else {
47 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
brucedawson07df20b2016-05-22 17:15:02 -070048 }
49
Henrik Kjellanderd4070c62016-06-09 11:55:29 +020050 configs += [ "../..:common_config" ]
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +000051 public_configs = [ "../..:common_inherited_config" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000052
53 if (is_clang) {
kjellanderfb114242016-06-13 00:19:48 -070054 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000055 configs -= [ "//build/config/clang:find_bad_constructs" ]
56 }
kjellander5c1d0432016-06-09 02:40:58 -070057
58 deps = [
59 "../..:webrtc_common",
Henrik Kjellanderd4070c62016-06-09 11:55:29 +020060 "../../base:rtc_base_approved",
kjellander5c1d0432016-06-09 02:40:58 -070061 "../../system_wrappers",
62 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000063}
kjellanderfb114242016-06-13 00:19:48 -070064
65if (rtc_include_tests) {
66 source_set("bwe_simulator") {
67 testonly = true
68 sources = [
69 "test/bwe.cc",
70 "test/bwe.h",
71 "test/bwe_test.cc",
72 "test/bwe_test.h",
73 "test/bwe_test_baselinefile.cc",
74 "test/bwe_test_baselinefile.h",
75 "test/bwe_test_fileutils.cc",
76 "test/bwe_test_fileutils.h",
77 "test/bwe_test_framework.cc",
78 "test/bwe_test_framework.h",
79 "test/bwe_test_logging.h",
80 "test/estimators/nada.cc",
81 "test/estimators/nada.h",
82 "test/estimators/remb.cc",
83 "test/estimators/remb.h",
84 "test/estimators/send_side.cc",
85 "test/estimators/send_side.h",
86 "test/estimators/tcp.cc",
87 "test/estimators/tcp.h",
88 "test/metric_recorder.cc",
89 "test/metric_recorder.h",
90 "test/packet.h",
91 "test/packet_receiver.cc",
92 "test/packet_receiver.h",
93 "test/packet_sender.cc",
94 "test/packet_sender.h",
95 ]
96
97 if (rtc_enable_bwe_test_logging) {
98 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
99 sources += [ "test/bwe_test_logging.cc" ]
100 } else {
101 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
102 }
103
104 configs += [ "../..:common_config" ]
105 public_configs = [ "../..:common_inherited_config" ]
106
107 if (is_clang) {
108 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
109 configs -= [ "//build/config/clang:find_bad_constructs" ]
110 }
111
112 if (is_win) {
113 cflags = [
114 # TODO(kjellander): Bug 261: fix this warning.
115 "/wd4373", # virtual function override.
116 ]
117 }
118
119 deps = [
120 "../../test:test_support",
121 "../pacing",
122 "//testing/gmock",
123 "//testing/gtest",
124 ]
125 }
126}