Per K 5566b91356 Reland "Replace usage of link_capacity_kbps with DataRate link_capacity"
This reverts commit ff2dd50fd88e07affc4b070ce535935409f6673a.

Reason for revert: Temporary fix for downstream breakage in patch 2

Original change's description:
> Revert "Replace usage of link_capacity_kbps with DataRate link_capacity"
>
> This reverts commit 6186c0226e41dabbfc5cc8527e6b350b62f39f02.
>
> Reason for revert: Breaks downstream project.
>
> Original change's description:
> > Replace usage of link_capacity_kbps with DataRate link_capacity
> >
> > Replace usage of BuiltInNetworkBehaviorConfig.link_capacity_kbps in tests with  DataRate link_capacity.
> >
> > Bug: webrtc:14525
> > Change-Id: Id1c1b8d20eb2be5e9d1461704bb7c37c61c491f0
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350300
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Per Kjellander <perkj@webrtc.org>
> > Reviewed-by: Björn Terelius <terelius@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#42306}
>
> Bug: webrtc:14525
> Change-Id: I09ede3e89d065061cb4133bff96dbf242ff70832
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350621
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42309}

Bug: webrtc:14525
Change-Id: Ie35cd97a158d008a80ed007b27d2c6b1a9affff9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350541
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42320}
2024-05-16 10:39:10 +00:00

286 lines
7.6 KiB
Plaintext

