tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 6d9a60dd4e2819617e0e440d471bd0e2ae0e7ee1
parent d48b23d52de99cf727ea532d7ed0a55e7e60f0c6
Author: Michael Froman <mfroman@mozilla.com>
Date:   Wed,  8 Oct 2025 23:15:57 -0500

Bug 1993083 - Vendor libwebrtc from 10da6fee8b

Upstream commit: https://webrtc.googlesource.com/src/+/10da6fee8b0f1e6b6316231e3cf22a4954abccfa
    Move DeliverRtcp function to ArrayView

    Bug: webrtc:42225170
    Change-Id: Icdc1d89dce85117f29ede86267133deb570ad602
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/399420
    Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
    Commit-Queue: Harald Alvestrand <hta@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#45108}

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/audio/audio_receive_stream.cc | 4++--
Mthird_party/libwebrtc/audio/audio_receive_stream.h | 3++-
Mthird_party/libwebrtc/audio/audio_receive_stream_unittest.cc | 2+-
Mthird_party/libwebrtc/audio/audio_send_stream.cc | 5+++--
Mthird_party/libwebrtc/audio/audio_send_stream.h | 3++-
Mthird_party/libwebrtc/call/call.cc | 10++++++----
Mthird_party/libwebrtc/call/rtp_video_sender.cc | 4++--
Mthird_party/libwebrtc/call/rtp_video_sender.h | 3+--
Mthird_party/libwebrtc/call/rtp_video_sender_interface.h | 2+-
Mthird_party/libwebrtc/call/rtp_video_sender_unittest.cc | 10+++++-----
Mthird_party/libwebrtc/moz-patch-stack/s0029.patch | 4++--
Mthird_party/libwebrtc/moz-patch-stack/s0030.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0035.patch | 4++--
Mthird_party/libwebrtc/moz-patch-stack/s0037.patch | 10+++++-----
Mthird_party/libwebrtc/moz-patch-stack/s0039.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0042.patch | 10+++++-----
Mthird_party/libwebrtc/moz-patch-stack/s0057.patch | 14+++++++-------
Mthird_party/libwebrtc/moz-patch-stack/s0058.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0059.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0060.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0071.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0082.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0120.patch | 4++--
Mthird_party/libwebrtc/moz-patch-stack/s0129.patch | 6+++---
Mthird_party/libwebrtc/video/rtp_video_stream_receiver2.cc | 6+++---
Mthird_party/libwebrtc/video/rtp_video_stream_receiver2.h | 3++-
Mthird_party/libwebrtc/video/video_receive_stream2.cc | 5++---
Mthird_party/libwebrtc/video/video_receive_stream2.h | 3++-
Mthird_party/libwebrtc/video/video_send_stream_impl.cc | 4++--
Mthird_party/libwebrtc/video/video_send_stream_impl.h | 2+-
Mthird_party/libwebrtc/video/video_send_stream_impl_unittest.cc | 2+-
32 files changed, 73 insertions(+), 68 deletions(-)

