blob: 7dcf2360c2965d27dc5170bc03a6bfd4fbbcf401 [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",
kjellander5c1d0432016-06-09 02:40:58 -070021 "include/bwe_defines.h",
22 "include/remote_bitrate_estimator.h",
sprang318673c2015-09-04 04:43:21 -070023 "include/send_time_history.h",
pbos@webrtc.org9f79fe62014-12-04 15:34:06 +000024 "inter_arrival.cc",
25 "inter_arrival.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000026 "overuse_detector.cc",
27 "overuse_detector.h",
pbos@webrtc.org9f79fe62014-12-04 15:34:06 +000028 "overuse_estimator.cc",
29 "overuse_estimator.h",
30 "remote_bitrate_estimator_abs_send_time.cc",
kjellander5c1d0432016-06-09 02:40:58 -070031 "remote_bitrate_estimator_abs_send_time.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000032 "remote_bitrate_estimator_single_stream.cc",
kjellander5c1d0432016-06-09 02:40:58 -070033 "remote_bitrate_estimator_single_stream.h",
Erik Språng6b8d3552015-09-24 15:06:57 +020034 "remote_estimator_proxy.cc",
35 "remote_estimator_proxy.h",
sprang318673c2015-09-04 04:43:21 -070036 "send_time_history.cc",
kjellander5c1d0432016-06-09 02:40:58 -070037 "test/bwe_test_logging.h",
Erik Språng6b8d3552015-09-24 15:06:57 +020038 "transport_feedback_adapter.cc",
39 "transport_feedback_adapter.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000040 ]
kjellander@webrtc.org9bef5512014-07-13 09:02:54 +000041
kjellander5c1d0432016-06-09 02:40:58 -070042 if (rtc_enable_bwe_test_logging) {
43 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
brucedawson07df20b2016-05-22 17:15:02 -070044 sources += [ "test/bwe_test_logging.cc" ]
kjellander5c1d0432016-06-09 02:40:58 -070045 } else {
46 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
brucedawson07df20b2016-05-22 17:15:02 -070047 }
48
Henrik Kjellanderd4070c62016-06-09 11:55:29 +020049 configs += [ "../..:common_config" ]
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +000050 public_configs = [ "../..:common_inherited_config" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000051
52 if (is_clang) {
kjellanderfb114242016-06-13 00:19:48 -070053 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000054 configs -= [ "//build/config/clang:find_bad_constructs" ]
55 }
kjellander5c1d0432016-06-09 02:40:58 -070056
57 deps = [
58 "../..:webrtc_common",
Henrik Kjellanderd4070c62016-06-09 11:55:29 +020059 "../../base:rtc_base_approved",
kjellander5c1d0432016-06-09 02:40:58 -070060 "../../system_wrappers",
61 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000062}
kjellanderfb114242016-06-13 00:19:48 -070063
64if (rtc_include_tests) {
65 source_set("bwe_simulator") {
66 testonly = true
67 sources = [
68 "test/bwe.cc",
69 "test/bwe.h",
70 "test/bwe_test.cc",
71 "test/bwe_test.h",
72 "test/bwe_test_baselinefile.cc",
73 "test/bwe_test_baselinefile.h",
74 "test/bwe_test_fileutils.cc",
75 "test/bwe_test_fileutils.h",
76 "test/bwe_test_framework.cc",
77 "test/bwe_test_framework.h",
78 "test/bwe_test_logging.h",
79 "test/estimators/nada.cc",
80 "test/estimators/nada.h",
81 "test/estimators/remb.cc",
82 "test/estimators/remb.h",
83 "test/estimators/send_side.cc",
84 "test/estimators/send_side.h",
85 "test/estimators/tcp.cc",
86 "test/estimators/tcp.h",
87 "test/metric_recorder.cc",
88 "test/metric_recorder.h",
89 "test/packet.h",
90 "test/packet_receiver.cc",
91 "test/packet_receiver.h",
92 "test/packet_sender.cc",
93 "test/packet_sender.h",
94 ]
95
96 if (rtc_enable_bwe_test_logging) {
97 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
98 sources += [ "test/bwe_test_logging.cc" ]
99 } else {
100 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
101 }
102
103 configs += [ "../..:common_config" ]
104 public_configs = [ "../..:common_inherited_config" ]
105
106 if (is_clang) {
107 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
108 configs -= [ "//build/config/clang:find_bad_constructs" ]
109 }
110
111 if (is_win) {
112 cflags = [
113 # TODO(kjellander): Bug 261: fix this warning.
114 "/wd4373", # virtual function override.
115 ]
116 }
117
118 deps = [
119 "../../test:test_support",
120 "../pacing",
121 "//testing/gmock",
122 "//testing/gtest",
123 ]
124 }
125}