Bug 1924098 - Vendor libwebrtc from 65b59a9c2d

Upstream commit: https://webrtc.googlesource.com/src/+/65b59a9c2d96d2afb8de88d161e0282c89a6f184
    Prepend webrtc ns to StrJoin calls in dcsctp ns

    Bug: webrtc:365299886
    Change-Id: I4eb87a2b116c3e18b1a84865fab0a22a6084912c
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361980
    Reviewed-by: Harald Alvestrand <hta@webrtc.org>
    Commit-Queue: Dor Hen <dorhen@meta.com>
    Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#42980}
This commit is contained in:
Michael Froman 2024-10-15 18:24:05 -05:00
parent 32451c7bab
commit 4f5797773a
8 changed files with 46 additions and 39 deletions

View File

@ -32727,3 +32727,6 @@ c9aaf11985
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
26146bbce0
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
65b59a9c2d

View File

@ -21842,3 +21842,5 @@ libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-10-15T23:21:29.177608.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-10-15T23:22:24.165846.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-10-15T23:23:54.702743.

View File

@ -145,8 +145,8 @@ std::string SackChunk::ToString() const {
}
if (!duplicate_tsns_.empty()) {
sb << ", dup_tsns="
<< StrJoin(duplicate_tsns(), ",",
[](rtc::StringBuilder& sb, TSN tsn) { sb << *tsn; });
<< webrtc::StrJoin(duplicate_tsns(), ",",
[](rtc::StringBuilder& sb, TSN tsn) { sb << *tsn; });
}
return sb.Release();

View File