# Copyright (c) 2021 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
import("../../../webrtc.gni")
rtc_source_set("context") {
sources = [ "context.h" ]
deps = [
"../../../api/units:time_delta",
"../common:internal_types",
"../packet:sctp_packet",
"../public:socket",
"../public:types",
]
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
}
rtc_library("heartbeat_handler") {
deps = [
":context",
"../../../api:array_view",
"../../../api/units:time_delta",
"../../../rtc_base:checks",
"../../../rtc_base:logging",
"../packet:bounded_io",
"../packet:chunk",
"../packet:parameter",
"../packet:sctp_packet",
"../public:socket",
"../public:types",
"../timer",
]
sources = [
"heartbeat_handler.cc",
"heartbeat_handler.h",
]
absl_deps = [
"//third_party/abseil-cpp/absl/functional:bind_front",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
}
rtc_library("stream_reset_handler") {
deps = [
":context",
"../../../api:array_view",
"../../../api/units:time_delta",
"../../../rtc_base:checks",
"../../../rtc_base:logging",
"../../../rtc_base:stringutils",
"../../../rtc_base/containers:flat_set",
"../common:internal_types",
"../packet:chunk",
"../packet:parameter",
"../packet:sctp_packet",
"../packet:tlv_trait",
"../public:socket",
"../public:types",
"../rx:data_tracker",
"../rx:reassembly_queue",
"../timer",
"../tx:retransmission_queue",
]
sources = [
"stream_reset_handler.cc",
"stream_reset_handler.h",
]
absl_deps = [
"//third_party/abseil-cpp/absl/functional:bind_front",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
}
rtc_library("packet_sender") {
deps = [
"../packet:sctp_packet",
"../public:socket",
"../public:types",
"../timer",
]
sources = [
"packet_sender.cc",
"packet_sender.h",
]
absl_deps = []
}
rtc_library("transmission_control_block") {
deps = [
":context",
":heartbeat_handler",
":packet_sender",
":stream_reset_handler",
"../../../api:array_view",
"../../../api/task_queue:task_queue",
"../../../api/units:time_delta",
"../../../rtc_base:checks",
"../../../rtc_base:logging",
"../../../rtc_base:stringutils",
"../common:sequence_numbers",
"../packet:chunk",
"../packet:sctp_packet",
"../public:socket",
"../public:types",
"../rx:data_tracker",
"../rx:reassembly_queue",
"../timer",
"../tx:retransmission_error_counter",
"../tx:retransmission_queue",
"../tx:retransmission_timeout",
"../tx:send_queue",
]
sources = [
"capabilities.h",
"transmission_control_block.cc",
"transmission_control_block.h",
]
absl_deps = [
"//third_party/abseil-cpp/absl/functional:bind_front",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
}
rtc_library("dcsctp_socket") {
deps = [
":context",
":heartbeat_handler",
":packet_sender",
":stream_reset_handler",
":transmission_control_block",
"../../../api:array_view",
"../../../api:make_ref_counted",
"../../../api:refcountedbase",
"../../../api:scoped_refptr",
"../../../api/task_queue:task_queue",
"../../../rtc_base:checks",
"../../../rtc_base:logging",
"../../../rtc_base:stringutils",
"../common:internal_types",
"../packet:bounded_io",
"../packet:chunk",
"../packet:chunk_validators",
"../packet:data",
"../packet:error_cause",
"../packet:parameter",
"../packet:sctp_packet",
"../packet:tlv_trait",
"../public:socket",
"../public:types",
"../rx:data_tracker",
"../rx:reassembly_queue",
"../timer",
"../tx:retransmission_error_counter",
"../tx:retransmission_queue",
"../tx:retransmission_timeout",
"../tx:rr_send_queue",
"../tx:send_queue",
]
sources = [
"callback_deferrer.cc",
"callback_deferrer.h",
"dcsctp_socket.cc",
"dcsctp_socket.h",
"state_cookie.cc",
"state_cookie.h",
]
absl_deps = [
"//third_party/abseil-cpp/absl/functional:bind_front",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
"//third_party/abseil-cpp/absl/types:variant",
]
}
if (rtc_include_tests) {
rtc_source_set("mock_callbacks") {
testonly = true
sources = [ "mock_dcsctp_socket_callbacks.h" ]
deps = [
"../../../api:array_view",
"../../../api/task_queue:task_queue",
"../../../rtc_base:logging",
"../../../rtc_base:random",
"../../../test:test_support",
"../public:socket",
"../public:types",
"../timer",
]
absl_deps = [
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
}
rtc_source_set("mock_context") {
testonly = true
sources = [ "mock_context.h" ]
deps = [
":context",
":mock_callbacks",
"../../../test:test_support",
"../common:internal_types",
"../packet:sctp_packet",
"../public:socket",
"../public:types",
]
absl_deps = [
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
}
rtc_library("dcsctp_socket_unittests") {
testonly = true
deps = [
":dcsctp_socket",
":heartbeat_handler",
":mock_callbacks",
":mock_context",
":packet_sender",
":stream_reset_handler",
":transmission_control_block",
"../../../api:array_view",
"../../../api:create_network_emulation_manager",
"../../../api:network_emulation_manager_api",
"../../../api/task_queue",
"../../../api/task_queue:pending_task_safety_flag",
"../../../api/units:data_rate",
"../../../api/units:time_delta",
"../../../rtc_base:checks",
"../../../rtc_base:copy_on_write_buffer",
"../../../rtc_base:gunit_helpers",
"../../../rtc_base:logging",
"../../../rtc_base:rtc_base_tests_utils",
"../../../rtc_base:socket_address",
"../../../rtc_base:stringutils",
"../../../rtc_base:timeutils",
"../../../test:test_support",
"../common:handover_testing",
"../common:internal_types",
"../common:math",
"../packet:chunk",
"../packet:error_cause",
"../packet:parameter",
"../packet:sctp_packet",
"../packet:tlv_trait",
"../public:socket",
"../public:types",
"../public:utils",
"../rx:data_tracker",
"../rx:reassembly_queue",
"../testing:data_generator",
"../testing:testing_macros",
"../timer",
"../timer:task_queue_timeout",
"../tx:mock_send_queue",
"../tx:retransmission_queue",
]
absl_deps = [
"//third_party/abseil-cpp/absl/flags:flag",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
sources = [
"dcsctp_socket_network_test.cc",
"dcsctp_socket_test.cc",
"heartbeat_handler_test.cc",
"packet_sender_test.cc",
"state_cookie_test.cc",
"stream_reset_handler_test.cc",
"transmission_control_block_test.cc",
]
}
}