diff --git a/third_party/libwebrtc/README.mozilla.last-vendor b/third_party/libwebrtc/README.mozilla.last-vendor @@ -1,4 +1,4 @@ # ./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 2025-10-09T04:14:39.036543+00:00. +libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-09T04:15:47.848097+00:00. # base of lastest vendoring -833369b1fc +10da6fee8b diff --git a/third_party/libwebrtc/audio/audio_receive_stream.cc b/third_party/libwebrtc/audio/audio_receive_stream.cc @@ -430,9 +430,9 @@ bool AudioReceiveStreamImpl::SetMinimumPlayoutDelay(int delay_ms) { return channel_receive_->SetMinimumPlayoutDelay(delay_ms); } -void AudioReceiveStreamImpl::DeliverRtcp(const uint8_t* packet, size_t length) { +void AudioReceiveStreamImpl::DeliverRtcp(ArrayView<const uint8_t> packet) { RTC_DCHECK_RUN_ON(&worker_thread_checker_); - channel_receive_->ReceivedRTCPPacket(packet, length); + channel_receive_->ReceivedRTCPPacket(packet.data(), packet.size()); } void AudioReceiveStreamImpl::SetSyncGroup(absl::string_view sync_group) { diff --git a/third_party/libwebrtc/audio/audio_receive_stream.h b/third_party/libwebrtc/audio/audio_receive_stream.h @@ -20,6 +20,7 @@ #include <vector> #include "absl/strings/string_view.h" +#include "api/array_view.h" #include "api/audio/audio_frame.h" #include "api/audio/audio_mixer.h" #include "api/audio_codecs/audio_format.h" @@ -135,7 +136,7 @@ class AudioReceiveStreamImpl final : public webrtc::AudioReceiveStreamInterface, int64_t time_ms) override; bool SetMinimumPlayoutDelay(int delay_ms) override; - void DeliverRtcp(const uint8_t* packet, size_t length); + void DeliverRtcp(ArrayView<const uint8_t> packet); void SetSyncGroup(absl::string_view sync_group); diff --git a/third_party/libwebrtc/audio/audio_receive_stream_unittest.cc b/third_party/libwebrtc/audio/audio_receive_stream_unittest.cc @@ -242,7 +242,7 @@ TEST(AudioReceiveStreamTest, ReceiveRtcpPacket) { EXPECT_CALL(*helper.channel_receive(), ReceivedRTCPPacket(&rtcp_packet[0], rtcp_packet.size())) .WillOnce(Return()); - recv_stream->DeliverRtcp(&rtcp_packet[0], rtcp_packet.size()); + recv_stream->DeliverRtcp(rtcp_packet); recv_stream->UnregisterFromTransport(); } } diff --git a/third_party/libwebrtc/audio/audio_send_stream.cc b/third_party/libwebrtc/audio/audio_send_stream.cc @@ -20,6 +20,7 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" +#include "api/array_view.h" #include "api/audio/audio_frame.h" #include "api/audio/audio_processing.h" #include "api/audio_codecs/audio_encoder.h" @@ -490,9 +491,9 @@ webrtc::AudioSendStream::Stats AudioSendStream::GetStats( return stats; } -void AudioSendStream::DeliverRtcp(const uint8_t* packet, size_t length) { +void AudioSendStream::DeliverRtcp(ArrayView<const uint8_t> packet) { RTC_DCHECK_RUN_ON(&worker_thread_checker_); - channel_send_->ReceivedRTCPPacket(packet, length); + channel_send_->ReceivedRTCPPacket(packet.data(), packet.size()); // Poll if overhead has changed, which it can do if ack triggers us to stop // sending mid/rid. UpdateOverheadPerPacket(); diff --git a/third_party/libwebrtc/audio/audio_send_stream.h b/third_party/libwebrtc/audio/audio_send_stream.h @@ -18,6 +18,7 @@ #include <utility> #include <vector> +#include "api/array_view.h" #include "api/call/bitrate_allocation.h" #include "api/environment/environment.h" #include "api/field_trials_view.h" @@ -102,7 +103,7 @@ class AudioSendStream final : public webrtc::AudioSendStream, webrtc::AudioSendStream::Stats GetStats( bool has_remote_tracks) const override; - void DeliverRtcp(const uint8_t* packet, size_t length); + void DeliverRtcp(ArrayView<const uint8_t> packet); // Implements BitrateAllocatorObserver. uint32_t OnBitrateUpdated(BitrateAllocationUpdate update) override; diff --git a/third_party/libwebrtc/call/call.cc b/third_party/libwebrtc/call/call.cc @@ -26,6 +26,7 @@ #include "absl/functional/bind_front.h" #include "absl/strings/string_view.h" #include "api/adaptation/resource.h" +#include "api/array_view.h" #include "api/environment/environment.h" #include "api/fec_controller.h" #include "api/field_trials_view.h" @@ -1393,23 +1394,24 @@ void Call::DeliverRtcpPacket(CopyOnWriteBuffer packet) { receive_stats_.AddReceivedRtcpBytes(static_cast<int>(packet.size())); bool rtcp_delivered = false; + ArrayView<const uint8_t> packet_view(packet.cdata(), packet.size()); for (VideoReceiveStream2* stream : video_receive_streams_) { - if (stream->DeliverRtcp(packet.cdata(), packet.size())) + if (stream->DeliverRtcp(packet_view)) rtcp_delivered = true; } for (AudioReceiveStreamImpl* stream : audio_receive_streams_) { - stream->DeliverRtcp(packet.cdata(), packet.size()); + stream->DeliverRtcp(packet_view); rtcp_delivered = true; } for (VideoSendStreamImpl* stream : video_send_streams_) { - stream->DeliverRtcp(packet.cdata(), packet.size()); + stream->DeliverRtcp(packet); rtcp_delivered = true; } for (auto& kv : audio_send_ssrcs_) { - kv.second->DeliverRtcp(packet.cdata(), packet.size()); + kv.second->DeliverRtcp(packet_view); rtcp_delivered = true; } diff --git a/third_party/libwebrtc/call/rtp_video_sender.cc b/third_party/libwebrtc/call/rtp_video_sender.cc @@ -721,10 +721,10 @@ DataRate RtpVideoSender::GetPostEncodeOverhead() const { return post_encode_overhead; } -void RtpVideoSender::DeliverRtcp(const uint8_t* packet, size_t length) { +void RtpVideoSender::DeliverRtcp(ArrayView<const uint8_t> packet) { // Runs on a network thread. for (const RtpStreamSender& stream : rtp_streams_) - stream.rtp_rtcp->IncomingRtcpPacket(MakeArrayView(packet, length)); + stream.rtp_rtcp->IncomingRtcpPacket(packet); } void RtpVideoSender::ConfigureSsrcs( diff --git a/third_party/libwebrtc/call/rtp_video_sender.h b/third_party/libwebrtc/call/rtp_video_sender.h @@ -113,9 +113,8 @@ class RtpVideoSender : public RtpVideoSenderInterface, std::map<uint32_t, RtpPayloadState> GetRtpPayloadStates() const RTC_LOCKS_EXCLUDED(mutex_) override; - void DeliverRtcp(const uint8_t* packet, size_t length) + void DeliverRtcp(ArrayView<const uint8_t> packet) RTC_LOCKS_EXCLUDED(mutex_) override; - // Implements webrtc::VCMProtectionCallback. int ProtectionRequest(const FecProtectionParams* delta_params, const FecProtectionParams* key_params, diff --git a/third_party/libwebrtc/call/rtp_video_sender_interface.h b/third_party/libwebrtc/call/rtp_video_sender_interface.h @@ -40,7 +40,7 @@ class RtpVideoSenderInterface : public EncodedImageCallback, virtual std::map<uint32_t, RtpState> GetRtpStates() const = 0; virtual std::map<uint32_t, RtpPayloadState> GetRtpPayloadStates() const = 0; - virtual void DeliverRtcp(const uint8_t* packet, size_t length) = 0; + virtual void DeliverRtcp(ArrayView<const uint8_t> packet) = 0; virtual void OnBitrateAllocationUpdated( const VideoBitrateAllocation& bitrate) = 0; diff --git a/third_party/libwebrtc/call/rtp_video_sender_unittest.cc b/third_party/libwebrtc/call/rtp_video_sender_unittest.cc @@ -548,7 +548,7 @@ TEST(RtpVideoSenderTest, DoesNotRetrasmitAckedPackets) { ByteReader<uint16_t>::ReadBigEndian(payload.data())); return true; }); - test.router()->DeliverRtcp(nack_buffer.data(), nack_buffer.size()); + test.router()->DeliverRtcp(nack_buffer); test.AdvanceTime(TimeDelta::Millis(33)); // Verify that both packets were retransmitted. @@ -589,7 +589,7 @@ TEST(RtpVideoSenderTest, DoesNotRetrasmitAckedPackets) { ByteReader<uint16_t>::ReadBigEndian(payload.data())); return true; }); - test.router()->DeliverRtcp(nack_buffer.data(), nack_buffer.size()); + test.router()->DeliverRtcp(nack_buffer); test.AdvanceTime(TimeDelta::Millis(33)); } @@ -988,8 +988,8 @@ TEST(RtpVideoSenderTest, MixedCodecSimulcastPayloadType) { EXPECT_TRUE(rtp_packet.Parse(packet)); return true; }); - test.router()->DeliverRtcp(nack_buffer1.data(), nack_buffer1.size()); - test.router()->DeliverRtcp(nack_buffer2.data(), nack_buffer2.size()); + test.router()->DeliverRtcp(nack_buffer1); + test.router()->DeliverRtcp(nack_buffer2); test.AdvanceTime(TimeDelta::Millis(33)); @@ -1598,7 +1598,7 @@ TEST(RtpVideoSenderTest, RetransmitsBaseLayerOnly) { ByteReader<uint16_t>::ReadBigEndian(payload.data())); return true; }); - test.router()->DeliverRtcp(nack_buffer.data(), nack_buffer.size()); + test.router()->DeliverRtcp(nack_buffer); test.AdvanceTime(TimeDelta::Millis(33)); // Verify that only base layer packet was retransmitted. diff --git a/third_party/libwebrtc/moz-patch-stack/s0029.patch b/third_party/libwebrtc/moz-patch-stack/s0029.patch @@ -15,10 +15,10 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/d380a43d59f4f7cbc 4 files changed, 35 insertions(+) diff --git a/audio/audio_send_stream.cc b/audio/audio_send_stream.cc -index 692527d000..91d0281775 100644 +index 5c7fa93ba5..e2668b8df7 100644 --- a/audio/audio_send_stream.cc +++ b/audio/audio_send_stream.cc -@@ -436,6 +436,7 @@ webrtc::AudioSendStream::Stats AudioSendStream::GetStats( +@@ -437,6 +437,7 @@ webrtc::AudioSendStream::Stats AudioSendStream::GetStats( stats.target_bitrate_bps = channel_send_->GetTargetBitrate(); webrtc::CallSendStatistics call_stats = channel_send_->GetRTCPStatistics(); diff --git a/third_party/libwebrtc/moz-patch-stack/s0030.patch b/third_party/libwebrtc/moz-patch-stack/s0030.patch @@ -25,7 +25,7 @@ index ae9951e6f9..c69ec1a674 100644 // See LntfConfig for description. diff --git a/video/rtp_video_stream_receiver2.cc b/video/rtp_video_stream_receiver2.cc -index 44077918b5..18af239ab4 100644 +index f2715d3f5a..d69e876399 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc @@ -1411,7 +1411,7 @@ void RtpVideoStreamReceiver2::StartReceive() { diff --git a/third_party/libwebrtc/moz-patch-stack/s0035.patch b/third_party/libwebrtc/moz-patch-stack/s0035.patch @@ -20,7 +20,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/d0b311007c033e838 11 files changed, 55 insertions(+), 10 deletions(-) diff --git a/audio/audio_receive_stream.cc b/audio/audio_receive_stream.cc -index f703ae0041..3a266c98fa 100644 +index ab2383ffe0..3df660ba85 100644 --- a/audio/audio_receive_stream.cc +++ b/audio/audio_receive_stream.cc @@ -58,6 +58,8 @@ std::string AudioReceiveStreamInterface::Config::Rtp::ToString() const { @@ -267,7 +267,7 @@ index 40836198de..d2304e87db 100644 // DEPRECATED, transport_feedback_callback is no longer invoked by the RTP diff --git a/video/rtp_video_stream_receiver2.cc b/video/rtp_video_stream_receiver2.cc -index 18af239ab4..0f567621ee 100644 +index d69e876399..abb834cca4 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc @@ -129,7 +129,8 @@ std::unique_ptr<ModuleRtpRtcpImpl2> CreateRtpRtcpModule( diff --git a/third_party/libwebrtc/moz-patch-stack/s0037.patch b/third_party/libwebrtc/moz-patch-stack/s0037.patch @@ -15,7 +15,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/edac9d01a9ac7594f 3 files changed, 24 insertions(+) diff --git a/video/rtp_video_stream_receiver2.cc b/video/rtp_video_stream_receiver2.cc -index 0f567621ee..b23850b7f5 100644 +index abb834cca4..3d546ae5ea 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc @@ -1177,6 +1177,16 @@ std::optional<int64_t> RtpVideoStreamReceiver2::LastReceivedKeyframePacketMs() @@ -36,10 +36,10 @@ index 0f567621ee..b23850b7f5 100644 RtpVideoStreamReceiver2::GetSenderReportStats() const { RTC_DCHECK_RUN_ON(&packet_sequence_checker_); diff --git a/video/rtp_video_stream_receiver2.h b/video/rtp_video_stream_receiver2.h -index c4a3c7a68a..7864dfb709 100644 +index 18ee7ffa46..7e358c3c13 100644 --- a/video/rtp_video_stream_receiver2.h +++ b/video/rtp_video_stream_receiver2.h -@@ -228,6 +228,12 @@ class RtpVideoStreamReceiver2 : public LossNotificationSender, +@@ -229,6 +229,12 @@ class RtpVideoStreamReceiver2 : public LossNotificationSender, std::optional<RtpRtcpInterface::SenderReportStats> GetSenderReportStats() const; @@ -53,10 +53,10 @@ index c4a3c7a68a..7864dfb709 100644 // Implements RtpVideoFrameReceiver. void ManageFrame(std::unique_ptr<RtpFrameObject> frame) override; diff --git a/video/video_receive_stream2.cc b/video/video_receive_stream2.cc -index c7c1c30175..30917c0349 100644 +index 2e8bc0ba66..b9c6931cff 100644 --- a/video/video_receive_stream2.cc +++ b/video/video_receive_stream2.cc -@@ -626,6 +626,14 @@ VideoReceiveStreamInterface::Stats VideoReceiveStream2::GetStats() const { +@@ -625,6 +625,14 @@ VideoReceiveStreamInterface::Stats VideoReceiveStream2::GetStats() const { stats.sender_reports_bytes_sent = rtcp_sr_stats->bytes_sent; stats.sender_reports_reports_count = rtcp_sr_stats->reports_count; } diff --git a/third_party/libwebrtc/moz-patch-stack/s0039.patch b/third_party/libwebrtc/moz-patch-stack/s0039.patch @@ -16,7 +16,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/c186df8a088e46285 1 file changed, 1 deletion(-) diff --git a/audio/audio_receive_stream.cc b/audio/audio_receive_stream.cc -index 3a266c98fa..5e9e3ccc2b 100644 +index 3df660ba85..08936be46d 100644 --- a/audio/audio_receive_stream.cc +++ b/audio/audio_receive_stream.cc @@ -380,7 +380,6 @@ int AudioReceiveStreamImpl::GetBaseMinimumPlayoutDelayMs() const { diff --git a/third_party/libwebrtc/moz-patch-stack/s0042.patch b/third_party/libwebrtc/moz-patch-stack/s0042.patch @@ -159,7 +159,7 @@ index d2304e87db..bbdb38864e 100644 // Within this list, the sender-source SSRC pair is unique and per-pair the // ReportBlockData represents the latest Report Block that was received for diff --git a/video/rtp_video_stream_receiver2.cc b/video/rtp_video_stream_receiver2.cc -index b23850b7f5..50bdf6b311 100644 +index 3d546ae5ea..687ff8cf1c 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc @@ -1182,9 +1182,10 @@ std::optional<int64_t> RtpVideoStreamReceiver2::LastReceivedKeyframePacketMs() @@ -176,10 +176,10 @@ index b23850b7f5..50bdf6b311 100644 std::optional<RtpRtcpInterface::SenderReportStats> diff --git a/video/rtp_video_stream_receiver2.h b/video/rtp_video_stream_receiver2.h -index 7864dfb709..3cf94ec4b2 100644 +index 7e358c3c13..05498bd640 100644 --- a/video/rtp_video_stream_receiver2.h +++ b/video/rtp_video_stream_receiver2.h -@@ -232,7 +232,8 @@ class RtpVideoStreamReceiver2 : public LossNotificationSender, +@@ -233,7 +233,8 @@ class RtpVideoStreamReceiver2 : public LossNotificationSender, // stats at all, and even on the most recent libwebrtc code there does not // seem to be any support for these stats right now. So, we hack this in. void RemoteRTCPSenderInfo(uint32_t* packet_count, uint32_t* octet_count, @@ -190,10 +190,10 @@ index 7864dfb709..3cf94ec4b2 100644 private: // Implements RtpVideoFrameReceiver. diff --git a/video/video_receive_stream2.cc b/video/video_receive_stream2.cc -index 30917c0349..ec9be0a5a2 100644 +index b9c6931cff..8291132456 100644 --- a/video/video_receive_stream2.cc +++ b/video/video_receive_stream2.cc -@@ -632,7 +632,8 @@ VideoReceiveStreamInterface::Stats VideoReceiveStream2::GetStats() const { +@@ -631,7 +631,8 @@ VideoReceiveStreamInterface::Stats VideoReceiveStream2::GetStats() const { // seem to be any support for these stats right now. So, we hack this in. rtp_video_stream_receiver_.RemoteRTCPSenderInfo( &stats.rtcp_sender_packets_sent, &stats.rtcp_sender_octets_sent, diff --git a/third_party/libwebrtc/moz-patch-stack/s0057.patch b/third_party/libwebrtc/moz-patch-stack/s0057.patch @@ -214,7 +214,7 @@ index 023f4fa5f2..9c4df5c5ea 100644 int current_delay_ms, int target_delay_ms, diff --git a/video/rtp_video_stream_receiver2.cc b/video/rtp_video_stream_receiver2.cc -index 50bdf6b311..e7652ffb89 100644 +index 687ff8cf1c..f3e6ae91f9 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc @@ -286,6 +286,7 @@ RtpVideoStreamReceiver2::RtpVideoStreamReceiver2( @@ -244,10 +244,10 @@ index 50bdf6b311..e7652ffb89 100644 } } diff --git a/video/rtp_video_stream_receiver2.h b/video/rtp_video_stream_receiver2.h -index 3cf94ec4b2..662d824634 100644 +index 05498bd640..e35711dc8b 100644 --- a/video/rtp_video_stream_receiver2.h +++ b/video/rtp_video_stream_receiver2.h -@@ -68,6 +68,7 @@ +@@ -69,6 +69,7 @@ #include "rtc_base/thread_annotations.h" #include "video/buffered_frame_decryptor.h" #include "video/unique_timestamp_counter.h" @@ -255,7 +255,7 @@ index 3cf94ec4b2..662d824634 100644 namespace webrtc { -@@ -110,6 +111,7 @@ class RtpVideoStreamReceiver2 : public LossNotificationSender, +@@ -111,6 +112,7 @@ class RtpVideoStreamReceiver2 : public LossNotificationSender, RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer, RtcpCnameCallback* rtcp_cname_callback, NackPeriodicProcessor* nack_periodic_processor, @@ -263,7 +263,7 @@ index 3cf94ec4b2..662d824634 100644 // The KeyFrameRequestSender is optional; if not provided, key frame // requests are sent via the internal RtpRtcp module. OnCompleteFrameCallback* complete_frame_callback, -@@ -394,6 +396,7 @@ class RtpVideoStreamReceiver2 : public LossNotificationSender, +@@ -395,6 +397,7 @@ class RtpVideoStreamReceiver2 : public LossNotificationSender, std::unique_ptr<LossNotificationController> loss_notification_controller_ RTC_GUARDED_BY(packet_sequence_checker_); @@ -272,10 +272,10 @@ index 3cf94ec4b2..662d824634 100644 RTC_GUARDED_BY(packet_sequence_checker_); // h26x_packet_buffer_ is applicable to H.264 and H.265. For H.265 it is diff --git a/video/video_receive_stream2.cc b/video/video_receive_stream2.cc -index ec9be0a5a2..77db1f96a2 100644 +index 8291132456..e5ad9f76eb 100644 --- a/video/video_receive_stream2.cc +++ b/video/video_receive_stream2.cc -@@ -257,6 +257,7 @@ VideoReceiveStream2::VideoReceiveStream2( +@@ -256,6 +256,7 @@ VideoReceiveStream2::VideoReceiveStream2( &stats_proxy_, &stats_proxy_, nack_periodic_processor, diff --git a/third_party/libwebrtc/moz-patch-stack/s0058.patch b/third_party/libwebrtc/moz-patch-stack/s0058.patch @@ -30,7 +30,7 @@ index e35f8babb1..7bb737f239 100644 void ReceiveStatisticsProxy::OnPreDecode(VideoCodecType codec_type, int qp) { diff --git a/video/rtp_video_stream_receiver2.cc b/video/rtp_video_stream_receiver2.cc -index e7652ffb89..adc73be9f7 100644 +index f3e6ae91f9..d27a24c3bd 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc @@ -1405,7 +1405,9 @@ void RtpVideoStreamReceiver2::FrameDecoded(int64_t picture_id) { diff --git a/third_party/libwebrtc/moz-patch-stack/s0059.patch b/third_party/libwebrtc/moz-patch-stack/s0059.patch @@ -166,7 +166,7 @@ index 7bb737f239..5c97607c6d 100644 } diff --git a/video/rtp_video_stream_receiver2.cc b/video/rtp_video_stream_receiver2.cc -index adc73be9f7..f329ba390a 100644 +index d27a24c3bd..859dfb3d44 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc @@ -91,6 +91,7 @@ diff --git a/third_party/libwebrtc/moz-patch-stack/s0060.patch b/third_party/libwebrtc/moz-patch-stack/s0060.patch @@ -9,7 +9,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/5b2a7894ef1cf096d 1 file changed, 6 insertions(+) diff --git a/video/rtp_video_stream_receiver2.cc b/video/rtp_video_stream_receiver2.cc -index f329ba390a..f4393ce8c5 100644 +index 859dfb3d44..942f77db26 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc @@ -830,6 +830,12 @@ void RtpVideoStreamReceiver2::OnRtpPacket(const RtpPacketReceived& packet) { diff --git a/third_party/libwebrtc/moz-patch-stack/s0071.patch b/third_party/libwebrtc/moz-patch-stack/s0071.patch @@ -50,7 +50,7 @@ index 1e6678b4ee..1ed48c08d7 100644 Clock* const clock_; bool short_circuit_ RTC_GUARDED_BY(network_sequence_checker_) = false; diff --git a/video/rtp_video_stream_receiver2.cc b/video/rtp_video_stream_receiver2.cc -index f4393ce8c5..01fcda45d0 100644 +index 942f77db26..09dfa8b2ac 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc @@ -383,7 +383,7 @@ RtpVideoStreamReceiver2::RtpVideoStreamReceiver2( diff --git a/third_party/libwebrtc/moz-patch-stack/s0082.patch b/third_party/libwebrtc/moz-patch-stack/s0082.patch @@ -19,7 +19,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/d92a578327f524ec3 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/call/rtp_video_sender.cc b/call/rtp_video_sender.cc -index 282fba85c2..10b145945e 100644 +index 25cc81396c..4fa0e8c5e7 100644 --- a/call/rtp_video_sender.cc +++ b/call/rtp_video_sender.cc @@ -534,6 +534,7 @@ void RtpVideoSender::SetModuleIsActive(bool sending, diff --git a/third_party/libwebrtc/moz-patch-stack/s0120.patch b/third_party/libwebrtc/moz-patch-stack/s0120.patch @@ -12,10 +12,10 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/19164e58323d59c1f 3 files changed, 7 insertions(+), 22 deletions(-) diff --git a/call/call.cc b/call/call.cc -index d6d0e4b2d3..bd3efab30c 100644 +index f20a58a843..533f6d5a37 100644 --- a/call/call.cc +++ b/call/call.cc -@@ -514,19 +514,6 @@ class Call final : public webrtc::Call, +@@ -515,19 +515,6 @@ class Call final : public webrtc::Call, }; } // namespace internal diff --git a/third_party/libwebrtc/moz-patch-stack/s0129.patch b/third_party/libwebrtc/moz-patch-stack/s0129.patch @@ -15,10 +15,10 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/9c487a574d218cc1c 1 file changed, 12 insertions(+) diff --git a/audio/audio_receive_stream.h b/audio/audio_receive_stream.h -index bc248120ef..fd00dfb3ed 100644 +index 0d78482e0e..d7ebd8c9d1 100644 --- a/audio/audio_receive_stream.h +++ b/audio/audio_receive_stream.h -@@ -31,7 +31,11 @@ +@@ -32,7 +32,11 @@ #include "api/scoped_refptr.h" #include "api/sequence_checker.h" #include "api/transport/rtp/rtp_source.h" @@ -30,7 +30,7 @@ index bc248120ef..fd00dfb3ed 100644 #include "call/audio_receive_stream.h" #include "call/audio_state.h" #include "call/syncable.h" -@@ -43,6 +47,14 @@ class PacketRouter; +@@ -44,6 +48,14 @@ class PacketRouter; class RtpStreamReceiverControllerInterface; class RtpStreamReceiverInterface; diff --git a/third_party/libwebrtc/video/rtp_video_stream_receiver2.cc b/third_party/libwebrtc/video/rtp_video_stream_receiver2.cc @@ -1345,15 +1345,15 @@ void RtpVideoStreamReceiver2::NotifyReceiverOfEmptyPacket( } } -bool RtpVideoStreamReceiver2::DeliverRtcp(const uint8_t* rtcp_packet, - size_t rtcp_packet_length) { +bool RtpVideoStreamReceiver2::DeliverRtcp( + ArrayView<const uint8_t> rtcp_packet) { RTC_DCHECK_RUN_ON(&packet_sequence_checker_); if (!receiving_) { return false; } - rtp_rtcp_->IncomingRtcpPacket(MakeArrayView(rtcp_packet, rtcp_packet_length)); + rtp_rtcp_->IncomingRtcpPacket((rtcp_packet)); std::optional<TimeDelta> rtt = rtp_rtcp_->LastRtt(); if (!rtt.has_value()) { diff --git a/third_party/libwebrtc/video/rtp_video_stream_receiver2.h b/third_party/libwebrtc/video/rtp_video_stream_receiver2.h @@ -20,6 +20,7 @@ #include <variant> #include <vector> +#include "api/array_view.h" #include "api/crypto/frame_decryptor_interface.h" #include "api/environment/environment.h" #include "api/frame_transformer_interface.h" @@ -133,7 +134,7 @@ class RtpVideoStreamReceiver2 : public LossNotificationSender, // Produces the transport-related timestamps; current_delay_ms is left unset. std::optional<Syncable::Info> GetSyncInfo() const; - bool DeliverRtcp(const uint8_t* rtcp_packet, size_t rtcp_packet_length); + bool DeliverRtcp(ArrayView<const uint8_t> rtcp_packet); void FrameContinuous(int64_t seq_num); diff --git a/third_party/libwebrtc/video/video_receive_stream2.cc b/third_party/libwebrtc/video/video_receive_stream2.cc @@ -11,7 +11,6 @@ #include "video/video_receive_stream2.h" #include <stdlib.h> -#include <string.h> #include <algorithm> #include <cmath> @@ -350,9 +349,9 @@ void VideoReceiveStream2::SignalNetworkState(NetworkState state) { rtp_video_stream_receiver_.SignalNetworkState(state); } -bool VideoReceiveStream2::DeliverRtcp(const uint8_t* packet, size_t length) { +bool VideoReceiveStream2::DeliverRtcp(ArrayView<const uint8_t> packet) { RTC_DCHECK_RUN_ON(&packet_sequence_checker_); - return rtp_video_stream_receiver_.DeliverRtcp(packet, length); + return rtp_video_stream_receiver_.DeliverRtcp(packet); } void VideoReceiveStream2::SetSync(Syncable* audio_syncable) { diff --git a/third_party/libwebrtc/video/video_receive_stream2.h b/third_party/libwebrtc/video/video_receive_stream2.h @@ -20,6 +20,7 @@ #include <string> #include <vector> +#include "api/array_view.h" #include "api/crypto/frame_decryptor_interface.h" #include "api/environment/environment.h" #include "api/frame_transformer_interface.h" @@ -150,7 +151,7 @@ class VideoReceiveStream2 } void SignalNetworkState(NetworkState state); - bool DeliverRtcp(const uint8_t* packet, size_t length); + bool DeliverRtcp(ArrayView<const uint8_t> packet); void SetSync(Syncable* audio_syncable); diff --git a/third_party/libwebrtc/video/video_send_stream_impl.cc b/third_party/libwebrtc/video/video_send_stream_impl.cc @@ -628,9 +628,9 @@ void VideoSendStreamImpl::GenerateKeyFrame( } } -void VideoSendStreamImpl::DeliverRtcp(const uint8_t* packet, size_t length) { +void VideoSendStreamImpl::DeliverRtcp(ArrayView<const uint8_t> packet) { RTC_DCHECK_RUN_ON(&thread_checker_); - rtp_video_sender_->DeliverRtcp(packet, length); + rtp_video_sender_->DeliverRtcp(packet); } bool VideoSendStreamImpl::started() { diff --git a/third_party/libwebrtc/video/video_send_stream_impl.h b/third_party/libwebrtc/video/video_send_stream_impl.h @@ -104,7 +104,7 @@ class VideoSendStreamImpl : public webrtc::VideoSendStream, video_stream_encoder_for_test = nullptr); ~VideoSendStreamImpl() override; - void DeliverRtcp(const uint8_t* packet, size_t length); + void DeliverRtcp(ArrayView<const uint8_t> packet); // webrtc::VideoSendStream implementation. void Start() override; diff --git a/third_party/libwebrtc/video/video_send_stream_impl_unittest.cc b/third_party/libwebrtc/video/video_send_stream_impl_unittest.cc @@ -102,7 +102,7 @@ class MockRtpVideoSender : public RtpVideoSenderInterface { GetRtpPayloadStates, (), (const, override)); - MOCK_METHOD(void, DeliverRtcp, (const uint8_t*, size_t), (override)); + MOCK_METHOD(void, DeliverRtcp, (ArrayView<const uint8_t>), (override)); MOCK_METHOD(void, OnBitrateAllocationUpdated, (const VideoBitrateAllocation&),