@ -115,10 +115,9 @@ void ReassemblyQueue::Add(TSN tsn, Data data) {
void ReassemblyQueue::ResetStreamsAndLeaveDeferredReset(
rtc::ArrayView<const StreamID> stream_ids) {
RTC_DLOG(LS_VERBOSE) << log_prefix_ << "Resetting streams: ["
<< StrJoin(stream_ids, ",",
[](rtc::StringBuilder& sb, StreamID sid) {
sb << *sid;
})
<< webrtc::StrJoin(stream_ids, ",",
[](rtc::StringBuilder& sb,
StreamID sid) { sb << *sid; })
<< "]";
// https://tools.ietf.org/html/rfc6525#section-5.2.2
@ -169,10 +168,11 @@ void ReassemblyQueue::AddReassembledMessage(
rtc::ArrayView<const UnwrappedTSN> tsns,
DcSctpMessage message) {
RTC_DLOG(LS_VERBOSE) << log_prefix_ << "Assembled message from TSN=["
<< StrJoin(tsns, ",",
[](rtc::StringBuilder& sb, UnwrappedTSN tsn) {
sb << *tsn.Wrap();
})
<< webrtc::StrJoin(
tsns, ",",
[](rtc::StringBuilder& sb, UnwrappedTSN tsn) {
sb << *tsn.Wrap();
})
<< "], message; stream_id=" << *message.stream_id()
<< ", ppid=" << *message.ppid()
<< ", payload=" << message.payload().size() << " bytes";

View File

@ -261,10 +261,10 @@ void StreamResetHandler::HandleResponse(const ParameterDescriptor& descriptor) {
RTC_DLOG(LS_VERBOSE)
<< log_prefix_ << "Reset stream success, req_seq_nbr="
<< *current_request_->req_seq_nbr() << ", streams="
<< StrJoin(current_request_->streams(), ",",
[](rtc::StringBuilder& sb, StreamID stream_id) {
sb << *stream_id;
});
<< webrtc::StrJoin(current_request_->streams(), ",",
[](rtc::StringBuilder& sb, StreamID stream_id) {
sb << *stream_id;
});
ctx_->callbacks().OnStreamsResetPerformed(current_request_->streams());
current_request_ = std::nullopt;
retransmission_queue_->CommitResetStreams();
@ -273,10 +273,10 @@ void StreamResetHandler::HandleResponse(const ParameterDescriptor& descriptor) {
RTC_DLOG(LS_VERBOSE)
<< log_prefix_ << "Reset stream still pending, req_seq_nbr="
<< *current_request_->req_seq_nbr() << ", streams="
<< StrJoin(current_request_->streams(), ",",
[](rtc::StringBuilder& sb, StreamID stream_id) {
sb << *stream_id;
});
<< webrtc::StrJoin(current_request_->streams(), ",",
[](rtc::StringBuilder& sb, StreamID stream_id) {
sb << *stream_id;
});
// Force this request to be sent again, but with new req_seq_nbr.
current_request_->PrepareRetransmission();
reconfig_timer_->set_duration(ctx_->current_rto());
@ -290,10 +290,10 @@ void StreamResetHandler::HandleResponse(const ParameterDescriptor& descriptor) {
<< log_prefix_ << "Reset stream error=" << ToString(resp->result())
<< ", req_seq_nbr=" << *current_request_->req_seq_nbr()
<< ", streams="
<< StrJoin(current_request_->streams(), ",",
[](rtc::StringBuilder& sb, StreamID stream_id) {
sb << *stream_id;
});
<< webrtc::StrJoin(current_request_->streams(), ",",
[](rtc::StringBuilder& sb, StreamID stream_id) {
sb << *stream_id;
});
ctx_->callbacks().OnStreamsResetFailed(current_request_->streams(),
ToString(resp->result()));
current_request_ = std::nullopt;

View File

@ -430,11 +430,11 @@ RetransmissionQueue::GetChunksForFastRetransmit(size_t bytes_in_packet) {
rtx_bytes_count_ += bytes_retransmitted;
RTC_DLOG(LS_VERBOSE) << log_prefix_ << "Fast-retransmitting TSN "
<< StrJoin(to_be_sent, ",",
[&](rtc::StringBuilder& sb,
const std::pair<TSN, Data>& c) {
sb << *c.first;
})
<< webrtc::StrJoin(to_be_sent, ",",
[&](rtc::StringBuilder& sb,
const std::pair<TSN, Data>& c) {
sb << *c.first;
})
<< " - " << bytes_retransmitted
<< " bytes. unacked_bytes=" << unacked_bytes() << " ("
<< old_unacked_bytes << ")";
@ -511,11 +511,11 @@ std::vector<std::pair<TSN, Data>> RetransmissionQueue::GetChunksToSend(
t3_rtx_.Start();
}
RTC_DLOG(LS_VERBOSE) << log_prefix_ << "Sending TSN "
<< StrJoin(to_be_sent, ",",
[&](rtc::StringBuilder& sb,
const std::pair<TSN, Data>& c) {
sb << *c.first;
})
<< webrtc::StrJoin(to_be_sent, ",",
[&](rtc::StringBuilder& sb,
const std::pair<TSN, Data>& c) {
sb << *c.first;
})
<< " - "
<< absl::c_accumulate(
to_be_sent, 0,

View File

@ -84,9 +84,10 @@ bool RRSendQueue::IsConsistent() const {
if (expected_active_streams != actual_active_streams) {
auto fn = [&](rtc::StringBuilder& sb, const auto& p) { sb << *p; };
RTC_DLOG(LS_ERROR) << "Active streams mismatch, is=["
<< StrJoin(actual_active_streams, ",", fn)
<< webrtc::StrJoin(actual_active_streams, ",", fn)
<< "], expected=["
<< StrJoin(expected_active_streams, ",", fn) << "]";
<< webrtc::StrJoin(expected_active_streams, ",", fn)
<< "]";
return false;
}

View File

@ -42,11 +42,12 @@ std::optional<SendQueue::DataToSend> StreamScheduler::Produce(
RTC_DLOG(LS_VERBOSE) << log_prefix_
<< "Producing data, rescheduling=" << rescheduling
<< ", active="
<< StrJoin(active_streams_, ", ",
[&](rtc::StringBuilder& sb, const auto& p) {
sb << *p->stream_id() << "@"
<< *p->next_finish_time();
});
<< webrtc::StrJoin(
active_streams_, ", ",
[&](rtc::StringBuilder& sb, const auto& p) {
sb << *p->stream_id() << "@"
<< *p->next_finish_time();
});
RTC_DCHECK(rescheduling || current_stream_ != nullptr);