xref: /aosp_15_r20/external/webrtc/modules/remote_bitrate_estimator/BUILD.gn (revision d9f758449e529ab9291ac668be2861e7a55c2422)
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_library("remote_bitrate_estimator") {
12  sources = [
13    "aimd_rate_control.cc",
14    "aimd_rate_control.h",
15    "bwe_defines.cc",
16    "include/bwe_defines.h",
17    "include/remote_bitrate_estimator.h",
18    "inter_arrival.cc",
19    "inter_arrival.h",
20    "overuse_detector.cc",
21    "overuse_detector.h",
22    "overuse_estimator.cc",
23    "overuse_estimator.h",
24    "packet_arrival_map.cc",
25    "packet_arrival_map.h",
26    "remote_bitrate_estimator_abs_send_time.cc",
27    "remote_bitrate_estimator_abs_send_time.h",
28    "remote_bitrate_estimator_single_stream.cc",
29    "remote_bitrate_estimator_single_stream.h",
30    "remote_estimator_proxy.cc",
31    "remote_estimator_proxy.h",
32    "test/bwe_test_logging.h",
33  ]
34
35  if (rtc_enable_bwe_test_logging) {
36    defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
37
38    sources += [ "test/bwe_test_logging.cc" ]
39  } else {
40    defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
41  }
42
43  deps = [
44    "../../api:field_trials_view",
45    "../../api:network_state_predictor_api",
46    "../../api:rtp_headers",
47    "../../api/transport:field_trial_based_config",
48    "../../api/transport:network_control",
49    "../../api/units:data_rate",
50    "../../api/units:data_size",
51    "../../api/units:time_delta",
52    "../../api/units:timestamp",
53    "../../modules:module_api",
54    "../../modules:module_api_public",
55    "../../modules/congestion_controller/goog_cc:link_capacity_estimator",
56    "../../modules/rtp_rtcp:rtp_rtcp_format",
57    "../../rtc_base:checks",
58    "../../rtc_base:logging",
59    "../../rtc_base:macromagic",
60    "../../rtc_base:platform_thread",
61    "../../rtc_base:race_checker",
62    "../../rtc_base:rate_statistics",
63    "../../rtc_base:rtc_numerics",
64    "../../rtc_base:safe_minmax",
65    "../../rtc_base:stringutils",
66    "../../rtc_base/experiments:field_trial_parser",
67    "../../rtc_base/synchronization:mutex",
68    "../../system_wrappers",
69    "../../system_wrappers:field_trial",
70    "../../system_wrappers:metrics",
71  ]
72  absl_deps = [
73    "//third_party/abseil-cpp/absl/strings",
74    "//third_party/abseil-cpp/absl/types:optional",
75  ]
76}
77
78if (!build_with_chromium) {
79  rtc_library("bwe_rtp") {
80    testonly = true
81    sources = [
82      "tools/bwe_rtp.cc",
83      "tools/bwe_rtp.h",
84    ]
85    deps = [
86      "../../test:rtp_test_utils",
87      "../rtp_rtcp:rtp_rtcp_format",
88    ]
89    absl_deps = [
90      "//third_party/abseil-cpp/absl/flags:flag",
91      "//third_party/abseil-cpp/absl/flags:parse",
92    ]
93  }
94
95  rtc_executable("rtp_to_text") {
96    testonly = true
97    sources = [ "tools/rtp_to_text.cc" ]
98    deps = [
99      ":bwe_rtp",
100      "../../rtc_base:macromagic",
101      "../../rtc_base:stringutils",
102      "../../test:rtp_test_utils",
103      "../rtp_rtcp:rtp_rtcp_format",
104    ]
105  }
106}
107
108if (rtc_include_tests) {
109  rtc_library("remote_bitrate_estimator_unittests") {
110    testonly = true
111
112    sources = [
113      "aimd_rate_control_unittest.cc",
114      "inter_arrival_unittest.cc",
115      "overuse_detector_unittest.cc",
116      "packet_arrival_map_test.cc",
117      "remote_bitrate_estimator_abs_send_time_unittest.cc",
118      "remote_bitrate_estimator_single_stream_unittest.cc",
119      "remote_bitrate_estimator_unittest_helper.cc",
120      "remote_bitrate_estimator_unittest_helper.h",
121      "remote_estimator_proxy_unittest.cc",
122    ]
123    deps = [
124      ":remote_bitrate_estimator",
125      "..:module_api_public",
126      "../../api/transport:field_trial_based_config",
127      "../../api/transport:mock_network_control",
128      "../../api/transport:network_control",
129      "../../api/units:data_rate",
130      "../../api/units:data_size",
131      "../../api/units:time_delta",
132      "../../api/units:timestamp",
133      "../../rtc_base",
134      "../../rtc_base:checks",
135      "../../rtc_base:random",
136      "../../system_wrappers",
137      "../../test:field_trial",
138      "../../test:fileutils",
139      "../../test:test_support",
140      "../pacing",
141      "../rtp_rtcp:rtp_rtcp_format",
142    ]
143  }
144}
145