1# Copyright (c) 2018 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("pcc") {
12  sources = [
13    "pcc_factory.cc",
14    "pcc_factory.h",
15  ]
16  deps = [
17    ":pcc_controller",
18    "../../../api/transport:network_control",
19    "../../../api/units:time_delta",
20    "../../../rtc_base:rtc_base_approved",
21  ]
22}
23
24rtc_library("pcc_controller") {
25  sources = [
26    "pcc_network_controller.cc",
27    "pcc_network_controller.h",
28  ]
29  deps = [
30    ":bitrate_controller",
31    ":monitor_interval",
32    ":rtt_tracker",
33    "../../../api/transport:network_control",
34    "../../../api/units:data_rate",
35    "../../../api/units:data_size",
36    "../../../api/units:time_delta",
37    "../../../api/units:timestamp",
38    "../../../rtc_base:checks",
39    "../../../rtc_base:rtc_base_approved",
40  ]
41  absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
42}
43
44rtc_library("monitor_interval") {
45  sources = [
46    "monitor_interval.cc",
47    "monitor_interval.h",
48  ]
49  deps = [
50    "../../../api/transport:network_control",
51    "../../../api/units:data_rate",
52    "../../../api/units:data_size",
53    "../../../api/units:time_delta",
54    "../../../api/units:timestamp",
55    "../../../rtc_base:rtc_base_approved",
56  ]
57}
58
59rtc_library("rtt_tracker") {
60  sources = [
61    "rtt_tracker.cc",
62    "rtt_tracker.h",
63  ]
64  deps = [
65    "../../../api/transport:network_control",
66    "../../../api/units:time_delta",
67    "../../../api/units:timestamp",
68    "../../../rtc_base:rtc_base_approved",
69  ]
70}
71
72rtc_library("utility_function") {
73  sources = [
74    "utility_function.cc",
75    "utility_function.h",
76  ]
77  deps = [
78    ":monitor_interval",
79    "../../../api/transport:network_control",
80    "../../../api/units:data_rate",
81    "../../../rtc_base:checks",
82    "../../../rtc_base:rtc_base_approved",
83  ]
84}
85
86rtc_library("bitrate_controller") {
87  sources = [
88    "bitrate_controller.cc",
89    "bitrate_controller.h",
90  ]
91  deps = [
92    ":monitor_interval",
93    ":utility_function",
94    "../../../api/transport:network_control",
95    "../../../api/units:data_rate",
96    "../../../rtc_base:rtc_base_approved",
97  ]
98  absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
99}
100
101if (rtc_include_tests) {
102  rtc_library("pcc_unittests") {
103    testonly = true
104    sources = [
105      "bitrate_controller_unittest.cc",
106      "monitor_interval_unittest.cc",
107      "pcc_network_controller_unittest.cc",
108      "rtt_tracker_unittest.cc",
109      "utility_function_unittest.cc",
110    ]
111    deps = [
112      ":bitrate_controller",
113      ":monitor_interval",
114      ":pcc",
115      ":pcc_controller",
116      ":rtt_tracker",
117      ":utility_function",
118      "../../../api/transport:network_control",
119      "../../../api/units:data_rate",
120      "../../../api/units:data_size",
121      "../../../api/units:time_delta",
122      "../../../api/units:timestamp",
123      "../../../rtc_base:rtc_base_approved",
124      "../../../test:test_support",
125      "../../../test/scenario",
126    ]
127  }
128}
129