blob: bbe25fdd14400049392d8cae8bbfc2c631b86f16 [file] [log] [blame]
Henrik Kjellanderc0362762017-06-29 06:03:041# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
Henrik Kjellander73e21802017-06-20 06:38:582#
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
11if (is_android) {
12 import("//build/config/android/config.gni")
13 import("//build/config/android/rules.gni")
14}
15
Oleh Prypindd214742018-07-17 11:49:4616rtc_source_set("protobuf_utils") {
Mirko Bonadeiccbe95f2020-01-21 11:10:1017 sources = [ "protobuf_utils.h" ]
Henrik Kjellanderc0362762017-06-29 06:03:0418 if (rtc_enable_protobuf) {
Mirko Bonadeid8661a02018-08-13 13:04:2519 public_configs = [ "//third_party/protobuf:protobuf_config" ]
Mirko Bonadeiccbe95f2020-01-21 11:10:1020 deps = [ "//third_party/protobuf:protobuf_lite" ]
Henrik Kjellanderc0362762017-06-29 06:03:0421 }
22}
23
Danil Chapovalov5af152c2021-08-31 13:27:5124rtc_source_set("bitstream_reader") {
25 sources = [
26 "bitstream_reader.cc",
27 "bitstream_reader.h",
28 ]
29 deps = [
30 ":checks",
31 ":safe_conversions",
32 "../api:array_view",
Danil Chapovalov5af152c2021-08-31 13:27:5133 "//third_party/abseil-cpp/absl/base:core_headers",
34 "//third_party/abseil-cpp/absl/numeric:bits",
Florent Castelli99c519b2024-05-23 11:21:5335 "//third_party/abseil-cpp/absl/strings:string_view",
Danil Chapovalov5af152c2021-08-31 13:27:5136 ]
37}
38
Oleh Prypindd214742018-07-17 11:49:4639rtc_source_set("compile_assert_c") {
Mirko Bonadeiccbe95f2020-01-21 11:10:1040 sources = [ "compile_assert_c.h" ]
Henrik Kjellanderc0362762017-06-29 06:03:0441}
42
Mirko Bonadei3663ed32019-10-19 10:03:2343rtc_source_set("ignore_wundef") {
Mirko Bonadeiccbe95f2020-01-21 11:10:1044 sources = [ "ignore_wundef.h" ]
Mirko Bonadei3663ed32019-10-19 10:03:2345}
46
Karl Wiberg70026f92020-09-18 08:03:1647rtc_source_set("untyped_function") {
48 sources = [ "untyped_function.h" ]
Karl Wiberg3d452cf2020-09-11 14:09:4649 deps = [ "system:assume" ]
50}
51
Mirko Bonadei3d259352020-10-23 10:04:4052rtc_source_set("callback_list") {
Karl Wiberg3d452cf2020-09-11 14:09:4653 sources = [
Mirko Bonadei3d259352020-10-23 10:04:4054 "callback_list.cc",
55 "callback_list.h",
Karl Wiberg3d452cf2020-09-11 14:09:4656 ]
57 deps = [
Karl Wiberg01a36f32020-11-11 10:48:0458 ":checks",
Karl Wiberg70026f92020-09-18 08:03:1659 ":untyped_function",
Karl Wiberg3d452cf2020-09-11 14:09:4660 "../api:function_view",
61 "system:assume",
Karl Wibergd2c69672020-09-29 11:55:1362 "system:inline",
Tomas Gunnarsson9797dcd2022-04-10 11:27:1363 "system:rtc_export",
Karl Wiberg3d452cf2020-09-11 14:09:4664 ]
65}
66
Florent Castellif9c59842022-04-19 15:07:2367rtc_source_set("buffer") {
68 visibility = [ "*" ]
69 sources = [ "buffer.h" ]
70 deps = [
71 ":checks",
72 ":type_traits",
73 ":zero_memory",
74 "../api:array_view",
Florent Castelli99c519b2024-05-23 11:21:5375 "//third_party/abseil-cpp/absl/strings:string_view",
Florent Castellif9c59842022-04-19 15:07:2376 ]
Florent Castellif9c59842022-04-19 15:07:2377}
78
Florent Castellia876a922022-04-19 15:18:3679rtc_source_set("byte_order") {
80 visibility = [ "*" ]
81 sources = [ "byte_order.h" ]
82 deps = [ "system:arch" ]
83}
84
Florent Castelli31764092022-04-14 11:41:5885rtc_source_set("mod_ops") {
86 visibility = [ "*" ]
87 sources = [ "numerics/mod_ops.h" ]
88 deps = [ ":checks" ]
89}
90
91rtc_source_set("moving_max_counter") {
92 visibility = [ "*" ]
93 sources = [ "numerics/moving_max_counter.h" ]
Florent Castelli8037fc62024-08-29 13:00:4094 deps = [ ":checks" ]
Florent Castelli31764092022-04-14 11:41:5895}
96
Florent Castelli6b608592022-04-14 11:18:0497rtc_source_set("one_time_event") {
98 visibility = [ "*" ]
99 sources = [ "one_time_event.h" ]
100 deps = [ "synchronization:mutex" ]
101}
102
Florent Castellia6c10e32022-04-14 11:08:44103rtc_source_set("strong_alias") {
104 visibility = [ "*" ]
105 sources = [ "strong_alias.h" ]
106}
107
Florent Castellid119b9e2022-04-14 11:23:51108rtc_source_set("swap_queue") {
109 visibility = [ "*" ]
110 sources = [ "swap_queue.h" ]
Florent Castelli99c519b2024-05-23 11:21:53111 deps = [
112 ":checks",
113 "//third_party/abseil-cpp/absl/base:core_headers",
114 ]
Florent Castellid119b9e2022-04-14 11:23:51115}
116
Tommi8d2c5a82018-03-19 10:12:48117rtc_source_set("macromagic") {
118 sources = [
119 "arraysize.h",
Tommi8d2c5a82018-03-19 10:12:48120 "thread_annotations.h",
121 ]
Mirko Bonadeiccbe95f2020-01-21 11:10:10122 deps = [ "system:arch" ]
Tommi8d2c5a82018-03-19 10:12:48123}
124
Florent Castelli7f623b02022-04-14 11:34:56125rtc_library("bit_buffer") {
126 visibility = [ "*" ]
127 sources = [
128 "bit_buffer.cc",
129 "bit_buffer.h",
130 ]
philipel579a7b42023-03-02 10:51:53131 deps = [
132 ":checks",
133 "../api/units:data_size",
philipel579a7b42023-03-02 10:51:53134 "//third_party/abseil-cpp/absl/numeric:bits",
Florent Castelli99c519b2024-05-23 11:21:53135 "//third_party/abseil-cpp/absl/strings:string_view",
philipel579a7b42023-03-02 10:51:53136 ]
Florent Castelli7f623b02022-04-14 11:34:56137}
138
Florent Castelliceb7b362022-04-19 15:35:04139rtc_library("byte_buffer") {
140 visibility = [ "*" ]
141 sources = [
142 "byte_buffer.cc",
143 "byte_buffer.h",
144 ]
145 deps = [
146 ":buffer",
147 ":byte_order",
Per Kcf2e08b2023-11-17 09:05:36148 "../api:array_view",
Per Kcf2e08b2023-11-17 09:05:36149 "//third_party/abseil-cpp/absl/base:core_headers",
Florent Castelli99c519b2024-05-23 11:21:53150 "//third_party/abseil-cpp/absl/strings:string_view",
Per Kcf2e08b2023-11-17 09:05:36151 ]
Florent Castelliceb7b362022-04-19 15:35:04152}
153
Florent Castelli76063752022-04-19 15:14:26154rtc_library("buffer_queue") {
155 visibility = [ "*" ]
156 sources = [
157 "buffer_queue.cc",
158 "buffer_queue.h",
159 ]
160 deps = [
161 ":buffer",
162 ":macromagic",
163 "../api:sequence_checker",
164 "system:no_unique_address",
165 ]
166}
167
Florent Castellied4aadc2022-04-19 15:40:46168rtc_library("copy_on_write_buffer") {
169 visibility = [ "*" ]
170 sources = [
171 "copy_on_write_buffer.cc",
172 "copy_on_write_buffer.h",
173 ]
174 deps = [
175 ":buffer",
176 ":checks",
177 ":refcount",
178 ":type_traits",
179 "../api:scoped_refptr",
180 "system:rtc_export",
Florent Castelli99c519b2024-05-23 11:21:53181 "//third_party/abseil-cpp/absl/strings:string_view",
Florent Castellied4aadc2022-04-19 15:40:46182 ]
183}
184
Florent Castellia30aef32022-04-19 15:47:13185rtc_library("event_tracer") {
186 visibility = [ "*" ]
187 sources = [
188 "event_tracer.cc",
189 "event_tracer.h",
190 "trace_event.h",
191 ]
192 deps = [
Florent Castellia30aef32022-04-19 15:47:13193 ":checks",
194 ":logging",
195 ":macromagic",
196 ":platform_thread",
197 ":platform_thread_types",
198 ":rtc_event",
199 ":timeutils",
Evan Shrubsolecd098582024-04-30 07:57:49200 "..:tracing",
Florent Castellia30aef32022-04-19 15:47:13201 "../api:sequence_checker",
202 "synchronization:mutex",
203 "system:rtc_export",
Florent Castelli99c519b2024-05-23 11:21:53204 "//third_party/abseil-cpp/absl/strings:string_view",
Florent Castellia30aef32022-04-19 15:47:13205 ]
Evan Shrubsoledb50b032024-04-24 13:27:00206 if (rtc_use_perfetto) {
207 sources += [
208 "trace_categories.cc",
209 "trace_categories.h",
210 ]
Evan Shrubsoledb50b032024-04-24 13:27:00211 }
Florent Castellia30aef32022-04-19 15:47:13212}
213
Florent Castelli17296422022-04-14 11:48:10214rtc_library("histogram_percentile_counter") {
215 visibility = [ "*" ]
216 sources = [
217 "numerics/histogram_percentile_counter.cc",
218 "numerics/histogram_percentile_counter.h",
219 ]
Florent Castelli8037fc62024-08-29 13:00:40220 deps = [ ":checks" ]
Florent Castelli17296422022-04-14 11:48:10221}
222
Florent Castelli7f623b02022-04-14 11:34:56223rtc_library("race_checker") {
224 visibility = [ "*" ]
225 sources = [
226 "race_checker.cc",
227 "race_checker.h",
228 ]
229 deps = [
230 ":checks",
231 ":macromagic",
232 ":platform_thread_types",
233 ]
234}
235
Florent Castelli71337f32022-04-14 10:41:26236rtc_library("random") {
237 visibility = [ "*" ]
238 sources = [
239 "random.cc",
240 "random.h",
241 ]
242 deps = [
243 ":checks",
244 ":safe_conversions",
245 ]
246}
247
Danil Chapovalove546ff92023-07-21 12:06:20248rtc_library("bitrate_tracker") {
249 visibility = [ "*" ]
250 sources = [
251 "bitrate_tracker.cc",
252 "bitrate_tracker.h",
253 ]
254 deps = [
255 ":rate_statistics",
256 "../api/units:data_rate",
257 "../api/units:data_size",
258 "../api/units:time_delta",
259 "../api/units:timestamp",
260 "system:rtc_export",
261 ]
Danil Chapovalove546ff92023-07-21 12:06:20262}
263
264rtc_library("frequency_tracker") {
265 visibility = [ "*" ]
266 sources = [
267 "frequency_tracker.cc",
268 "frequency_tracker.h",
269 ]
270 deps = [
271 ":rate_statistics",
272 "../api/units:frequency",
273 "../api/units:time_delta",
274 "../api/units:timestamp",
275 "system:rtc_export",
276 ]
Danil Chapovalove546ff92023-07-21 12:06:20277}
278
Florent Castelli6bb1fd32022-04-19 13:58:39279rtc_library("rate_statistics") {
Danil Chapovalove546ff92023-07-21 12:06:20280 # TODO(bugs.webrtc.org/13756): Restrict visibility to private when all usage
281 # of the RateStatistics is migrated to BitrateTracker and FrequencyTracker.
Florent Castelli6bb1fd32022-04-19 13:58:39282 visibility = [ "*" ]
283 sources = [
284 "rate_statistics.cc",
285 "rate_statistics.h",
286 ]
287 deps = [
288 ":checks",
289 ":logging",
290 ":safe_conversions",
291 "system:rtc_export",
292 ]
Florent Castelli6bb1fd32022-04-19 13:58:39293}
294
Florent Castelli58cc4682022-04-19 13:50:28295rtc_library("rate_tracker") {
296 visibility = [ "*" ]
297 sources = [
298 "rate_tracker.cc",
299 "rate_tracker.h",
300 ]
301 deps = [
302 ":checks",
303 ":timeutils",
304 ]
305}
306
Florent Castelli83a36d42022-04-14 11:44:39307rtc_library("sample_counter") {
308 visibility = [ "*" ]
309 sources = [
310 "numerics/sample_counter.cc",
311 "numerics/sample_counter.h",
312 ]
313 deps = [
314 ":checks",
315 ":safe_conversions",
316 ]
Florent Castelli83a36d42022-04-14 11:44:39317}
318
Florent Castellib1dc4e42022-04-14 11:20:12319rtc_library("timestamp_aligner") {
320 visibility = [ "*" ]
321 sources = [
322 "timestamp_aligner.cc",
323 "timestamp_aligner.h",
324 ]
325 deps = [
326 ":checks",
327 ":logging",
328 ":timeutils",
329 "system:rtc_export",
330 ]
331}
332
Florent Castellid119b9e2022-04-14 11:23:51333rtc_library("zero_memory") {
334 visibility = [ "*" ]
335 sources = [
336 "zero_memory.cc",
337 "zero_memory.h",
338 ]
339 deps = [
340 ":checks",
341 "../api:array_view",
342 ]
343}
344
Mirko Bonadei86d053c2019-10-17 19:32:04345rtc_library("platform_thread_types") {
Tommi8d2c5a82018-03-19 10:12:48346 sources = [
347 "platform_thread_types.cc",
348 "platform_thread_types.h",
349 ]
Mirko Bonadeid4096212022-11-24 08:01:35350 deps = [
351 ":checks",
352 ":macromagic",
353 ]
Tommi8d2c5a82018-03-19 10:12:48354}
355
Tommi8d2c5a82018-03-19 10:12:48356rtc_source_set("refcount") {
Mirko Bonadeica14a3a2018-08-09 07:47:12357 visibility = [ "*" ]
Tommi8d2c5a82018-03-19 10:12:48358 sources = [
Steve Anton10542f22019-01-11 17:11:00359 "ref_count.h",
360 "ref_counted_object.h",
361 "ref_counter.h",
Tommi8d2c5a82018-03-19 10:12:48362 ]
Tomas Gunnarssond7842002021-04-22 15:41:33363 deps = [
364 ":macromagic",
Harald Alvestrandd6bac612023-10-31 11:42:45365 "../api:ref_count",
Tomas Gunnarssond7842002021-04-22 15:41:33366 "../api:scoped_refptr",
367 ]
Tommi8d2c5a82018-03-19 10:12:48368}
369
Mirko Bonadei86d053c2019-10-17 19:32:04370rtc_library("criticalsection") {
Tommi8d2c5a82018-03-19 10:12:48371 sources = [
Markus Handell3cb525b2020-07-16 14:16:09372 "deprecated/recursive_critical_section.cc",
373 "deprecated/recursive_critical_section.h",
Tommi8d2c5a82018-03-19 10:12:48374 ]
375 deps = [
Tommi8d2c5a82018-03-19 10:12:48376 ":checks",
377 ":macromagic",
378 ":platform_thread_types",
Markus Handellf70fbc82020-06-03 22:41:20379 "synchronization:yield",
Niels Möllera12c42a2018-07-25 14:05:48380 "system:unused",
Tommi8d2c5a82018-03-19 10:12:48381 ]
382}
383
Mirko Bonadei86d053c2019-10-17 19:32:04384rtc_library("platform_thread") {
Tommi8d2c5a82018-03-19 10:12:48385 sources = [
386 "platform_thread.cc",
387 "platform_thread.h",
388 ]
389 deps = [
Tommi8d2c5a82018-03-19 10:12:48390 ":checks",
391 ":macromagic",
392 ":platform_thread_types",
393 ":rtc_event",
Tommi8d2c5a82018-03-19 10:12:48394 ":timeutils",
Artem Titovd15a5752021-02-10 13:31:24395 "../api:sequence_checker",
Florent Castelli99c519b2024-05-23 11:21:53396 "//third_party/abseil-cpp/absl/strings:string_view",
Markus Handell97c44582021-04-20 15:41:54397 ]
Tommi8d2c5a82018-03-19 10:12:48398}
399
Mirko Bonadei86d053c2019-10-17 19:32:04400rtc_library("rtc_event") {
Tommi8d2c5a82018-03-19 10:12:48401 if (build_with_chromium) {
402 sources = [
403 "../../webrtc_overrides/rtc_base/event.cc",
404 "../../webrtc_overrides/rtc_base/event.h",
405 ]
Karl Wiberg98417032019-03-24 18:12:40406 deps = [
407 ":checks",
Markus Handell211ecb42022-08-16 13:31:26408 "../api/units:time_delta",
Mirko Bonadeid4002a72019-11-12 19:11:48409 "system:rtc_export", # Only Chromium's rtc::Event use RTC_EXPORT.
Karl Wiberg98417032019-03-24 18:12:40410 "//base", # Dependency on chromium's waitable_event.
411 ]
Tommi8d2c5a82018-03-19 10:12:48412 } else {
413 sources = [
414 "event.cc",
415 "event.h",
416 ]
Karl Wiberg98417032019-03-24 18:12:40417 deps = [
418 ":checks",
Markus Handell1d5be492022-08-18 13:49:09419 ":timeutils",
420 "../api/units:time_delta",
Karl Wiberg98417032019-03-24 18:12:40421 "synchronization:yield_policy",
422 "system:warn_current_thread_is_deadlocked",
423 ]
Tommi8d2c5a82018-03-19 10:12:48424 }
Tommi8d2c5a82018-03-19 10:12:48425}
426
Mirko Bonadeicb03e382022-02-10 13:27:57427config("chromium_logging_config") {
Danil Chapovalove6106102022-02-16 11:29:02428 defines = [ "LOGGING_INSIDE_WEBRTC" ]
Mirko Bonadeicb03e382022-02-10 13:27:57429}
430
Mirko Bonadei86d053c2019-10-17 19:32:04431rtc_library("logging") {
Mirko Bonadei2ad8c432018-08-09 08:54:40432 visibility = [ "*" ]
Patrik Höglund77301932018-10-09 13:09:51433 libs = []
Tommi8d2c5a82018-03-19 10:12:48434 deps = [
Yves Gerey988cc082018-10-23 10:03:01435 ":checks",
Tommi8d2c5a82018-03-19 10:12:48436 ":macromagic",
437 ":platform_thread_types",
438 ":stringutils",
439 ":timeutils",
Mirko Bonadei96191f82022-08-03 08:12:33440 "../api/units:timestamp",
Markus Handellde8a9352020-06-10 13:40:42441 "synchronization:mutex",
Danil Chapovalovef98ae62019-10-11 15:18:29442 "//third_party/abseil-cpp/absl/base:core_headers",
Sebastian Janssonf4e085a2019-05-20 16:34:07443 "//third_party/abseil-cpp/absl/meta:type_traits",
Florent Castelli99c519b2024-05-23 11:21:53444 "//third_party/abseil-cpp/absl/strings:string_view",
Tommi8d2c5a82018-03-19 10:12:48445 ]
446
447 if (build_with_chromium) {
448 # Dependency on chromium's logging (in //base).
Artem Titov94b57c02019-03-21 12:35:10449 deps += [ "//base" ]
Tommi8d2c5a82018-03-19 10:12:48450 sources = [
451 "../../webrtc_overrides/rtc_base/logging.cc",
452 "../../webrtc_overrides/rtc_base/logging.h",
453 ]
Danil Chapovalove6106102022-02-16 11:29:02454
Mirko Bonadeicb03e382022-02-10 13:27:57455 # This macro needs to be both present in all WebRTC targets (see its
456 # definition in //BUILD.gn but also propagated to all the targets
457 # depending on the Chromium component defined in
458 # //third_party/webrtc_overrides:webrtc_component. This public_config
459 # allows GN to propagate the macro accordingly.
Danil Chapovalove6106102022-02-16 11:29:02460 public_configs = [ ":chromium_logging_config" ]
Tommi8d2c5a82018-03-19 10:12:48461 } else {
462 sources = [
463 "logging.cc",
464 "logging.h",
465 ]
Karl Wibergcefc4652018-05-23 21:20:38466 deps += [ "system:inline" ]
Tommi8d2c5a82018-03-19 10:12:48467
Mirko Bonadei99a70a22018-10-09 14:45:14468 if (is_mac) {
Sylvain Defresnec7f0dff2020-07-03 08:19:30469 frameworks = [ "Foundation.framework" ]
Mirko Bonadei99a70a22018-10-09 14:45:14470 }
471
Patrik Höglund77301932018-10-09 13:09:51472 if (is_android) {
473 libs += [ "log" ]
474 }
Tommi8d2c5a82018-03-19 10:12:48475 }
476}
477
Mirko Bonadei86d053c2019-10-17 19:32:04478rtc_library("checks") {
Mirko Bonadei2ad8c432018-08-09 08:54:40479 # TODO(bugs.webrtc.org/9607): This should not be public.
480 visibility = [ "*" ]
Patrik Höglund77301932018-10-09 13:09:51481 libs = []
Patrik Höglunda8005cf2017-12-13 15:05:42482 sources = [
483 "checks.cc",
484 "checks.h",
485 ]
486 deps = [
487 ":safe_compare",
Niels Möller94327682022-04-28 11:20:29488 "../api:scoped_refptr",
Jonas Olssonf8e5c112018-06-14 11:14:22489 "system:inline",
Mirko Bonadei35214fc2019-09-23 12:54:28490 "system:rtc_export",
Florent Castelli99c519b2024-05-23 11:21:53491 "//third_party/abseil-cpp/absl/meta:type_traits",
492 "//third_party/abseil-cpp/absl/strings:string_view",
Mirko Bonadei2dcf3482020-06-05 12:30:41493 ]
Peter Boströmd6e861d2022-07-29 20:44:21494 if (build_with_chromium) {
495 sources += [ "../../webrtc_overrides/rtc_base/checks_overrides.cc" ]
496 deps += [ "//base" ]
497 }
Patrik Höglund77301932018-10-09 13:09:51498 if (is_android) {
499 libs += [ "log" ]
500 }
Patrik Höglunda8005cf2017-12-13 15:05:42501}
502
Mirko Bonadei86d053c2019-10-17 19:32:04503rtc_library("rate_limiter") {
Patrik Höglunda8005cf2017-12-13 15:05:42504 sources = [
Patrik Höglund3e113432017-12-15 13:40:10505 "rate_limiter.cc",
506 "rate_limiter.h",
507 ]
508 deps = [
Florent Castelli4467ad72022-04-04 13:18:46509 ":macromagic",
Florent Castelli6bb1fd32022-04-19 13:58:39510 ":rate_statistics",
Patrik Höglund3e113432017-12-15 13:40:10511 "../system_wrappers",
Markus Handell18523c32020-07-08 15:55:58512 "synchronization:mutex",
Patrik Höglunda8005cf2017-12-13 15:05:42513 ]
514}
515
516rtc_source_set("sanitizer") {
Mirko Bonadeiccbe95f2020-01-21 11:10:10517 sources = [ "sanitizer.h" ]
Florent Castelli99c519b2024-05-23 11:21:53518 deps = [ "//third_party/abseil-cpp/absl/meta:type_traits" ]
Patrik Höglunda8005cf2017-12-13 15:05:42519}
520
Karl Wibergc1269372020-03-02 19:23:41521rtc_source_set("bounded_inline_vector") {
522 public = [ "bounded_inline_vector.h" ]
523 sources = [ "bounded_inline_vector_impl.h" ]
524 deps = [ ":checks" ]
525}
526
Danil Chapovalov33b83fd2019-09-18 13:48:23527rtc_source_set("divide_round") {
Mirko Bonadeiccbe95f2020-01-21 11:10:10528 sources = [ "numerics/divide_round.h" ]
Danil Chapovalov33b83fd2019-09-18 13:48:23529 deps = [
530 ":checks",
531 ":safe_compare",
532 ]
533}
534
Patrik Höglunda8005cf2017-12-13 15:05:42535rtc_source_set("safe_compare") {
Mirko Bonadeiccbe95f2020-01-21 11:10:10536 sources = [ "numerics/safe_compare.h" ]
537 deps = [ ":type_traits" ]
Patrik Höglunda8005cf2017-12-13 15:05:42538}
539
Karl Wiberg12edf4c2018-03-07 13:18:56540rtc_source_set("safe_minmax") {
Mirko Bonadeiccbe95f2020-01-21 11:10:10541 sources = [ "numerics/safe_minmax.h" ]
Karl Wiberg12edf4c2018-03-07 13:18:56542 deps = [
543 ":checks",
544 ":safe_compare",
545 ":type_traits",
546 ]
547}
548
Tommi8d2c5a82018-03-19 10:12:48549rtc_source_set("safe_conversions") {
550 sources = [
551 "numerics/safe_conversions.h",
552 "numerics/safe_conversions_impl.h",
553 ]
Mirko Bonadeiccbe95f2020-01-21 11:10:10554 deps = [ ":checks" ]
Tommi8d2c5a82018-03-19 10:12:48555}
556
Mirko Bonadei86d053c2019-10-17 19:32:04557rtc_library("timeutils") {
Mirko Bonadei2ad8c432018-08-09 08:54:40558 visibility = [ "*" ]
Tommi8d2c5a82018-03-19 10:12:48559 sources = [
Johannes Kronb73c9f02021-02-15 12:29:45560 "system_time.cc",
561 "system_time.h",
Steve Anton10542f22019-01-11 17:11:00562 "time_utils.cc",
563 "time_utils.h",
Tommi8d2c5a82018-03-19 10:12:48564 ]
565 deps = [
566 ":checks",
567 ":safe_conversions",
Jonas Olsson366a50c2018-09-06 11:41:30568 ":stringutils",
Mirko Bonadei35214fc2019-09-23 12:54:28569 "system:rtc_export",
Tommi8d2c5a82018-03-19 10:12:48570 ]
Philipp Hancke3adaeef2023-06-27 11:08:44571
Johannes Kronbb52bdf2021-02-25 09:10:08572 if (rtc_exclude_system_time) {
573 defines = [ "WEBRTC_EXCLUDE_SYSTEM_TIME" ]
574 }
575
Noah Richards342989d2019-03-18 20:50:20576 libs = []
577 if (is_win) {
578 libs += [ "winmm.lib" ]
Philipp Hancke3adaeef2023-06-27 11:08:44579 deps += [ ":win32" ]
Noah Richards342989d2019-03-18 20:50:20580 }
Tommi8d2c5a82018-03-19 10:12:48581}
582
Mirko Bonadei86d053c2019-10-17 19:32:04583rtc_library("stringutils") {
Patrik Höglunda8005cf2017-12-13 15:05:42584 sources = [
Steve Anton10542f22019-01-11 17:11:00585 "string_encode.cc",
586 "string_encode.h",
Jonas Olsson6b1985d2018-07-05 09:59:48587 "string_to_number.cc",
588 "string_to_number.h",
Steve Anton10542f22019-01-11 17:11:00589 "string_utils.cc",
590 "string_utils.h",
Sergey Silkinebc4d3e2023-11-15 10:04:48591 "strings/str_join.h",
Karl Wiberg881f1682018-03-08 14:03:23592 "strings/string_builder.cc",
Tommifef05002018-02-27 12:51:08593 "strings/string_builder.h",
henrikaf0dc5c52020-04-09 16:46:00594 "strings/string_format.cc",
595 "strings/string_format.h",
Patrik Höglunda8005cf2017-12-13 15:05:42596 ]
597 deps = [
Patrik Höglund3e113432017-12-15 13:40:10598 ":checks",
Jonas Olsson6b1985d2018-07-05 09:59:48599 ":macromagic",
Karl Wiberg881f1682018-03-08 14:03:23600 ":safe_minmax",
601 "../api:array_view",
Florent Castelli99c519b2024-05-23 11:21:53602 "//third_party/abseil-cpp/absl/strings:string_view",
Patrik Höglund3e113432017-12-15 13:40:10603 ]
604}
605
Mirko Bonadei86d053c2019-10-17 19:32:04606rtc_library("audio_format_to_string") {
Jonas Olsson74395342018-04-03 10:22:07607 sources = [
608 "strings/audio_format_to_string.cc",
609 "strings/audio_format_to_string.h",
610 ]
611 deps = [
612 ":stringutils",
613 "../api/audio_codecs:audio_codecs_api",
614 ]
615}
616
Patrik Höglund3e113432017-12-15 13:40:10617rtc_source_set("type_traits") {
Mirko Bonadeiccbe95f2020-01-21 11:10:10618 sources = [ "type_traits.h" ]
Patrik Höglund3e113432017-12-15 13:40:10619}
620
Henrik Boström27c29362019-10-21 13:21:55621rtc_source_set("rtc_operations_chain") {
622 visibility = [ "*" ]
623 sources = [
624 "operations_chain.cc",
625 "operations_chain.h",
626 ]
627 deps = [
628 ":checks",
629 ":macromagic",
630 ":refcount",
Niels Möller105711e2022-06-14 13:48:26631 "../api:make_ref_counted",
Niels Möller95129102022-01-13 10:00:05632 "../api:refcountedbase",
Henrik Boström27c29362019-10-21 13:21:55633 "../api:scoped_refptr",
Artem Titovd15a5752021-02-10 13:31:24634 "../api:sequence_checker",
Mirko Bonadei20e4c802020-11-23 10:07:42635 "system:no_unique_address",
Henrik Boström27c29362019-10-21 13:21:55636 ]
637}
638
Tommi8d2c5a82018-03-19 10:12:48639if (rtc_enable_libevent) {
Mirko Bonadei86d053c2019-10-17 19:32:04640 rtc_library("rtc_task_queue_libevent") {
Danil Chapovalov07a4f2b2019-03-05 18:58:28641 visibility = [ "../api/task_queue:default_task_queue_factory" ]
perkj650fdae2017-08-25 12:00:11642 sources = [
Niels Möller15c9cf72017-10-19 10:38:09643 "task_queue_libevent.cc",
Danil Chapovaloveb175242019-02-12 09:44:38644 "task_queue_libevent.h",
perkj650fdae2017-08-25 12:00:11645 ]
Tommi8d2c5a82018-03-19 10:12:48646 deps = [
647 ":checks",
Tommi8d2c5a82018-03-19 10:12:48648 ":logging",
Yves Gerey2e00abc2018-10-05 13:39:24649 ":macromagic",
Tommi8d2c5a82018-03-19 10:12:48650 ":platform_thread",
Yves Gerey2e00abc2018-10-05 13:39:24651 ":platform_thread_types",
Tommi8d2c5a82018-03-19 10:12:48652 ":safe_conversions",
653 ":timeutils",
Danil Chapovaloveb175242019-02-12 09:44:38654 "../api/task_queue",
Danil Chapovalov30c2a312022-07-19 12:12:43655 "../api/units:time_delta",
Markus Handell18523c32020-07-08 15:55:58656 "synchronization:mutex",
Steve Anton9a83dd72020-01-09 19:03:25657 "//third_party/abseil-cpp/absl/container:inlined_vector",
Danil Chapovalov30c2a312022-07-19 12:12:43658 "//third_party/abseil-cpp/absl/functional:any_invocable",
Florent Castelli99c519b2024-05-23 11:21:53659 "//third_party/abseil-cpp/absl/strings:string_view",
Tommi8d2c5a82018-03-19 10:12:48660 ]
661 if (rtc_build_libevent) {
Byoungchan Leed69a7262022-06-23 13:06:00662 deps += [ "//third_party/libevent" ]
Tommi8d2c5a82018-03-19 10:12:48663 }
664 }
665}
666
667if (is_mac || is_ios) {
Mirko Bonadei86d053c2019-10-17 19:32:04668 rtc_library("rtc_task_queue_gcd") {
Byoungchan Lee08438fc2021-10-12 13:53:35669 visibility = [ "../api/task_queue:default_task_queue_factory" ]
Tommi8d2c5a82018-03-19 10:12:48670 sources = [
671 "task_queue_gcd.cc",
Danil Chapovalov47cf5ea2019-02-19 19:20:16672 "task_queue_gcd.h",
Tommi8d2c5a82018-03-19 10:12:48673 ]
674 deps = [
675 ":checks",
676 ":logging",
Markus Handell2a256c82023-02-27 11:41:39677 "../api:location",
Danil Chapovalov47cf5ea2019-02-19 19:20:16678 "../api/task_queue",
Danil Chapovalovfcfa80f2022-07-07 09:26:48679 "../api/units:time_delta",
Markus Handell18523c32020-07-08 15:55:58680 "synchronization:mutex",
Yura Yaroshevichebf739b2020-03-16 15:00:59681 "system:gcd_helpers",
Danil Chapovalovfcfa80f2022-07-07 09:26:48682 "//third_party/abseil-cpp/absl/functional:any_invocable",
Florent Castelli99c519b2024-05-23 11:21:53683 "//third_party/abseil-cpp/absl/strings:string_view",
Danil Chapovalovfcfa80f2022-07-07 09:26:48684 ]
Tommi8d2c5a82018-03-19 10:12:48685 }
686}
687
688if (is_win) {
Mirko Bonadei86d053c2019-10-17 19:32:04689 rtc_library("rtc_task_queue_win") {
Danil Chapovalov07a4f2b2019-03-05 18:58:28690 visibility = [ "../api/task_queue:default_task_queue_factory" ]
Tommi8d2c5a82018-03-19 10:12:48691 sources = [
692 "task_queue_win.cc",
Danil Chapovalov826f2e72019-02-20 17:13:09693 "task_queue_win.h",
Tommi8d2c5a82018-03-19 10:12:48694 ]
695 deps = [
696 ":checks",
Tommi8d2c5a82018-03-19 10:12:48697 ":logging",
698 ":macromagic",
699 ":platform_thread",
Tommi8d2c5a82018-03-19 10:12:48700 ":rtc_event",
Tommi8d2c5a82018-03-19 10:12:48701 ":safe_conversions",
702 ":timeutils",
Danil Chapovalov826f2e72019-02-20 17:13:09703 "../api/task_queue",
Danil Chapovalov3c06cfc2022-07-20 11:38:58704 "../api/units:time_delta",
705 "../api/units:timestamp",
Markus Handell18523c32020-07-08 15:55:58706 "synchronization:mutex",
Danil Chapovalov3c06cfc2022-07-20 11:38:58707 "//third_party/abseil-cpp/absl/functional:any_invocable",
Florent Castelli99c519b2024-05-23 11:21:53708 "//third_party/abseil-cpp/absl/strings:string_view",
Markus Handellad5037b2021-05-07 13:02:36709 ]
Tommi8d2c5a82018-03-19 10:12:48710 }
711}
712
Mirko Bonadei86d053c2019-10-17 19:32:04713rtc_library("rtc_task_queue_stdlib") {
Robin Raymond22027b92018-11-23 14:07:50714 sources = [
715 "task_queue_stdlib.cc",
Danil Chapovalovfa52efa2019-02-21 10:13:58716 "task_queue_stdlib.h",
Robin Raymond22027b92018-11-23 14:07:50717 ]
718 deps = [
719 ":checks",
Danil Chapovalovba570012022-07-19 16:36:31720 ":divide_round",
Robin Raymond22027b92018-11-23 14:07:50721 ":logging",
722 ":macromagic",
723 ":platform_thread",
Robin Raymond22027b92018-11-23 14:07:50724 ":rtc_event",
Robin Raymond22027b92018-11-23 14:07:50725 ":safe_conversions",
726 ":timeutils",
Danil Chapovalovfa52efa2019-02-21 10:13:58727 "../api/task_queue",
Danil Chapovalovba570012022-07-19 16:36:31728 "../api/units:time_delta",
Markus Handell18523c32020-07-08 15:55:58729 "synchronization:mutex",
Danil Chapovalovba570012022-07-19 16:36:31730 "//third_party/abseil-cpp/absl/functional:any_invocable",
Florent Castelli99c519b2024-05-23 11:21:53731 "//third_party/abseil-cpp/absl/strings:string_view",
Danil Chapovalovba570012022-07-19 16:36:31732 ]
Robin Raymond22027b92018-11-23 14:07:50733}
734
Markus Handell82da9322022-12-16 14:50:24735if (rtc_include_tests) {
736 rtc_library("task_queue_stdlib_unittest") {
737 testonly = true
738
739 sources = [ "task_queue_stdlib_unittest.cc" ]
740 deps = [
741 ":gunit_helpers",
742 ":rtc_task_queue_stdlib",
743 "../api/task_queue:task_queue_test",
744 "../test:test_main",
745 "../test:test_support",
746 ]
747 }
748}
749
Mirko Bonadei86d053c2019-10-17 19:32:04750rtc_library("weak_ptr") {
Henrik Kjellanderc0362762017-06-29 06:03:04751 sources = [
752 "weak_ptr.cc",
753 "weak_ptr.h",
754 ]
755 deps = [
Tommiaf3dfd82024-04-24 08:54:19756 ":checks",
757 ":macromagic",
Tommi8d2c5a82018-03-19 10:12:48758 ":refcount",
Mirko Bonadeid9708072019-01-25 19:26:48759 "../api:scoped_refptr",
Artem Titovd15a5752021-02-10 13:31:24760 "../api:sequence_checker",
Mirko Bonadei20e4c802020-11-23 10:07:42761 "system:no_unique_address",
Henrik Kjellanderc0362762017-06-29 06:03:04762 ]
763}
764
Mirko Bonadei86d053c2019-10-17 19:32:04765rtc_library("rtc_numerics") {
Henrik Kjellanderc0362762017-06-29 06:03:04766 sources = [
Jonas Oreland63dced92019-11-25 12:00:15767 "numerics/event_based_exponential_moving_average.cc",
768 "numerics/event_based_exponential_moving_average.h",
Henrik Kjellanderc0362762017-06-29 06:03:04769 "numerics/exp_filter.cc",
770 "numerics/exp_filter.h",
Yves Gerey890f62b2019-04-10 15:18:48771 "numerics/math_utils.h",
Ilya Nikolaevskiy26341992018-11-05 11:55:18772 "numerics/moving_average.cc",
773 "numerics/moving_average.h",
Rasmus Brandt91664812022-09-14 14:22:24774 "numerics/moving_percentile_filter.h",
Henrik Kjellanderc0362762017-06-29 06:03:04775 "numerics/percentile_filter.h",
philipelb85b4c02024-04-24 14:31:58776 "numerics/rational.h",
Yves Gerey890f62b2019-04-10 15:18:48777 "numerics/running_statistics.h",
Evan Shrubsole097fc342023-01-09 10:21:43778 "numerics/sequence_number_unwrapper.h",
Bjorn Tereliusa194e582017-10-25 11:07:09779 "numerics/sequence_number_util.h",
Henrik Kjellanderc0362762017-06-29 06:03:04780 ]
781 deps = [
Patrik Höglunda8005cf2017-12-13 15:05:42782 ":checks",
Florent Castelli31764092022-04-14 11:41:58783 ":mod_ops",
Artem Titov9d777622020-09-18 16:23:08784 ]
Artem Titov9d777622020-09-18 16:23:08785}
786
787rtc_library("rtc_stats_counters") {
788 sources = [
789 "numerics/event_rate_counter.cc",
790 "numerics/event_rate_counter.h",
791 "numerics/sample_stats.cc",
792 "numerics/sample_stats.h",
793 ]
794 deps = [
Björn Terelius72302cc2024-06-12 08:07:50795 ":checks",
Artem Titov9d777622020-09-18 16:23:08796 "../api/numerics",
Sebastian Janssonefa3f762019-12-02 06:19:55797 "../api/units:data_rate",
798 "../api/units:time_delta",
Artem Titov6fcdbc12019-09-11 09:45:40799 "../api/units:timestamp",
Mirko Bonadei2dcf3482020-06-05 12:30:41800 ]
Henrik Kjellanderc0362762017-06-29 06:03:04801}
802
Mirko Bonadei65643662019-07-12 11:29:30803config("rtc_json_suppressions") {
Mirko Bonadei94077762019-06-27 09:24:25804 if (!is_win || is_clang) {
Mirko Bonadei65643662019-07-12 11:29:30805 cflags_cc = [
Mirko Bonadei1cd6f322019-07-12 19:47:47806 # TODO(bugs.webrtc.org/10814): Remove -Wno-undef as soon as it get
Mirko Bonadei65643662019-07-12 11:29:30807 # removed upstream.
808 "-Wno-undef",
809 ]
Mirko Bonadei94077762019-06-27 09:24:25810 }
811}
812
Mirko Bonadei86d053c2019-10-17 19:32:04813rtc_library("rtc_json") {
Sam Zackrisson2e1f16d2023-10-25 13:18:25814 testonly = true
Mirko Bonadei65643662019-07-12 11:29:30815 public_configs = [ ":rtc_json_suppressions" ]
Henrik Kjellanderc0362762017-06-29 06:03:04816 defines = []
817 sources = [
Sam Zackrissonb45bdb52018-10-02 14:25:59818 "strings/json.cc",
819 "strings/json.h",
Henrik Kjellanderc0362762017-06-29 06:03:04820 ]
Florent Castelli99c519b2024-05-23 11:21:53821 deps = [
822 ":stringutils",
823 "//third_party/abseil-cpp/absl/strings:string_view",
824 ]
Mirko Bonadeia0e29fc2018-01-26 15:50:02825 all_dependent_configs = [ "//third_party/jsoncpp:jsoncpp_config" ]
Henrik Kjellanderc0362762017-06-29 06:03:04826 if (rtc_build_json) {
Florent Castellif35611a2022-04-14 09:55:57827 deps += [ "//third_party/jsoncpp" ]
Henrik Kjellanderc0362762017-06-29 06:03:04828 } else {
829 include_dirs = [ "$rtc_jsoncpp_root" ]
Henrik Kjellanderc0362762017-06-29 06:03:04830 }
831}
832
Mirko Bonadeie5f4c6b2021-01-15 09:41:01833rtc_library("net_helpers") {
Florent Castelli353a5ce2023-01-09 16:49:10834 visibility = [ "*" ]
Mirko Bonadeie5f4c6b2021-01-15 09:41:01835 sources = [
836 "net_helpers.cc",
837 "net_helpers.h",
838 ]
Florent Castelli99c519b2024-05-23 11:21:53839 deps = [
840 "system:rtc_export",
841 "//third_party/abseil-cpp/absl/strings:string_view",
842 ]
Mirko Bonadeie5f4c6b2021-01-15 09:41:01843 if (is_android) {
844 deps += [ ":ifaddrs_android" ]
845 }
846 if (is_win) {
Nico Weber79bd4f12021-10-05 19:01:26847 deps += [
Nico Weber79bd4f12021-10-05 19:01:26848 ":win32",
Florent Castelli15a3c3f2022-04-27 08:33:27849 "win:windows_version",
Nico Weber79bd4f12021-10-05 19:01:26850 ]
Mirko Bonadeie5f4c6b2021-01-15 09:41:01851 }
Karl Wiberg0b6d0e62018-12-06 13:50:45852}
853
Mirko Bonadei0d8b79e2023-07-27 06:55:49854rtc_library("net_test_helpers") {
855 # TODO(mbonadei): Enable once net_helpers don't depend
856 # on this target anymore.
857 # testonly = true
858 sources = [
859 "net_test_helpers.cc",
860 "net_test_helpers.h",
861 ]
862 deps = [ "system:rtc_export" ]
863 if (is_android) {
864 deps += [ ":ifaddrs_android" ]
865 }
866 if (is_win) {
867 deps += [
868 ":win32",
869 "win:windows_version",
870 ]
871 }
872}
873
Harald Alvestrand8d4a5f12023-08-22 13:53:16874rtc_library("async_dns_resolver") {
875 sources = [
876 "async_dns_resolver.cc",
877 "async_dns_resolver.h",
878 ]
879 deps = [
880 ":logging",
881 ":macromagic",
882 ":platform_thread",
Harald Alvestrand8219cc32023-09-02 05:26:55883 ":refcount",
Harald Alvestrand8d4a5f12023-08-22 13:53:16884 "../api:async_dns_resolver",
Harald Alvestrand8219cc32023-09-02 05:26:55885 "../api:make_ref_counted",
Harald Alvestrand8d4a5f12023-08-22 13:53:16886 "../api:sequence_checker",
887 "../api/task_queue:pending_task_safety_flag",
Harald Alvestrandfb658ca2023-10-10 07:24:54888 "system:rtc_export",
Harald Alvestrand8d4a5f12023-08-22 13:53:16889 ]
890}
891
892rtc_library("async_dns_resolver_unittests") {
893 testonly = true
894 sources = [ "async_dns_resolver_unittest.cc" ]
895 deps = [
896 ":async_dns_resolver",
897 ":gunit_helpers",
898 "../test:run_loop",
899 "../test:test_support",
900 ]
901}
902
Mirko Bonadeie5f4c6b2021-01-15 09:41:01903rtc_library("ip_address") {
Karl Wiberg02f4e322019-02-10 23:43:43904 visibility = [ "*" ]
Mirko Bonadeie5f4c6b2021-01-15 09:41:01905 sources = [
906 "ip_address.cc",
907 "ip_address.h",
908 ]
909 deps = [
Florent Castellia876a922022-04-19 15:18:36910 ":byte_order",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01911 ":net_helpers",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01912 ":stringutils",
913 "system:rtc_export",
Florent Castelli99c519b2024-05-23 11:21:53914 "//third_party/abseil-cpp/absl/strings:string_view",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01915 ]
916 if (is_win) {
917 deps += [ ":win32" ]
918 }
Karl Wiberg0b6d0e62018-12-06 13:50:45919}
920
Mirko Bonadeie5f4c6b2021-01-15 09:41:01921rtc_library("socket_address") {
Karl Wiberg02f4e322019-02-10 23:43:43922 visibility = [ "*" ]
Mirko Bonadeie5f4c6b2021-01-15 09:41:01923 sources = [
924 "socket_address.cc",
925 "socket_address.h",
926 ]
927 deps = [
Florent Castellia876a922022-04-19 15:18:36928 ":byte_order",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01929 ":checks",
930 ":ip_address",
931 ":logging",
932 ":net_helpers",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01933 ":safe_conversions",
934 ":stringutils",
935 "system:rtc_export",
Florent Castelli99c519b2024-05-23 11:21:53936 "//third_party/abseil-cpp/absl/strings:string_view",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01937 ]
938 if (is_win) {
939 deps += [ ":win32" ]
940 }
Karl Wiberg0b6d0e62018-12-06 13:50:45941}
942
Mirko Bonadeie5f4c6b2021-01-15 09:41:01943rtc_library("null_socket_server") {
944 sources = [
945 "null_socket_server.cc",
946 "null_socket_server.h",
947 ]
948 deps = [
Mirko Bonadeie5f4c6b2021-01-15 09:41:01949 ":checks",
950 ":rtc_event",
951 ":socket",
952 ":socket_server",
Markus Handell2cfc1af2022-08-19 08:16:48953 "../api/units:time_delta",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01954 "system:rtc_export",
955 ]
Karl Wiberg0b6d0e62018-12-06 13:50:45956}
957
Karl Wiberg28522dc2019-01-22 16:54:34958rtc_source_set("socket_server") {
Florent Castelli353a5ce2023-01-09 16:49:10959 visibility = [ "*" ]
Mirko Bonadeie5f4c6b2021-01-15 09:41:01960 sources = [ "socket_server.h" ]
Markus Handell9a21c492022-08-25 11:40:13961 deps = [
962 ":rtc_event",
963 ":socket_factory",
964 "../api/units:time_delta",
965 ]
Karl Wiberg0b6d0e62018-12-06 13:50:45966}
967
Mirko Bonadeie5f4c6b2021-01-15 09:41:01968rtc_library("threading") {
Karl Wiberg02f4e322019-02-10 23:43:43969 visibility = [ "*" ]
Mirko Bonadeie5f4c6b2021-01-15 09:41:01970
Mirko Bonadeie5f4c6b2021-01-15 09:41:01971 sources = [
Mirko Bonadeie5f4c6b2021-01-15 09:41:01972 "internal/default_socket_server.cc",
973 "internal/default_socket_server.h",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01974 "network_monitor.cc",
975 "network_monitor.h",
976 "network_monitor_factory.cc",
977 "network_monitor_factory.h",
978 "physical_socket_server.cc",
979 "physical_socket_server.h",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01980 "thread.cc",
981 "thread.h",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01982 ]
Mirko Bonadeie5f4c6b2021-01-15 09:41:01983 deps = [
Harald Alvestrand60362c12023-10-10 11:30:18984 ":async_dns_resolver",
Florent Castellia876a922022-04-19 15:18:36985 ":byte_order",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01986 ":checks",
987 ":criticalsection",
Florent Castellia30aef32022-04-19 15:47:13988 ":event_tracer",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01989 ":ip_address",
990 ":logging",
991 ":macromagic",
992 ":network_constants",
993 ":null_socket_server",
Florent Castelli45a05992022-04-14 10:18:28994 ":platform_thread",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01995 ":platform_thread_types",
Florent Castellif86f6f92022-04-05 00:54:12996 ":refcount",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01997 ":rtc_event",
Harald Alvestrand60362c12023-10-10 11:30:18998 ":socket",
Mirko Bonadeie5f4c6b2021-01-15 09:41:01999 ":socket_address",
1000 ":socket_server",
1001 ":timeutils",
Harald Alvestrand60362c12023-10-10 11:30:181002 "../api:async_dns_resolver",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011003 "../api:function_view",
Markus Handell2a256c82023-02-27 11:41:391004 "../api:location",
Markus Handell1366b0f2021-04-21 08:22:341005 "../api:refcountedbase",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011006 "../api:scoped_refptr",
Artem Titovd15a5752021-02-10 13:31:241007 "../api:sequence_checker",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011008 "../api/task_queue",
Artem Titovc374d112022-06-16 19:27:451009 "../api/task_queue:pending_task_safety_flag",
Danil Chapovalov4bcf8092022-07-06 17:42:341010 "../api/units:time_delta",
Per Kjellanderfdcfefa2022-11-08 11:48:521011 "../system_wrappers:field_trial",
Per K8df31c92024-03-11 09:21:481012 "./network:ecn_marking",
Niels Möller6d176022021-02-09 13:44:481013 "synchronization:mutex",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011014 "system:no_unique_address",
1015 "system:rtc_export",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011016 "third_party/sigslot",
Florent Castelli99c519b2024-05-23 11:21:531017 "//third_party/abseil-cpp/absl/algorithm:container",
1018 "//third_party/abseil-cpp/absl/base:core_headers",
1019 "//third_party/abseil-cpp/absl/cleanup",
1020 "//third_party/abseil-cpp/absl/functional:any_invocable",
1021 "//third_party/abseil-cpp/absl/strings:string_view",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011022 ]
1023 if (is_android) {
1024 deps += [ ":ifaddrs_android" ]
1025 }
1026 if (is_win) {
1027 deps += [ ":win32" ]
1028 }
1029 if (is_mac || is_ios) {
Byoungchan Lee08438fc2021-10-12 13:53:351030 deps += [ "system:cocoa_threading" ]
Mirko Bonadeie5f4c6b2021-01-15 09:41:011031 }
Karl Wiberg0b6d0e62018-12-06 13:50:451032}
1033
Karl Wiberg28522dc2019-01-22 16:54:341034rtc_source_set("socket_factory") {
Mirko Bonadeie5f4c6b2021-01-15 09:41:011035 sources = [ "socket_factory.h" ]
Niels Möllerd0b88792021-08-12 08:32:301036 deps = [ ":socket" ]
Karl Wiberg0b6d0e62018-12-06 13:50:451037}
1038
Mirko Bonadeie5f4c6b2021-01-15 09:41:011039rtc_library("async_socket") {
1040 sources = [
1041 "async_socket.cc",
1042 "async_socket.h",
1043 ]
1044 deps = [
1045 ":checks",
1046 ":socket",
1047 ":socket_address",
1048 "third_party/sigslot",
Florent Castelli99c519b2024-05-23 11:21:531049 "//third_party/abseil-cpp/absl/memory",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011050 ]
Karl Wiberg0b6d0e62018-12-06 13:50:451051}
1052
Mirko Bonadeie5f4c6b2021-01-15 09:41:011053rtc_library("socket") {
1054 sources = [
1055 "socket.cc",
1056 "socket.h",
1057 ]
1058 deps = [
Per Kf81af2f2023-12-22 12:24:401059 ":buffer",
Per K056782c2024-01-30 11:32:051060 ":checks",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011061 ":macromagic",
1062 ":socket_address",
Per Kf81af2f2023-12-22 12:24:401063 "../api/units:timestamp",
Per K8df31c92024-03-11 09:21:481064 "./network:ecn_marking",
Per K4e3b1012024-01-11 08:50:321065 "system:rtc_export",
Niels Möllerd0b88792021-08-12 08:32:301066 "third_party/sigslot",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011067 ]
1068 if (is_win) {
1069 deps += [ ":win32" ]
1070 }
Karl Wiberg0b6d0e62018-12-06 13:50:451071}
1072
1073rtc_source_set("network_constants") {
Florent Castelli353a5ce2023-01-09 16:49:101074 visibility = [ "*" ]
Mirko Bonadeie5f4c6b2021-01-15 09:41:011075 sources = [
1076 "network_constants.cc",
1077 "network_constants.h",
1078 ]
1079 deps = [ ":checks" ]
Karl Wiberg0b6d0e62018-12-06 13:50:451080}
1081
1082if (is_android) {
Mirko Bonadeie5f4c6b2021-01-15 09:41:011083 rtc_library("ifaddrs_android") {
1084 sources = [
1085 "ifaddrs_android.cc",
1086 "ifaddrs_android.h",
1087 ]
1088 libs = [
1089 "log",
1090 "GLESv2",
1091 ]
Florent Castelli99c519b2024-05-23 11:21:531092 deps = [ "//third_party/abseil-cpp/absl/cleanup" ]
Karl Wiberg0b6d0e62018-12-06 13:50:451093 }
1094}
1095
1096if (is_win) {
Mirko Bonadeie5f4c6b2021-01-15 09:41:011097 rtc_library("win32") {
Tommi16db7ff2020-09-26 09:57:261098 sources = [
1099 "win32.cc",
1100 "win32.h",
Tommi16db7ff2020-09-26 09:57:261101 ]
1102
1103 deps = [
Florent Castellia876a922022-04-19 15:18:361104 ":byte_order",
Tommi16db7ff2020-09-26 09:57:261105 ":checks",
1106 ":macromagic",
Florent Castelli57aa81b2022-04-04 15:14:021107 ":stringutils",
Tommi16db7ff2020-09-26 09:57:261108 ]
1109
1110 libs = [
1111 "crypt32.lib",
1112 "iphlpapi.lib",
1113 "secur32.lib",
1114 ]
1115
1116 defines = [ "_CRT_NONSTDC_NO_DEPRECATE" ]
Karl Wiberg0b6d0e62018-12-06 13:50:451117 }
1118}
1119
Florent Castellia138c6c2023-01-04 11:01:091120rtc_library("ifaddrs_converter") {
1121 sources = []
1122 deps = [
1123 ":checks",
1124 ":ip_address",
1125 ":logging",
1126 ]
1127
1128 if (is_android) {
1129 deps += [ ":ifaddrs_android" ]
1130 }
1131
1132 if (is_ios || is_mac) {
1133 sources += [ "mac_ifaddrs_converter.cc" ]
1134 }
1135
1136 if (is_posix || is_fuchsia) {
Henrik Kjellanderc0362762017-06-29 06:03:041137 sources += [
1138 "ifaddrs_converter.cc",
1139 "ifaddrs_converter.h",
Henrik Kjellanderc0362762017-06-29 06:03:041140 ]
1141 }
Florent Castellia138c6c2023-01-04 11:01:091142}
Henrik Kjellanderc0362762017-06-29 06:03:041143
Florent Castellia138c6c2023-01-04 11:01:091144rtc_library("rolling_accumulator") {
1145 sources = [ "rolling_accumulator.h" ]
1146 deps = [
1147 ":checks",
1148 ":rtc_numerics",
1149 ]
1150}
Harald Alvestrand13799132020-03-09 18:39:361151
Florent Castellia138c6c2023-01-04 11:01:091152if (is_win) {
1153 rtc_library("win32_socket_init") {
1154 sources = [ "win32_socket_init.h" ]
1155 deps = [ ":win32" ]
Henrik Kjellanderc0362762017-06-29 06:03:041156 }
Henrik Kjellanderc0362762017-06-29 06:03:041157}
1158
Florent Castelli372cf8b2023-01-09 14:48:281159if (!build_with_chromium) {
1160 rtc_library("log_sinks") {
Florent Castellia5ba5862023-01-11 10:01:151161 visibility = [ "*" ]
Florent Castelli372cf8b2023-01-09 14:48:281162 sources = [
1163 "log_sinks.cc",
1164 "log_sinks.h",
1165 ]
1166 deps = [
1167 ":checks",
1168 ":file_rotating_stream",
1169 ":logging",
Florent Castelli99c519b2024-05-23 11:21:531170 "//third_party/abseil-cpp/absl/strings:string_view",
Florent Castelli372cf8b2023-01-09 14:48:281171 ]
Florent Castelli372cf8b2023-01-09 14:48:281172 }
Florent Castellia138c6c2023-01-04 11:01:091173}
1174
1175rtc_library("network") {
Florent Castelli353a5ce2023-01-09 16:49:101176 visibility = [ "*" ]
Florent Castellia138c6c2023-01-04 11:01:091177 sources = [
1178 "network.cc",
1179 "network.h",
1180 ]
1181 deps = [
1182 ":checks",
1183 ":ifaddrs_converter",
1184 ":ip_address",
1185 ":logging",
1186 ":macromagic",
1187 ":mdns_responder_interface",
1188 ":socket",
1189 ":socket_factory",
1190 ":stringutils",
1191 ":threading",
1192 "../api:array_view",
1193 "../api:field_trials_view",
1194 "../api:sequence_checker",
1195 "../api/task_queue:pending_task_safety_flag",
1196 "../api/transport:field_trial_based_config",
1197 "../api/units:time_delta",
1198 "experiments:field_trial_parser",
1199 "memory:always_valid_pointer",
1200 "system:rtc_export",
1201 "third_party/sigslot",
Florent Castellia138c6c2023-01-04 11:01:091202 "//third_party/abseil-cpp/absl/algorithm:container",
1203 "//third_party/abseil-cpp/absl/base:core_headers",
1204 "//third_party/abseil-cpp/absl/memory",
1205 "//third_party/abseil-cpp/absl/strings",
Florent Castelli99c519b2024-05-23 11:21:531206 "//third_party/abseil-cpp/absl/strings:string_view",
Florent Castellia138c6c2023-01-04 11:01:091207 ]
1208
1209 if (is_win) {
1210 deps += [ ":win32" ]
1211 }
1212}
1213
1214rtc_library("socket_address_pair") {
1215 sources = [
1216 "socket_address_pair.cc",
1217 "socket_address_pair.h",
1218 ]
1219 deps = [ ":socket_address" ]
1220}
1221
1222rtc_library("net_helper") {
Florent Castelli143c3b22023-01-10 14:02:511223 visibility = [ "*" ]
Florent Castellia138c6c2023-01-04 11:01:091224 sources = [
1225 "net_helper.cc",
1226 "net_helper.h",
1227 ]
Florent Castelli99c519b2024-05-23 11:21:531228 deps = [
1229 "system:rtc_export",
1230 "//third_party/abseil-cpp/absl/strings:string_view",
1231 ]
Florent Castellia138c6c2023-01-04 11:01:091232}
1233
1234rtc_library("socket_adapters") {
Florent Castelli353a5ce2023-01-09 16:49:101235 visibility = [ "*" ]
Florent Castellia138c6c2023-01-04 11:01:091236 sources = [
1237 "socket_adapters.cc",
1238 "socket_adapters.h",
1239 ]
1240 deps = [
1241 ":async_socket",
1242 ":buffer",
1243 ":byte_buffer",
1244 ":checks",
Florent Castellia138c6c2023-01-04 11:01:091245 ":logging",
1246 ":stringutils",
1247 ":zero_memory",
1248 "../api:array_view",
Florent Castelli99c519b2024-05-23 11:21:531249 "//third_party/abseil-cpp/absl/strings",
1250 "//third_party/abseil-cpp/absl/strings:string_view",
Florent Castellia138c6c2023-01-04 11:01:091251 ]
Florent Castellia138c6c2023-01-04 11:01:091252}
1253
1254rtc_library("network_route") {
1255 sources = [
1256 "network_route.cc",
1257 "network_route.h",
1258 ]
1259 deps = [
1260 ":network_constants",
1261 ":stringutils",
1262 "system:inline",
1263 ]
1264}
1265
1266rtc_library("async_tcp_socket") {
1267 sources = [
1268 "async_tcp_socket.cc",
1269 "async_tcp_socket.h",
1270 ]
1271 deps = [
1272 ":async_packet_socket",
1273 ":buffer",
1274 ":byte_order",
1275 ":checks",
1276 ":logging",
1277 ":socket",
1278 ":socket_address",
1279 ":timeutils",
1280 "../api:array_view",
1281 "network:sent_packet",
Florent Castellia138c6c2023-01-04 11:01:091282 ]
1283}
1284
1285rtc_library("async_udp_socket") {
Florent Castelli353a5ce2023-01-09 16:49:101286 visibility = [ "*" ]
Florent Castellia138c6c2023-01-04 11:01:091287 sources = [
1288 "async_udp_socket.cc",
1289 "async_udp_socket.h",
1290 ]
1291 deps = [
1292 ":async_packet_socket",
1293 ":checks",
1294 ":logging",
1295 ":macromagic",
1296 ":socket",
1297 ":socket_address",
1298 ":socket_factory",
1299 ":timeutils",
1300 "../api:sequence_checker",
Per Kf81af2f2023-12-22 12:24:401301 "../api/units:time_delta",
Florent Castellia138c6c2023-01-04 11:01:091302 "../system_wrappers:field_trial",
Per Kf81af2f2023-12-22 12:24:401303 "network:received_packet",
Florent Castellia138c6c2023-01-04 11:01:091304 "network:sent_packet",
Harald Alvestrand3924bc22023-08-28 11:06:451305 "system:no_unique_address",
Florent Castellia138c6c2023-01-04 11:01:091306 ]
Florent Castellia138c6c2023-01-04 11:01:091307}
1308
1309rtc_library("async_packet_socket") {
Florent Castelli353a5ce2023-01-09 16:49:101310 visibility = [ "*" ]
Florent Castellia138c6c2023-01-04 11:01:091311 sources = [
1312 "async_packet_socket.cc",
1313 "async_packet_socket.h",
1314 ]
1315 deps = [
1316 ":callback_list",
Per K4ac37182023-11-15 09:43:321317 ":checks",
Florent Castellia138c6c2023-01-04 11:01:091318 ":dscp",
1319 ":socket",
1320 ":timeutils",
1321 "../api:sequence_checker",
Per K4ac37182023-11-15 09:43:321322 "network:received_packet",
Florent Castellia138c6c2023-01-04 11:01:091323 "network:sent_packet",
1324 "system:no_unique_address",
1325 "system:rtc_export",
1326 "third_party/sigslot",
1327 ]
1328}
1329
Per K4ac37182023-11-15 09:43:321330if (rtc_include_tests) {
1331 rtc_library("async_packet_socket_unittest") {
1332 testonly = true
1333 visibility = [ "*" ]
1334 sources = [ "async_packet_socket_unittest.cc" ]
1335 deps = [
1336 ":async_packet_socket",
1337 ":gunit_helpers",
Per K2fafcec2024-02-22 06:42:421338 ":socket_address",
Per K4ac37182023-11-15 09:43:321339 "../test:test_support",
1340 "network:received_packet",
1341 "third_party/sigslot",
1342 ]
1343 }
1344}
1345
Florent Castellia138c6c2023-01-04 11:01:091346rtc_library("mdns_responder_interface") {
1347 sources = [ "mdns_responder_interface.h" ]
Florent Castelli99c519b2024-05-23 11:21:531348 deps = [
1349 ":ip_address",
1350 "//third_party/abseil-cpp/absl/strings:string_view",
1351 ]
Florent Castellia138c6c2023-01-04 11:01:091352}
1353
1354rtc_library("dscp") {
1355 sources = [ "dscp.h" ]
1356}
1357
Florent Castellia138c6c2023-01-04 11:01:091358rtc_library("file_rotating_stream") {
1359 sources = [
1360 "file_rotating_stream.cc",
1361 "file_rotating_stream.h",
1362 ]
1363 deps = [
1364 ":checks",
1365 ":logging",
1366 ":stringutils",
1367 "system:file_wrapper",
Florent Castellia138c6c2023-01-04 11:01:091368 "//third_party/abseil-cpp/absl/algorithm:container",
1369 "//third_party/abseil-cpp/absl/strings",
Florent Castelli99c519b2024-05-23 11:21:531370 "//third_party/abseil-cpp/absl/strings:string_view",
Florent Castellia138c6c2023-01-04 11:01:091371 ]
1372}
1373
1374rtc_library("data_rate_limiter") {
1375 sources = [
1376 "data_rate_limiter.cc",
1377 "data_rate_limiter.h",
1378 ]
1379 deps = [ "system:rtc_export" ]
1380}
1381
1382rtc_library("unique_id_generator") {
1383 sources = [
1384 "unique_id_generator.cc",
1385 "unique_id_generator.h",
1386 ]
1387 deps = [
Philipp Hancke41586782024-06-06 14:31:071388 ":crypto_random",
Florent Castellia138c6c2023-01-04 11:01:091389 ":stringutils",
1390 "../api:array_view",
1391 "../api:sequence_checker",
1392 "synchronization:mutex",
1393 "system:no_unique_address",
Florent Castelli99c519b2024-05-23 11:21:531394 "//third_party/abseil-cpp/absl/strings:string_view",
Florent Castellia138c6c2023-01-04 11:01:091395 ]
Florent Castellia138c6c2023-01-04 11:01:091396}
1397
1398rtc_library("crc32") {
1399 sources = [
1400 "crc32.cc",
1401 "crc32.h",
1402 ]
Florent Castelli99c519b2024-05-23 11:21:531403 deps = [
1404 ":macromagic",
1405 "//third_party/abseil-cpp/absl/strings:string_view",
1406 ]
Florent Castellia138c6c2023-01-04 11:01:091407}
1408
1409rtc_library("stream") {
Florent Castelli353a5ce2023-01-09 16:49:101410 visibility = [ "*" ]
Florent Castellia138c6c2023-01-04 11:01:091411 sources = [
1412 "stream.cc",
1413 "stream.h",
1414 ]
1415 deps = [
1416 ":buffer",
1417 ":checks",
Tommid2004882024-04-22 14:50:401418 ":logging",
Florent Castellia138c6c2023-01-04 11:01:091419 ":threading",
1420 "../api:array_view",
Tommid2004882024-04-22 14:50:401421 "../api:sequence_checker",
1422 "system:no_unique_address",
Florent Castellia138c6c2023-01-04 11:01:091423 "system:rtc_export",
1424 "third_party/sigslot",
Florent Castelli99c519b2024-05-23 11:21:531425 "//third_party/abseil-cpp/absl/functional:any_invocable",
Florent Castellia138c6c2023-01-04 11:01:091426 ]
1427}
1428
1429rtc_library("rtc_certificate_generator") {
Florent Castelli353a5ce2023-01-09 16:49:101430 visibility = [ "*" ]
Florent Castellia138c6c2023-01-04 11:01:091431 sources = [
1432 "rtc_certificate_generator.cc",
1433 "rtc_certificate_generator.h",
1434 ]
1435 deps = [
1436 ":checks",
1437 ":ssl",
1438 ":threading",
1439 "../api:scoped_refptr",
1440 "system:rtc_export",
Florent Castellia138c6c2023-01-04 11:01:091441 "//third_party/abseil-cpp/absl/functional:any_invocable",
Florent Castellia138c6c2023-01-04 11:01:091442 ]
1443}
1444
Philipp Hancke57dbb1e2024-05-14 15:35:241445rtc_source_set("ssl_header") {
Mirko Bonadei7b3b2da2024-05-15 07:42:041446 visibility = [ "*" ]
Philipp Hancke5ef183e2024-05-16 16:11:061447 sources = [ "openssl.h" ]
1448 deps = []
1449 if (is_win) {
1450 deps += [ ":win32" ]
1451 }
Philipp Hancke57dbb1e2024-05-14 15:35:241452}
1453
1454rtc_source_set("digest") {
Mirko Bonadei7b3b2da2024-05-15 07:42:041455 visibility = [ "*" ]
Philipp Hancke5ef183e2024-05-16 16:11:061456 sources = [
1457 "message_digest.cc",
1458 "message_digest.h",
1459 "openssl_digest.cc",
1460 "openssl_digest.h",
1461 ]
1462 deps = [
1463 ":checks",
1464 ":ssl_header",
1465 ":stringutils",
Florent Castelli99c519b2024-05-23 11:21:531466 "//third_party/abseil-cpp/absl/strings:string_view",
Philipp Hancke5ef183e2024-05-16 16:11:061467 ]
1468
1469 # If we are building the SSL library ourselves, we know it's BoringSSL.
1470 if (rtc_build_ssl) {
1471 deps += [ "//third_party/boringssl" ]
1472 } else {
Philipp Hancke06a49f02024-08-22 18:52:331473 configs += [ "..:external_ssl_library" ]
Philipp Hancke5ef183e2024-05-16 16:11:061474 }
Philipp Hancke57dbb1e2024-05-14 15:35:241475}
1476
Philipp Hancke41586782024-06-06 14:31:071477rtc_library("crypto_random") {
1478 visibility = [ "*" ]
1479 sources = [
1480 "crypto_random.cc",
1481 "crypto_random.h",
1482 ]
1483 deps = [
1484 ":checks",
1485 ":logging",
1486 "synchronization:mutex",
1487 "system:rtc_export",
1488 "//third_party/abseil-cpp/absl/strings:string_view",
1489 ]
1490
1491 # If we are building the SSL library ourselves, we know it's BoringSSL.
1492 if (rtc_build_ssl) {
1493 deps += [ "//third_party/boringssl" ]
1494 } else {
Philipp Hancke06a49f02024-08-22 18:52:331495 configs += [ "..:external_ssl_library" ]
Philipp Hancke41586782024-06-06 14:31:071496 }
1497}
1498
Florent Castellia138c6c2023-01-04 11:01:091499rtc_library("ssl") {
Florent Castelli353a5ce2023-01-09 16:49:101500 visibility = [ "*" ]
Florent Castellia138c6c2023-01-04 11:01:091501 sources = [
Florent Castellia138c6c2023-01-04 11:01:091502 "openssl_key_pair.cc",
1503 "openssl_key_pair.h",
Florent Castellia138c6c2023-01-04 11:01:091504 "openssl_utility.cc",
1505 "openssl_utility.h",
1506 "rtc_certificate.cc",
1507 "rtc_certificate.h",
Florent Castellia138c6c2023-01-04 11:01:091508 "ssl_certificate.cc",
1509 "ssl_certificate.h",
1510 "ssl_fingerprint.cc",
1511 "ssl_fingerprint.h",
1512 "ssl_identity.cc",
1513 "ssl_identity.h",
Florent Castellia138c6c2023-01-04 11:01:091514 ]
1515
1516 deps = [
Florent Castellia138c6c2023-01-04 11:01:091517 ":buffer",
1518 ":checks",
1519 ":copy_on_write_buffer",
Philipp Hancke5ef183e2024-05-16 16:11:061520 ":digest",
Florent Castellia138c6c2023-01-04 11:01:091521 ":logging",
1522 ":macromagic",
1523 ":safe_conversions",
Philipp Hancke5ef183e2024-05-16 16:11:061524 ":ssl_header",
Florent Castellia138c6c2023-01-04 11:01:091525 ":stringutils",
Florent Castellia138c6c2023-01-04 11:01:091526 ":timeutils",
1527 "../api:array_view",
1528 "../api:refcountedbase",
1529 "../api:scoped_refptr",
Florent Castellia138c6c2023-01-04 11:01:091530 "system:rtc_export",
Florent Castellia138c6c2023-01-04 11:01:091531 "third_party/base64",
Florent Castellia138c6c2023-01-04 11:01:091532 "//third_party/abseil-cpp/absl/algorithm:container",
1533 "//third_party/abseil-cpp/absl/base:core_headers",
1534 "//third_party/abseil-cpp/absl/memory",
Florent Castelli99c519b2024-05-23 11:21:531535 "//third_party/abseil-cpp/absl/strings:string_view",
Florent Castellia138c6c2023-01-04 11:01:091536 ]
1537
1538 # If we are building the SSL library ourselves, we know it's BoringSSL.
1539 if (rtc_build_ssl) {
1540 sources += [
1541 "boringssl_certificate.cc",
1542 "boringssl_certificate.h",
1543 "boringssl_identity.cc",
1544 "boringssl_identity.h",
1545 ]
1546
Philipp Hancke3fede872024-06-13 15:05:151547 deps += [
1548 ":crypto_random",
1549 "//third_party/boringssl",
1550 ]
Florent Castellia138c6c2023-01-04 11:01:091551 } else {
1552 sources += [
1553 "openssl_certificate.cc",
1554 "openssl_certificate.h",
1555 "openssl_identity.cc",
1556 "openssl_identity.h",
1557 ]
Philipp Hanckeb2ce4062024-08-01 17:44:451558 deps += [ ":crypto_random" ]
Florent Castellia138c6c2023-01-04 11:01:091559
Philipp Hancke06a49f02024-08-22 18:52:331560 configs += [ "..:external_ssl_library" ]
Florent Castellia138c6c2023-01-04 11:01:091561 }
1562
1563 if (build_with_chromium) {
1564 include_dirs = [ "../../boringssl/src/include" ]
1565 } else {
1566 sources += [ "ssl_roots.h" ]
1567 }
1568
1569 if (is_win) {
1570 deps += [ ":win32" ]
1571 }
1572}
1573
Philipp Hanckec7fd5af2024-05-17 20:49:051574rtc_library("ssl_adapter") {
1575 visibility = [ "*" ]
Philipp Hancke71ad98b2024-05-23 20:25:101576 sources = [
1577 "openssl_adapter.cc",
1578 "openssl_adapter.h",
1579 "openssl_session_cache.cc",
1580 "openssl_session_cache.h",
1581 "openssl_stream_adapter.cc",
1582 "openssl_stream_adapter.h",
1583 "ssl_adapter.cc",
1584 "ssl_adapter.h",
1585 "ssl_stream_adapter.cc",
1586 "ssl_stream_adapter.h",
1587 ]
1588
1589 deps = [
1590 ":async_socket",
1591 ":buffer",
1592 ":checks",
1593 ":digest",
1594 ":logging",
1595 ":safe_conversions",
1596 ":socket",
1597 ":socket_address",
1598 ":ssl",
1599 ":ssl_header",
1600 ":stream",
1601 ":stringutils",
1602 ":threading",
1603 ":timeutils",
1604 "../api:array_view",
Harald Alvestrand53c424e2024-08-01 06:31:021605 "../api:sequence_checker",
Philipp Hancke71ad98b2024-05-23 20:25:101606 "../api/task_queue:pending_task_safety_flag",
1607 "../api/units:time_delta",
1608 "../system_wrappers:field_trial",
1609 "system:rtc_export",
1610 "task_utils:repeating_task",
1611 "third_party/sigslot",
1612 "//third_party/abseil-cpp/absl/functional:any_invocable",
1613 "//third_party/abseil-cpp/absl/memory",
1614 "//third_party/abseil-cpp/absl/strings",
Philipp Hancke71ad98b2024-05-23 20:25:101615 ]
1616
1617 # If we are building the SSL library ourselves, we know it's BoringSSL.
1618 if (rtc_build_ssl) {
1619 deps += [ "//third_party/boringssl" ]
1620 } else {
Philipp Hancke06a49f02024-08-22 18:52:331621 configs += [ "..:external_ssl_library" ]
Philipp Hancke71ad98b2024-05-23 20:25:101622 }
Philipp Hanckec7fd5af2024-05-17 20:49:051623}
1624
Henrik Kjellanderc0362762017-06-29 06:03:041625rtc_source_set("gtest_prod") {
Mirko Bonadeiccbe95f2020-01-21 11:10:101626 sources = [ "gtest_prod_util.h" ]
Henrik Kjellanderc0362762017-06-29 06:03:041627}
1628
Mirko Bonadei86d053c2019-10-17 19:32:041629rtc_library("gunit_helpers") {
Mirko Bonadeie3abb812018-11-23 12:15:081630 testonly = true
Philipp Hancke5aaa9ed2024-01-15 09:07:581631 sources = [ "gunit.h" ]
Mirko Bonadeie3abb812018-11-23 12:15:081632 deps = [
1633 ":logging",
Mirko Bonadeie3abb812018-11-23 12:15:081634 ":rtc_base_tests_utils",
1635 ":stringutils",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011636 ":threading",
Mirko Bonadeie3abb812018-11-23 12:15:081637 "../test:test_support",
Florent Castelli99c519b2024-05-23 11:21:531638 "//third_party/abseil-cpp/absl/strings:string_view",
Mirko Bonadeie3abb812018-11-23 12:15:081639 ]
1640}
1641
Mirko Bonadei86d053c2019-10-17 19:32:041642rtc_library("testclient") {
Mirko Bonadeie3abb812018-11-23 12:15:081643 testonly = true
1644 sources = [
Steve Anton10542f22019-01-11 17:11:001645 "test_client.cc",
1646 "test_client.h",
Mirko Bonadeie3abb812018-11-23 12:15:081647 ]
1648 deps = [
Florent Castellia138c6c2023-01-04 11:01:091649 ":async_udp_socket",
Per Kd07900c2023-11-17 09:18:251650 ":buffer",
Mirko Bonadeie3abb812018-11-23 12:15:081651 ":gunit_helpers",
Mirko Bonadeie3abb812018-11-23 12:15:081652 ":rtc_base_tests_utils",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011653 ":threading",
Mirko Bonadeie3abb812018-11-23 12:15:081654 ":timeutils",
Per Kd07900c2023-11-17 09:18:251655 "../api/units:timestamp",
1656 "network:received_packet",
Markus Handell18523c32020-07-08 15:55:581657 "synchronization:mutex",
Mirko Bonadeie3abb812018-11-23 12:15:081658 ]
1659}
1660
Mirko Bonadei3d259352020-10-23 10:04:401661rtc_library("callback_list_unittests") {
Lahiru Ginnaliya Gamathige3e982802020-09-16 17:34:211662 testonly = true
1663
Mirko Bonadei3d259352020-10-23 10:04:401664 sources = [ "callback_list_unittest.cc" ]
Lahiru Ginnaliya Gamathige3e982802020-09-16 17:34:211665 deps = [
Mirko Bonadei3d259352020-10-23 10:04:401666 ":callback_list",
Lahiru Ginnaliya Gamathige3e982802020-09-16 17:34:211667 ":gunit_helpers",
Lahiru Ginnaliya Gamathige3e982802020-09-16 17:34:211668 "../api:function_view",
1669 "../test:test_support",
1670 ]
1671}
1672
Mirko Bonadei86d053c2019-10-17 19:32:041673rtc_library("rtc_base_tests_utils") {
Henrik Kjellanderc0362762017-06-29 06:03:041674 testonly = true
1675 sources = [
Henrik Kjellanderc0362762017-06-29 06:03:041676 "cpu_time.cc",
1677 "cpu_time.h",
Steve Anton10542f22019-01-11 17:11:001678 "fake_clock.cc",
1679 "fake_clock.h",
Qingsi Wang09619332018-09-13 05:51:551680 "fake_mdns_responder.h",
Steve Anton10542f22019-01-11 17:11:001681 "fake_network.h",
1682 "fake_ssl_identity.cc",
1683 "fake_ssl_identity.h",
1684 "firewall_socket_server.cc",
1685 "firewall_socket_server.h",
Niels Möllere7547d52018-11-01 08:33:081686 "memory_stream.cc",
1687 "memory_stream.h",
Henrik Kjellanderc0362762017-06-29 06:03:041688 "memory_usage.cc",
1689 "memory_usage.h",
Steve Anton10542f22019-01-11 17:11:001690 "nat_server.cc",
1691 "nat_server.h",
1692 "nat_socket_factory.cc",
1693 "nat_socket_factory.h",
1694 "nat_types.cc",
1695 "nat_types.h",
1696 "proxy_server.cc",
1697 "proxy_server.h",
Niels Möller44153152018-12-17 13:04:051698 "server_socket_adapters.cc",
1699 "server_socket_adapters.h",
Steve Anton10542f22019-01-11 17:11:001700 "sigslot_tester.h",
Steve Anton10542f22019-01-11 17:11:001701 "test_base64.h",
1702 "test_certificate_verifier.h",
1703 "test_echo_server.cc",
1704 "test_echo_server.h",
1705 "test_utils.cc",
1706 "test_utils.h",
1707 "virtual_socket_server.cc",
1708 "virtual_socket_server.h",
Henrik Kjellanderc0362762017-06-29 06:03:041709 ]
Henrik Kjellanderc0362762017-06-29 06:03:041710 deps = [
Florent Castellia138c6c2023-01-04 11:01:091711 ":async_packet_socket",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011712 ":async_socket",
Florent Castellia138c6c2023-01-04 11:01:091713 ":async_tcp_socket",
1714 ":async_udp_socket",
Per K056782c2024-01-30 11:32:051715 ":buffer",
Florent Castelliceb7b362022-04-19 15:35:041716 ":byte_buffer",
Patrik Höglunda8005cf2017-12-13 15:05:421717 ":checks",
Philipp Hancke57dbb1e2024-05-14 15:35:241718 ":digest",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011719 ":ip_address",
Florent Castelli0af55ba2022-04-04 13:06:301720 ":logging",
Florent Castelli4467ad72022-04-04 13:18:461721 ":macromagic",
Florent Castellia138c6c2023-01-04 11:01:091722 ":mdns_responder_interface",
1723 ":network",
Florent Castelli33d31fb2022-04-04 14:57:521724 ":rtc_event",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011725 ":socket",
Florent Castellia138c6c2023-01-04 11:01:091726 ":socket_adapters",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011727 ":socket_address",
Florent Castellia138c6c2023-01-04 11:01:091728 ":socket_address_pair",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011729 ":socket_factory",
1730 ":socket_server",
Florent Castellia138c6c2023-01-04 11:01:091731 ":ssl",
1732 ":stream",
Florent Castelli57aa81b2022-04-04 15:14:021733 ":stringutils",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011734 ":threading",
Florent Castellidd837e22022-04-04 15:16:151735 ":timeutils",
Per K056782c2024-01-30 11:32:051736 "../api:array_view",
Danil Chapovalovbabdaa862022-09-16 10:41:111737 "../api:make_ref_counted",
1738 "../api:refcountedbase",
1739 "../api:scoped_refptr",
Harald Alvestrand24510d42023-11-13 11:52:161740 "../api:sequence_checker",
Danil Chapovalovbabdaa862022-09-16 10:41:111741 "../api/task_queue",
Sebastian Jansson5f83cf02018-05-08 12:52:221742 "../api/units:time_delta",
Sebastian Janssond624c392019-04-17 08:36:031743 "../api/units:timestamp",
Jonas Orelandc06fe8b2022-03-28 12:58:261744 "../test:scoped_key_value_config",
1745 "memory:always_valid_pointer",
Niels Möller13339482019-03-28 12:30:151746 "memory:fifo_buffer",
Per K14630a72023-11-22 13:08:581747 "network:received_packet",
Markus Handell18523c32020-07-08 15:55:581748 "synchronization:mutex",
Artem Titove41c4332018-07-25 13:04:281749 "third_party/sigslot",
Steve Anton2acd1632019-03-25 20:48:301750 "//third_party/abseil-cpp/absl/algorithm:container",
Karl Wiberg918f50c2018-07-05 09:40:331751 "//third_party/abseil-cpp/absl/memory",
Florent Castelli99c519b2024-05-23 11:21:531752 "//third_party/abseil-cpp/absl/strings:string_view",
Henrik Kjellanderc0362762017-06-29 06:03:041753 ]
Sarah Phamf1fa6ac72023-01-15 23:43:341754 if (is_fuchsia) {
1755 deps += [ "//third_party/fuchsia-sdk/sdk/pkg/zx" ]
1756 }
Henrik Kjellanderc0362762017-06-29 06:03:041757}
1758
Mirko Bonadei86d053c2019-10-17 19:32:041759rtc_library("task_queue_for_test") {
Tommida8781f2018-02-19 11:41:431760 testonly = true
1761
1762 sources = [
1763 "task_queue_for_test.cc",
1764 "task_queue_for_test.h",
1765 ]
1766 deps = [
1767 ":checks",
Danil Chapovalovd26a9162019-03-19 17:08:371768 ":rtc_event",
Danil Chapovalov5286dcf2022-07-18 15:04:561769 "../api:function_view",
Danil Chapovaloveb90e6f2019-10-15 08:04:571770 "../api/task_queue",
Danil Chapovalovd26a9162019-03-19 17:08:371771 "../api/task_queue:default_task_queue_factory",
Danil Chapovalov5286dcf2022-07-18 15:04:561772 "//third_party/abseil-cpp/absl/cleanup",
Florent Castelli99c519b2024-05-23 11:21:531773 "//third_party/abseil-cpp/absl/strings:string_view",
Danil Chapovalov5286dcf2022-07-18 15:04:561774 ]
Tommida8781f2018-02-19 11:41:431775}
1776
Henrik Kjellanderc0362762017-06-29 06:03:041777if (rtc_include_tests) {
Mirko Bonadei86d053c2019-10-17 19:32:041778 rtc_library("sigslot_unittest") {
Artem Titove41c4332018-07-25 13:04:281779 testonly = true
Mirko Bonadeiccbe95f2020-01-21 11:10:101780 sources = [ "sigslot_unittest.cc" ]
Artem Titove41c4332018-07-25 13:04:281781 deps = [
Mirko Bonadeie3abb812018-11-23 12:15:081782 ":gunit_helpers",
Artem Titove41c4332018-07-25 13:04:281783 ":rtc_base_tests_utils",
Yves Gerey3e707812018-11-28 15:47:491784 "../test:test_support",
Markus Handell18523c32020-07-08 15:55:581785 "synchronization:mutex",
Artem Titove41c4332018-07-25 13:04:281786 "third_party/sigslot",
1787 ]
1788 }
1789
Karl Wiberg70026f92020-09-18 08:03:161790 rtc_library("untyped_function_unittest") {
Karl Wiberg78e9acd2020-09-15 09:06:341791 testonly = true
Karl Wiberg70026f92020-09-18 08:03:161792 sources = [ "untyped_function_unittest.cc" ]
Karl Wiberg78e9acd2020-09-15 09:06:341793 deps = [
Karl Wiberg70026f92020-09-18 08:03:161794 ":untyped_function",
Karl Wiberg78e9acd2020-09-15 09:06:341795 "../test:test_support",
1796 ]
1797 }
1798
Henrik Boström27c29362019-10-21 13:21:551799 rtc_library("rtc_operations_chain_unittests") {
1800 testonly = true
1801
Mirko Bonadeiccbe95f2020-01-21 11:10:101802 sources = [ "operations_chain_unittest.cc" ]
Henrik Boström27c29362019-10-21 13:21:551803 deps = [
Henrik Boströme8b00a12020-08-25 15:11:201804 ":gunit_helpers",
Henrik Boström27c29362019-10-21 13:21:551805 ":rtc_event",
1806 ":rtc_operations_chain",
Mirko Bonadeie5f4c6b2021-01-15 09:41:011807 ":threading",
Henrik Boström27c29362019-10-21 13:21:551808 "../test:test_support",
1809 ]
1810 }
1811
Andrey Logvine7c79fd2021-02-01 09:56:371812 if (!build_with_chromium) {
1813 rtc_library("rtc_base_nonparallel_tests") {
1814 testonly = true
Henrik Kjellanderc0362762017-06-29 06:03:041815
Andrey Logvine7c79fd2021-02-01 09:56:371816 sources = [
1817 "cpu_time_unittest.cc",
1818 "file_rotating_stream_unittest.cc",
1819 "null_socket_server_unittest.cc",
1820 "physical_socket_server_unittest.cc",
1821 "socket_address_unittest.cc",
1822 "socket_unittest.cc",
1823 "socket_unittest.h",
Tommi16db7ff2020-09-26 09:57:261824 ]
Andrey Logvine7c79fd2021-02-01 09:56:371825 deps = [
Florent Castellia138c6c2023-01-04 11:01:091826 ":async_packet_socket",
1827 ":async_udp_socket",
Florent Castellif9c59842022-04-19 15:07:231828 ":buffer",
Andrey Logvine7c79fd2021-02-01 09:56:371829 ":checks",
Florent Castellia138c6c2023-01-04 11:01:091830 ":file_rotating_stream",
Andrey Logvine7c79fd2021-02-01 09:56:371831 ":gunit_helpers",
1832 ":ip_address",
Florent Castelli0af55ba2022-04-04 13:06:301833 ":logging",
Florent Castelli4467ad72022-04-04 13:18:461834 ":macromagic",
Andrey Logvine7c79fd2021-02-01 09:56:371835 ":net_helpers",
Mirko Bonadei0d8b79e2023-07-27 06:55:491836 ":net_test_helpers",
Andrey Logvine7c79fd2021-02-01 09:56:371837 ":null_socket_server",
Florent Castelli45a05992022-04-14 10:18:281838 ":platform_thread",
Andrey Logvine7c79fd2021-02-01 09:56:371839 ":rtc_base_tests_utils",
1840 ":socket",
1841 ":socket_address",
1842 ":socket_server",
1843 ":testclient",
1844 ":threading",
Florent Castellidd837e22022-04-04 15:16:151845 ":timeutils",
Markus Handell9a21c492022-08-25 11:40:131846 "../api/units:time_delta",
Per K056782c2024-01-30 11:32:051847 "../api/units:timestamp",
Andrey Logvine7c79fd2021-02-01 09:56:371848 "../system_wrappers",
Per Kjellanderfdcfefa2022-11-08 11:48:521849 "../test:field_trial",
Andrey Logvine7c79fd2021-02-01 09:56:371850 "../test:fileutils",
1851 "../test:test_main",
1852 "../test:test_support",
1853 "third_party/sigslot",
1854 "//testing/gtest",
Ali Tofigh7fa90572022-03-17 14:47:491855 "//third_party/abseil-cpp/absl/memory",
Florent Castelli99c519b2024-05-23 11:21:531856 "//third_party/abseil-cpp/absl/strings:string_view",
Ali Tofigh7fa90572022-03-17 14:47:491857 ]
Tommi16db7ff2020-09-26 09:57:261858 }
Andrey Logvine7c79fd2021-02-01 09:56:371859
1860 rtc_library("rtc_base_approved_unittests") {
1861 testonly = true
1862 sources = [
Andrey Logvine7c79fd2021-02-01 09:56:371863 "base64_unittest.cc",
1864 "bit_buffer_unittest.cc",
Danil Chapovalove546ff92023-07-21 12:06:201865 "bitrate_tracker_unittest.cc",
Danil Chapovalov5af152c2021-08-31 13:27:511866 "bitstream_reader_unittest.cc",
Andrey Logvine7c79fd2021-02-01 09:56:371867 "bounded_inline_vector_unittest.cc",
1868 "buffer_queue_unittest.cc",
1869 "buffer_unittest.cc",
1870 "byte_buffer_unittest.cc",
1871 "byte_order_unittest.cc",
1872 "checks_unittest.cc",
1873 "copy_on_write_buffer_unittest.cc",
1874 "deprecated/recursive_critical_section_unittest.cc",
1875 "event_tracer_unittest.cc",
1876 "event_unittest.cc",
Danil Chapovalove546ff92023-07-21 12:06:201877 "frequency_tracker_unittest.cc",
Andrey Logvine7c79fd2021-02-01 09:56:371878 "logging_unittest.cc",
1879 "numerics/divide_round_unittest.cc",
1880 "numerics/histogram_percentile_counter_unittest.cc",
1881 "numerics/mod_ops_unittest.cc",
1882 "numerics/moving_max_counter_unittest.cc",
1883 "numerics/safe_compare_unittest.cc",
1884 "numerics/safe_minmax_unittest.cc",
1885 "numerics/sample_counter_unittest.cc",
1886 "one_time_event_unittest.cc",
1887 "platform_thread_unittest.cc",
1888 "random_unittest.cc",
1889 "rate_limiter_unittest.cc",
1890 "rate_statistics_unittest.cc",
1891 "rate_tracker_unittest.cc",
1892 "ref_counted_object_unittest.cc",
1893 "sanitizer_unittest.cc",
1894 "string_encode_unittest.cc",
1895 "string_to_number_unittest.cc",
1896 "string_utils_unittest.cc",
Sergey Silkinebc4d3e2023-11-15 10:04:481897 "strings/str_join_unittest.cc",
Andrey Logvine7c79fd2021-02-01 09:56:371898 "strings/string_builder_unittest.cc",
1899 "strings/string_format_unittest.cc",
Victor Boivieb9182302021-09-21 12:51:051900 "strong_alias_unittest.cc",
Andrey Logvine7c79fd2021-02-01 09:56:371901 "swap_queue_unittest.cc",
1902 "thread_annotations_unittest.cc",
Andrey Logvine7c79fd2021-02-01 09:56:371903 "time_utils_unittest.cc",
1904 "timestamp_aligner_unittest.cc",
1905 "virtual_socket_unittest.cc",
1906 "zero_memory_unittest.cc",
1907 ]
Andrey Logvine7c79fd2021-02-01 09:56:371908 deps = [
Florent Castellia138c6c2023-01-04 11:01:091909 ":async_packet_socket",
1910 ":async_udp_socket",
Florent Castelli7f623b02022-04-14 11:34:561911 ":bit_buffer",
Danil Chapovalove546ff92023-07-21 12:06:201912 ":bitrate_tracker",
Danil Chapovalov5af152c2021-08-31 13:27:511913 ":bitstream_reader",
Andrey Logvine7c79fd2021-02-01 09:56:371914 ":bounded_inline_vector",
Florent Castellif9c59842022-04-19 15:07:231915 ":buffer",
Florent Castelli76063752022-04-19 15:14:261916 ":buffer_queue",
Florent Castelliceb7b362022-04-19 15:35:041917 ":byte_buffer",
Florent Castellia876a922022-04-19 15:18:361918 ":byte_order",
Andrey Logvine7c79fd2021-02-01 09:56:371919 ":checks",
Florent Castellied4aadc2022-04-19 15:40:461920 ":copy_on_write_buffer",
Niels Möller9233af32021-06-22 09:24:061921 ":criticalsection",
Philipp Hancke41586782024-06-06 14:31:071922 ":crypto_random",
Andrey Logvine7c79fd2021-02-01 09:56:371923 ":divide_round",
Florent Castellia30aef32022-04-19 15:47:131924 ":event_tracer",
Danil Chapovalove546ff92023-07-21 12:06:201925 ":frequency_tracker",
Andrey Logvine7c79fd2021-02-01 09:56:371926 ":gunit_helpers",
Florent Castelli17296422022-04-14 11:48:101927 ":histogram_percentile_counter",
Andrey Logvine7c79fd2021-02-01 09:56:371928 ":ip_address",
Florent Castelli0af55ba2022-04-04 13:06:301929 ":logging",
Florent Castelli4467ad72022-04-04 13:18:461930 ":macromagic",
Florent Castelli31764092022-04-14 11:41:581931 ":mod_ops",
1932 ":moving_max_counter",
Andrey Logvine7c79fd2021-02-01 09:56:371933 ":null_socket_server",
Florent Castelli6b608592022-04-14 11:18:041934 ":one_time_event",
Florent Castelli45a05992022-04-14 10:18:281935 ":platform_thread",
Florent Castelli71337f32022-04-14 10:41:261936 ":random",
Andrey Logvine7c79fd2021-02-01 09:56:371937 ":rate_limiter",
Florent Castelli6bb1fd32022-04-19 13:58:391938 ":rate_statistics",
Florent Castelli58cc4682022-04-19 13:50:281939 ":rate_tracker",
Florent Castellif86f6f92022-04-05 00:54:121940 ":refcount",
Andrey Logvine7c79fd2021-02-01 09:56:371941 ":rtc_base_tests_utils",
Florent Castelli33d31fb2022-04-04 14:57:521942 ":rtc_event",
Andrey Logvine7c79fd2021-02-01 09:56:371943 ":rtc_numerics",
Andrey Logvine7c79fd2021-02-01 09:56:371944 ":safe_compare",
1945 ":safe_minmax",
Florent Castelli83a36d42022-04-14 11:44:391946 ":sample_counter",
Andrey Logvine7c79fd2021-02-01 09:56:371947 ":sanitizer",
1948 ":socket",
1949 ":socket_address",
1950 ":socket_server",
Florent Castellia138c6c2023-01-04 11:01:091951 ":ssl",
Andrey Logvine7c79fd2021-02-01 09:56:371952 ":stringutils",
Florent Castellia6c10e32022-04-14 11:08:441953 ":strong_alias",
Florent Castellid119b9e2022-04-14 11:23:511954 ":swap_queue",
Andrey Logvine7c79fd2021-02-01 09:56:371955 ":testclient",
1956 ":threading",
Florent Castellib1dc4e42022-04-14 11:20:121957 ":timestamp_aligner",
Florent Castellidd837e22022-04-04 15:16:151958 ":timeutils",
Florent Castellid119b9e2022-04-14 11:23:511959 ":zero_memory",
Andrey Logvine7c79fd2021-02-01 09:56:371960 "../api:array_view",
Niels Möller105711e2022-06-14 13:48:261961 "../api:make_ref_counted",
Harald Alvestrand78f905e2023-11-02 14:09:261962 "../api:ref_count",
Andrey Logvine7c79fd2021-02-01 09:56:371963 "../api:scoped_refptr",
1964 "../api/numerics",
Danil Chapovalove546ff92023-07-21 12:06:201965 "../api/units:data_rate",
1966 "../api/units:data_size",
1967 "../api/units:frequency",
Andrey Logvine7c79fd2021-02-01 09:56:371968 "../api/units:time_delta",
Danil Chapovalove546ff92023-07-21 12:06:201969 "../api/units:timestamp",
Andrey Logvine7c79fd2021-02-01 09:56:371970 "../system_wrappers",
1971 "../test:fileutils",
1972 "../test:test_main",
1973 "../test:test_support",
Nico Weber79bd4f12021-10-05 19:01:261974 "containers:flat_map",
Victor Boiviefd954fc2021-06-29 07:21:111975 "containers:unittests",
Andrey Logvine7c79fd2021-02-01 09:56:371976 "memory:unittests",
Per Kc202f962023-12-14 12:09:021977 "network:received_packet",
Andrey Logvine7c79fd2021-02-01 09:56:371978 "synchronization:mutex",
Danil Chapovalovf1361652022-09-02 13:40:261979 "task_utils:repeating_task",
Andrey Logvine7c79fd2021-02-01 09:56:371980 "third_party/base64",
1981 "third_party/sigslot",
Andrey Logvine7c79fd2021-02-01 09:56:371982 "//third_party/abseil-cpp/absl/base:core_headers",
1983 "//third_party/abseil-cpp/absl/memory",
Danil Chapovalov5af152c2021-08-31 13:27:511984 "//third_party/abseil-cpp/absl/numeric:bits",
Florent Castelli99c519b2024-05-23 11:21:531985 "//third_party/abseil-cpp/absl/strings:string_view",
Tommi16db7ff2020-09-26 09:57:261986 ]
Florent Castelli15a3c3f2022-04-27 08:33:271987
1988 if (is_win) {
1989 deps += [ "win:windows_version_unittest" ]
1990 }
Tommi16db7ff2020-09-26 09:57:261991 }
Andrey Logvine7c79fd2021-02-01 09:56:371992
1993 rtc_library("rtc_task_queue_unittests") {
1994 testonly = true
1995
1996 sources = [ "task_queue_unittest.cc" ]
1997 deps = [
1998 ":gunit_helpers",
Andrey Logvine7c79fd2021-02-01 09:56:371999 ":rtc_base_tests_utils",
Florent Castelli33d31fb2022-04-04 14:57:522000 ":rtc_event",
Andrey Logvine7c79fd2021-02-01 09:56:372001 ":task_queue_for_test",
Florent Castellidd837e22022-04-04 15:16:152002 ":timeutils",
Danil Chapovalov5286dcf2022-07-18 15:04:562003 "../api/units:time_delta",
Andrey Logvine7c79fd2021-02-01 09:56:372004 "../test:test_main",
2005 "../test:test_support",
Florent Castelli99c519b2024-05-23 11:21:532006 "//third_party/abseil-cpp/absl/memory",
Andrey Logvine7c79fd2021-02-01 09:56:372007 ]
Diogo Real1dca9d52017-08-29 19:18:322008 }
Andrey Logvine7c79fd2021-02-01 09:56:372009
2010 rtc_library("weak_ptr_unittests") {
2011 testonly = true
2012
2013 sources = [ "weak_ptr_unittest.cc" ]
2014 deps = [
2015 ":gunit_helpers",
Andrey Logvine7c79fd2021-02-01 09:56:372016 ":rtc_base_tests_utils",
2017 ":rtc_event",
2018 ":task_queue_for_test",
2019 ":weak_ptr",
2020 "../test:test_main",
2021 "../test:test_support",
2022 ]
2023 }
2024
2025 rtc_library("rtc_numerics_unittests") {
2026 testonly = true
2027
2028 sources = [
2029 "numerics/event_based_exponential_moving_average_unittest.cc",
2030 "numerics/exp_filter_unittest.cc",
2031 "numerics/moving_average_unittest.cc",
Rasmus Brandt91664812022-09-14 14:22:242032 "numerics/moving_percentile_filter_unittest.cc",
Andrey Logvine7c79fd2021-02-01 09:56:372033 "numerics/percentile_filter_unittest.cc",
2034 "numerics/running_statistics_unittest.cc",
Evan Shrubsole097fc342023-01-09 10:21:432035 "numerics/sequence_number_unwrapper_unittest.cc",
Andrey Logvine7c79fd2021-02-01 09:56:372036 "numerics/sequence_number_util_unittest.cc",
2037 ]
2038 deps = [
Björn Terelius72302cc2024-06-12 08:07:502039 ":mod_ops",
Andrey Logvine7c79fd2021-02-01 09:56:372040 ":rtc_numerics",
Evan Shrubsoleaa5897d2022-12-15 09:30:522041 ":timeutils",
Andrey Logvine7c79fd2021-02-01 09:56:372042 "../test:test_main",
2043 "../test:test_support",
Florent Castelli99c519b2024-05-23 11:21:532044 "//third_party/abseil-cpp/absl/algorithm:container",
Andrey Logvine7c79fd2021-02-01 09:56:372045 ]
Andrey Logvine7c79fd2021-02-01 09:56:372046 }
2047
2048 rtc_library("rtc_json_unittests") {
2049 testonly = true
2050
2051 sources = [ "strings/json_unittest.cc" ]
2052 deps = [
2053 ":gunit_helpers",
2054 ":rtc_base_tests_utils",
2055 ":rtc_json",
2056 "../test:test_main",
2057 "../test:test_support",
2058 ]
2059 }
2060
2061 rtc_library("rtc_base_unittests") {
2062 testonly = true
2063 defines = []
2064
2065 sources = [
Andrey Logvine7c79fd2021-02-01 09:56:372066 "crc32_unittest.cc",
Philipp Hancke41586782024-06-06 14:31:072067 "crypto_random_unittest.cc",
Andrey Logvine7c79fd2021-02-01 09:56:372068 "data_rate_limiter_unittest.cc",
Andrey Logvine7c79fd2021-02-01 09:56:372069 "fake_clock_unittest.cc",
Andrey Logvine7c79fd2021-02-01 09:56:372070 "ip_address_unittest.cc",
2071 "memory_usage_unittest.cc",
2072 "message_digest_unittest.cc",
2073 "nat_unittest.cc",
2074 "network_route_unittest.cc",
2075 "network_unittest.cc",
Andrey Logvine7c79fd2021-02-01 09:56:372076 "rolling_accumulator_unittest.cc",
2077 "rtc_certificate_generator_unittest.cc",
2078 "rtc_certificate_unittest.cc",
2079 "sigslot_tester_unittest.cc",
2080 "test_client_unittest.cc",
2081 "thread_unittest.cc",
2082 "unique_id_generator_unittest.cc",
2083 ]
2084 deps = [
Florent Castellia138c6c2023-01-04 11:01:092085 ":async_packet_socket",
2086 ":async_tcp_socket",
2087 ":async_udp_socket",
Florent Castellif9c59842022-04-19 15:07:232088 ":buffer",
Florent Castelli76063752022-04-19 15:14:262089 ":buffer_queue",
Andrey Logvine7c79fd2021-02-01 09:56:372090 ":checks",
Florent Castellia138c6c2023-01-04 11:01:092091 ":crc32",
Philipp Hancke41586782024-06-06 14:31:072092 ":crypto_random",
Florent Castellia138c6c2023-01-04 11:01:092093 ":data_rate_limiter",
Philipp Hancke57dbb1e2024-05-14 15:35:242094 ":digest",
Andrey Logvine7c79fd2021-02-01 09:56:372095 ":gunit_helpers",
Florent Castellia138c6c2023-01-04 11:01:092096 ":ifaddrs_converter",
Andrey Logvine7c79fd2021-02-01 09:56:372097 ":ip_address",
Florent Castelli0af55ba2022-04-04 13:06:302098 ":logging",
Florent Castelli4467ad72022-04-04 13:18:462099 ":macromagic",
Andrey Logvine7c79fd2021-02-01 09:56:372100 ":net_helpers",
Mirko Bonadei0d8b79e2023-07-27 06:55:492101 ":net_test_helpers",
Florent Castellia138c6c2023-01-04 11:01:092102 ":network",
2103 ":network_route",
Andrey Logvine7c79fd2021-02-01 09:56:372104 ":null_socket_server",
Danil Chapovalov16242932022-09-02 09:10:242105 ":refcount",
Florent Castellia138c6c2023-01-04 11:01:092106 ":rolling_accumulator",
Andrey Logvine7c79fd2021-02-01 09:56:372107 ":rtc_base_tests_utils",
Florent Castellia138c6c2023-01-04 11:01:092108 ":rtc_certificate_generator",
Florent Castelli33d31fb2022-04-04 14:57:522109 ":rtc_event",
Florent Castellie10a9f62022-04-04 15:04:372110 ":safe_conversions",
Niels Möllerd0b88792021-08-12 08:32:302111 ":socket",
Florent Castellia138c6c2023-01-04 11:01:092112 ":socket_adapters",
Andrey Logvine7c79fd2021-02-01 09:56:372113 ":socket_address",
2114 ":socket_factory",
2115 ":socket_server",
Florent Castellia138c6c2023-01-04 11:01:092116 ":ssl",
Philipp Hanckec7fd5af2024-05-17 20:49:052117 ":ssl_adapter",
Philipp Hancke57dbb1e2024-05-14 15:35:242118 ":ssl_header",
Florent Castellia138c6c2023-01-04 11:01:092119 ":stream",
Andrey Logvine7c79fd2021-02-01 09:56:372120 ":stringutils",
2121 ":testclient",
2122 ":threading",
Florent Castellidd837e22022-04-04 15:16:152123 ":timeutils",
Florent Castellia138c6c2023-01-04 11:01:092124 ":unique_id_generator",
Andrey Logvine7c79fd2021-02-01 09:56:372125 "../api:array_view",
Ali Tofigh4b681942022-08-23 10:57:162126 "../api:field_trials_view",
Niels Möller105711e2022-06-14 13:48:262127 "../api:make_ref_counted",
Harald Alvestrand53c424e2024-08-01 06:31:022128 "../api:sequence_checker",
Andrey Logvine7c79fd2021-02-01 09:56:372129 "../api/task_queue",
Artem Titovc374d112022-06-16 19:27:452130 "../api/task_queue:pending_task_safety_flag",
Andrey Logvine7c79fd2021-02-01 09:56:372131 "../api/task_queue:task_queue_test",
Danil Chapovalov4bcf8092022-07-06 17:42:342132 "../api/units:time_delta",
Andrey Logvine7c79fd2021-02-01 09:56:372133 "../test:field_trial",
2134 "../test:fileutils",
2135 "../test:rtc_expect_death",
Jonas Orelandc06fe8b2022-03-28 12:58:262136 "../test:scoped_key_value_config",
Andrey Logvine7c79fd2021-02-01 09:56:372137 "../test:test_main",
2138 "../test:test_support",
2139 "memory:fifo_buffer",
Per Kc202f962023-12-14 12:09:022140 "network:received_packet",
Andrey Logvine7c79fd2021-02-01 09:56:372141 "synchronization:mutex",
Andrey Logvine7c79fd2021-02-01 09:56:372142 "third_party/sigslot",
Harald Alvestrand53c424e2024-08-01 06:31:022143 "//testing/gtest",
Florent Castelli99c519b2024-05-23 11:21:532144 "//third_party/abseil-cpp/absl/algorithm:container",
2145 "//third_party/abseil-cpp/absl/functional:any_invocable",
2146 "//third_party/abseil-cpp/absl/memory",
2147 "//third_party/abseil-cpp/absl/strings",
2148 "//third_party/abseil-cpp/absl/strings:string_view",
Andrey Logvine7c79fd2021-02-01 09:56:372149 ]
Peter Kasting049f5ef2023-03-14 16:56:252150 if (rtc_enable_google_benchmarks) {
Andrey Logvine7c79fd2021-02-01 09:56:372151 deps += [ "synchronization:synchronization_unittests" ]
2152 }
2153 if (is_win) {
Philipp Hancke1cc41ea2023-05-24 16:49:102154 sources += [ "win32_unittest.cc" ]
Andrey Logvine7c79fd2021-02-01 09:56:372155 deps += [ ":win32" ]
2156 }
Philipp Hancke1a5630e2023-09-04 07:40:192157 if (is_posix || is_fuchsia || is_win) {
Andrey Logvine7c79fd2021-02-01 09:56:372158 sources += [
2159 "openssl_adapter_unittest.cc",
2160 "openssl_session_cache_unittest.cc",
2161 "openssl_utility_unittest.cc",
2162 "ssl_adapter_unittest.cc",
2163 "ssl_identity_unittest.cc",
2164 "ssl_stream_adapter_unittest.cc",
2165 ]
Tommi7e41c062024-04-28 20:40:562166 deps += [ ":callback_list" ]
Andrey Logvine7c79fd2021-02-01 09:56:372167 }
Florent Castellib96902d2022-04-14 09:58:242168
Andrey Logvine7c79fd2021-02-01 09:56:372169 if (build_with_chromium) {
2170 include_dirs = [ "../../boringssl/src/include" ]
2171 }
2172 if (rtc_build_ssl) {
2173 deps += [ "//third_party/boringssl" ]
2174 } else {
Philipp Hancke06a49f02024-08-22 18:52:332175 configs += [ "..:external_ssl_library" ]
Andrey Logvine7c79fd2021-02-01 09:56:372176 }
Diogo Real1dca9d52017-08-29 19:18:322177 }
Henrik Kjellanderc0362762017-06-29 06:03:042178 }
2179}
2180
Henrik Kjellander73e21802017-06-20 06:38:582181if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:332182 rtc_android_library("base_java") {
Sami Kalliomäki51f599b2019-07-03 12:13:082183 visibility = [ "*" ]
Natalie Chouinard65bbcab2019-12-23 22:02:252184 sources = [
Henrik Kjellanderc0362762017-06-29 06:03:042185 "java/src/org/webrtc/ContextUtils.java",
Paulina Hensman1ec04f12018-06-21 12:31:382186 "java/src/org/webrtc/Loggable.java",
Henrik Kjellanderc0362762017-06-29 06:03:042187 "java/src/org/webrtc/Logging.java",
2188 "java/src/org/webrtc/Size.java",
2189 "java/src/org/webrtc/ThreadUtils.java",
2190 ]
Byoungchan Lee02334e02021-08-14 02:41:592191 deps = [ "//third_party/androidx:androidx_annotation_annotation_java" ]
Henrik Kjellander73e21802017-06-20 06:38:582192 }
Jonas Orelandf7721fb2020-08-07 09:08:342193 java_cpp_enum("network_monitor_enums") {
2194 sources = [ "network_monitor.h" ]
Jonas Orelandfe4688e2020-08-07 12:08:332195 visibility = [ "*" ]
Jonas Orelandf7721fb2020-08-07 09:08:342196 }
Henrik Kjellander73e21802017-06-20 06:38:582197}