tor-browser

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

commit 95352050d5d6b9edcd6a72fee87b1222503a4c6b
parent 78a51aeb9ef1cc0f57180b68397bd36a38f6fb3a
Author: Dan Baker <dbaker@mozilla.com>
Date:   Thu, 23 Oct 2025 15:06:11 -0600

Bug 1995393 - Vendor libwebrtc from dec6b34b86

Upstream commit: https://webrtc.googlesource.com/src/+/dec6b34b86d4c5efea9ae89b0a638180874268a8
    clang-tidy: apply readability-static-accessed-through-instance once

    this generally produces too many false positives, in particular for ArrayView, doing it once produced some useful results.

    drive-by: fix double typo "ConvertsToTimeDela" to "ConvertToTimeDelta".

    Bug: webrtc:424706384
    Change-Id: I7f05f1985b5778fcaef6317984602ebcd75f430d
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/403508
    Commit-Queue: Philipp Hancke <phancke@meta.com>
    Reviewed-by: Harald Alvestrand <hta@webrtc.org>
    Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#45334}

Diffstat:
Mthird_party/libwebrtc/.clang-tidy | 1+
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/audio/channel_receive.cc | 2+-
Mthird_party/libwebrtc/common_audio/resampler/sinc_resampler_unittest.cc | 6+++---
Mthird_party/libwebrtc/common_video/h265/h265_bitstream_parser_unittest.cc | 5++---
Mthird_party/libwebrtc/media/engine/webrtc_voice_engine.cc | 4++--
Mthird_party/libwebrtc/modules/audio_processing/agc/agc_manager_direct_unittest.cc | 6++++--
Mthird_party/libwebrtc/modules/audio_processing/agc2/input_volume_controller_unittest.cc | 3++-
Mthird_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/test_utils.cc | 6++++--
Mthird_party/libwebrtc/modules/audio_processing/audio_processing_unittest.cc | 13+++++++------
Mthird_party/libwebrtc/modules/rtp_rtcp/source/capture_clock_offset_updater.cc | 2+-
Mthird_party/libwebrtc/modules/rtp_rtcp/source/capture_clock_offset_updater.h | 2+-
Mthird_party/libwebrtc/modules/rtp_rtcp/source/capture_clock_offset_updater_unittest.cc | 6+++---
Mthird_party/libwebrtc/modules/rtp_rtcp/source/ulpfec_generator.cc | 4++--
Mthird_party/libwebrtc/moz-patch-stack/p0001.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0030.patch | 4++--
Mthird_party/libwebrtc/moz-patch-stack/s0035.patch | 10+++++-----
Mthird_party/libwebrtc/moz-patch-stack/s0037.patch | 4++--
Mthird_party/libwebrtc/moz-patch-stack/s0042.patch | 4++--
Mthird_party/libwebrtc/moz-patch-stack/s0057.patch | 8++++----
Mthird_party/libwebrtc/moz-patch-stack/s0058.patch | 4++--
Mthird_party/libwebrtc/moz-patch-stack/s0059.patch | 6+++---
Mthird_party/libwebrtc/moz-patch-stack/s0060.patch | 4++--
Mthird_party/libwebrtc/moz-patch-stack/s0071.patch | 4++--
Mthird_party/libwebrtc/system_wrappers/source/field_trial.cc | 5+++--
Mthird_party/libwebrtc/video/rtp_streams_synchronizer2.cc | 4++--
Mthird_party/libwebrtc/video/rtp_video_stream_receiver2.cc | 3++-
27 files changed, 67 insertions(+), 59 deletions(-)

diff --git a/third_party/libwebrtc/.clang-tidy b/third_party/libwebrtc/.clang-tidy @@ -8,6 +8,7 @@ readability-static-definition-in-anonymous-namespace, readability-redundant-smartptr-get, readability-redundant-declaration' + # readability-static-accessed-through-instance is generally useful but produces too many false positives. CheckOptions: # The default threshold gives false positives in test data modernize-use-std-numbers.DiffThreshold: 0.00001 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 /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc -libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-23T21:03:40.602795+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-23T21:06:00.872672+00:00. # base of lastest vendoring -f4453c3711 +dec6b34b86 diff --git a/third_party/libwebrtc/audio/channel_receive.cc b/third_party/libwebrtc/audio/channel_receive.cc @@ -496,7 +496,7 @@ AudioMixer::Source::AudioFrameInfo ChannelReceive::GetAudioFrameWithInfo( if (packet_info.absolute_capture_time().has_value()) { MutexLock lock(&ts_stats_lock_); new_packet_info.set_local_capture_clock_offset( - capture_clock_offset_updater_.ConvertsToTimeDela( + CaptureClockOffsetUpdater::ConvertToTimeDelta( capture_clock_offset_updater_.AdjustEstimatedCaptureClockOffset( packet_info.absolute_capture_time() ->estimated_capture_clock_offset))); diff --git a/third_party/libwebrtc/common_audio/resampler/sinc_resampler_unittest.cc b/third_party/libwebrtc/common_audio/resampler/sinc_resampler_unittest.cc @@ -136,7 +136,7 @@ TEST(SincResamplerTest, Convolve) { // Use a kernel from SincResampler as input and kernel data, this has the // benefit of already being properly sized and aligned for Convolve_SSE(). - double result = resampler.Convolve_C( + double result = SincResampler::Convolve_C( resampler.kernel_storage_.get(), resampler.kernel_storage_.get(), resampler.kernel_storage_.get(), kKernelInterpolationFactor); double result2 = resampler.convolve_proc_( @@ -145,7 +145,7 @@ TEST(SincResamplerTest, Convolve) { EXPECT_NEAR(result2, result, kEpsilon); // Test Convolve() w/ unaligned input pointer. - result = resampler.Convolve_C( + result = SincResampler::Convolve_C( resampler.kernel_storage_.get() + 1, resampler.kernel_storage_.get(), resampler.kernel_storage_.get(), kKernelInterpolationFactor); result2 = resampler.convolve_proc_( @@ -172,7 +172,7 @@ TEST(SincResamplerTest, ConvolveBenchmark) { // Benchmark Convolve_C(). int64_t start = TimeNanos(); for (int i = 0; i < kConvolveIterations; ++i) { - resampler.Convolve_C( + SincResampler::Convolve_C( resampler.kernel_storage_.get(), resampler.kernel_storage_.get(), resampler.kernel_storage_.get(), kKernelInterpolationFactor); } diff --git a/third_party/libwebrtc/common_video/h265/h265_bitstream_parser_unittest.cc b/third_party/libwebrtc/common_video/h265/h265_bitstream_parser_unittest.cc @@ -165,10 +165,9 @@ TEST(H265BitstreamParserTest, ReportsLastSliceQpFromShortTermReferenceSlices) { } TEST(H265BitstreamParserTest, PpsIdFromSlice) { - H265BitstreamParser h265_parser; std::optional<uint32_t> pps_id = - h265_parser.ParsePpsIdFromSliceSegmentLayerRbsp(kH265SliceChunk, - H265::NaluType::kTrailR); + H265BitstreamParser::ParsePpsIdFromSliceSegmentLayerRbsp( + kH265SliceChunk, H265::NaluType::kTrailR); ASSERT_TRUE(pps_id); EXPECT_EQ(1u, *pps_id); } diff --git a/third_party/libwebrtc/media/engine/webrtc_voice_engine.cc b/third_party/libwebrtc/media/engine/webrtc_voice_engine.cc @@ -732,10 +732,10 @@ void WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) { apm_config.gain_controller1.enabled = enabled; #if defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID) apm_config.gain_controller1.mode = - apm_config.gain_controller1.kFixedDigital; + AudioProcessing::Config::GainController1::kFixedDigital; #else apm_config.gain_controller1.mode = - apm_config.gain_controller1.kAdaptiveAnalog; + AudioProcessing::Config::GainController1::kAdaptiveAnalog; #endif } diff --git a/third_party/libwebrtc/modules/audio_processing/agc/agc_manager_direct_unittest.cc b/third_party/libwebrtc/modules/audio_processing/agc/agc_manager_direct_unittest.cc @@ -256,7 +256,8 @@ class SpeechSamplesReader { // in the PCM file if `num_frames` is too large - i.e., does not loop. void Feed(int num_frames, int gain_db, AgcManagerDirect& agc) { float gain = std::pow(10.0f, gain_db / 20.0f); // From dB to linear gain. - is_.seekg(0, is_.beg); // Start from the beginning of the PCM file. + is_.seekg(0, + std::ifstream::beg); // Start from the beginning of the PCM file. // Read and feed frames. for (int i = 0; i < num_frames; ++i) { @@ -290,7 +291,8 @@ class SpeechSamplesReader { std::optional<float> speech_level_override, AgcManagerDirect& agc) { float gain = std::pow(10.0f, gain_db / 20.0f); // From dB to linear gain. - is_.seekg(0, is_.beg); // Start from the beginning of the PCM file. + is_.seekg(0, + std::ifstream::beg); // Start from the beginning of the PCM file. // Read and feed frames. for (int i = 0; i < num_frames; ++i) { diff --git a/third_party/libwebrtc/modules/audio_processing/agc2/input_volume_controller_unittest.cc b/third_party/libwebrtc/modules/audio_processing/agc2/input_volume_controller_unittest.cc @@ -165,7 +165,8 @@ class SpeechSamplesReader { RTC_DCHECK(controller.capture_output_used()); float gain = std::pow(10.0f, gain_db / 20.0f); // From dB to linear gain. - is_.seekg(0, is_.beg); // Start from the beginning of the PCM file. + is_.seekg(0, + std::ifstream::beg); // Start from the beginning of the PCM file. // Read and feed frames. for (int i = 0; i < num_frames; ++i) { diff --git a/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/test_utils.cc b/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/test_utils.cc @@ -62,8 +62,10 @@ class FloatFileReader : public FileReader { return is_.gcount() == bytes_to_read; } bool ReadValue(float& dst) override { return ReadChunk({&dst, 1}); } - void SeekForward(int hop) override { is_.seekg(hop * sizeof(T), is_.cur); } - void SeekBeginning() override { is_.seekg(0, is_.beg); } + void SeekForward(int hop) override { + is_.seekg(hop * sizeof(T), std::ifstream::cur); + } + void SeekBeginning() override { is_.seekg(0, std::ifstream::beg); } private: std::ifstream is_; diff --git a/third_party/libwebrtc/modules/audio_processing/audio_processing_unittest.cc b/third_party/libwebrtc/modules/audio_processing/audio_processing_unittest.cc @@ -811,7 +811,8 @@ TEST_F(ApmTest, ChannelsInt16Interface) { // Testing number of invalid and valid channels. Init(16000, 16000, 16000, 4, 4, 4, false); - TestChangingChannelsInt16Interface(0, apm_->kBadNumberChannelsError); + TestChangingChannelsInt16Interface(0, + AudioProcessing::kBadNumberChannelsError); for (size_t i = 1; i < 4; i++) { TestChangingChannelsInt16Interface(i, AudioProcessing::kNoError); @@ -823,8 +824,8 @@ TEST_F(ApmTest, Channels) { // Testing number of invalid and valid channels. Init(16000, 16000, 16000, 4, 4, 4, false); - TestChangingForwardChannels(0, 1, apm_->kBadNumberChannelsError); - TestChangingReverseChannels(0, apm_->kBadNumberChannelsError); + TestChangingForwardChannels(0, 1, AudioProcessing::kBadNumberChannelsError); + TestChangingReverseChannels(0, AudioProcessing::kBadNumberChannelsError); for (size_t i = 1; i < 4; ++i) { for (size_t j = 0; j < 1; ++j) { @@ -2741,7 +2742,7 @@ TEST(MAYBE_ApmStatistics, AECEnabledTest) { // Fill the audio frame with a sawtooth pattern. int16_t* ptr = frame.data.data(); - for (size_t i = 0; i < frame.kMaxDataSizeSamples; i++) { + for (size_t i = 0; i < Int16FrameData::kMaxDataSizeSamples; i++) { ptr[i] = 10000 * ((i % 3) - 1); } @@ -2790,7 +2791,7 @@ TEST(MAYBE_ApmStatistics, AECMEnabledTest) { // Fill the audio frame with a sawtooth pattern. int16_t* ptr = frame.data.data(); - for (size_t i = 0; i < frame.kMaxDataSizeSamples; i++) { + for (size_t i = 0; i < Int16FrameData::kMaxDataSizeSamples; i++) { ptr[i] = 10000 * ((i % 3) - 1); } @@ -2837,7 +2838,7 @@ TEST(ApmStatistics, DoNotReportVoiceDetectedStat) { // Fill the audio frame with a sawtooth pattern. int16_t* ptr = frame.data.data(); - for (size_t i = 0; i < frame.kMaxDataSizeSamples; i++) { + for (size_t i = 0; i < Int16FrameData::kMaxDataSizeSamples; i++) { ptr[i] = 10000 * ((i % 3) - 1); } diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/capture_clock_offset_updater.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/capture_clock_offset_updater.cc @@ -31,7 +31,7 @@ CaptureClockOffsetUpdater::AdjustEstimatedCaptureClockOffset( static_cast<uint64_t>(*remote_to_local_clock_offset_); } -std::optional<TimeDelta> CaptureClockOffsetUpdater::ConvertsToTimeDela( +std::optional<TimeDelta> CaptureClockOffsetUpdater::ConvertToTimeDelta( std::optional<int64_t> q32x32) { if (q32x32 == std::nullopt) { return std::nullopt; diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/capture_clock_offset_updater.h b/third_party/libwebrtc/modules/rtp_rtcp/source/capture_clock_offset_updater.h @@ -45,7 +45,7 @@ class CaptureClockOffsetUpdater { void SetRemoteToLocalClockOffset(std::optional<int64_t> offset_q32x32); // Converts a signed Q32.32-formatted fixed-point to a TimeDelta. - static std::optional<TimeDelta> ConvertsToTimeDela( + static std::optional<TimeDelta> ConvertToTimeDelta( std::optional<int64_t> q32x32); private: diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/capture_clock_offset_updater_unittest.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/capture_clock_offset_updater_unittest.cc @@ -68,16 +68,16 @@ TEST(AbsoluteCaptureTimeReceiverTest, ConvertClockOffset) { kPositive.ms() * (NtpTime::kFractionsPerSecond / 1000); constexpr TimeDelta kEpsilon = TimeDelta::Millis(1); std::optional<TimeDelta> converted = - CaptureClockOffsetUpdater::ConvertsToTimeDela(kNegativeQ32x32); + CaptureClockOffsetUpdater::ConvertToTimeDelta(kNegativeQ32x32); EXPECT_GT(converted, kNegative - kEpsilon); EXPECT_LT(converted, kNegative + kEpsilon); - converted = CaptureClockOffsetUpdater::ConvertsToTimeDela(kPositiveQ32x32); + converted = CaptureClockOffsetUpdater::ConvertToTimeDelta(kPositiveQ32x32); EXPECT_GT(converted, kPositive - kEpsilon); EXPECT_LT(converted, kPositive + kEpsilon); EXPECT_FALSE( - CaptureClockOffsetUpdater::ConvertsToTimeDela(std::nullopt).has_value()); + CaptureClockOffsetUpdater::ConvertToTimeDelta(std::nullopt).has_value()); } } // namespace webrtc diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/ulpfec_generator.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/ulpfec_generator.cc @@ -253,8 +253,8 @@ DataRate UlpfecGenerator::CurrentFecRate() const { int UlpfecGenerator::Overhead() const { RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); RTC_DCHECK(!media_packets_.empty()); - int num_fec_packets = - fec_->NumFecPackets(media_packets_.size(), CurrentParams().fec_rate); + int num_fec_packets = ForwardErrorCorrection::NumFecPackets( + media_packets_.size(), CurrentParams().fec_rate); // Return the overhead in Q8. return (num_fec_packets << 8) / media_packets_.size(); diff --git a/third_party/libwebrtc/moz-patch-stack/p0001.patch b/third_party/libwebrtc/moz-patch-stack/p0001.patch @@ -70,7 +70,7 @@ index c9254c25f0..1b88cb7f42 100644 TEST(TimestampTest, GetBackSameValues) { diff --git a/audio/channel_receive.cc b/audio/channel_receive.cc -index adecc36079..3e119fc562 100644 +index 90d3c70aa0..eda5824569 100644 --- a/audio/channel_receive.cc +++ b/audio/channel_receive.cc @@ -78,6 +78,7 @@ diff --git a/third_party/libwebrtc/moz-patch-stack/s0030.patch b/third_party/libwebrtc/moz-patch-stack/s0030.patch @@ -25,10 +25,10 @@ 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 ef79a69ad2..47274dcf33 100644 +index 072823bccf..23965141fa 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc -@@ -1410,7 +1410,7 @@ void RtpVideoStreamReceiver2::StartReceive() { +@@ -1411,7 +1411,7 @@ void RtpVideoStreamReceiver2::StartReceive() { // Change REMB candidate egibility. packet_router_->RemoveReceiveRtpModule(rtp_rtcp_.get()); packet_router_->AddReceiveRtpModule(rtp_rtcp_.get(), diff --git a/third_party/libwebrtc/moz-patch-stack/s0035.patch b/third_party/libwebrtc/moz-patch-stack/s0035.patch @@ -42,7 +42,7 @@ index 3a4ae1702a..84ea0c996b 100644 } // namespace diff --git a/audio/channel_receive.cc b/audio/channel_receive.cc -index 3e119fc562..21b1db50ca 100644 +index eda5824569..5be553dba5 100644 --- a/audio/channel_receive.cc +++ b/audio/channel_receive.cc @@ -132,7 +132,8 @@ class ChannelReceive : public ChannelReceiveInterface, @@ -267,10 +267,10 @@ 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 47274dcf33..f51b30ad41 100644 +index 23965141fa..3842cbb455 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc -@@ -129,7 +129,8 @@ std::unique_ptr<ModuleRtpRtcpImpl2> CreateRtpRtcpModule( +@@ -130,7 +130,8 @@ std::unique_ptr<ModuleRtpRtcpImpl2> CreateRtpRtcpModule( RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer, RtcpCnameCallback* rtcp_cname_callback, bool non_sender_rtt_measurement, @@ -280,7 +280,7 @@ index 47274dcf33..f51b30ad41 100644 RtpRtcpInterface::Configuration configuration; configuration.audio = false; configuration.receiver_only = true; -@@ -140,6 +141,7 @@ std::unique_ptr<ModuleRtpRtcpImpl2> CreateRtpRtcpModule( +@@ -141,6 +142,7 @@ std::unique_ptr<ModuleRtpRtcpImpl2> CreateRtpRtcpModule( rtcp_packet_type_counter_observer; configuration.rtcp_cname_callback = rtcp_cname_callback; configuration.local_media_ssrc = local_ssrc; @@ -288,7 +288,7 @@ index 47274dcf33..f51b30ad41 100644 configuration.non_sender_rtt_measurement = non_sender_rtt_measurement; auto rtp_rtcp = std::make_unique<ModuleRtpRtcpImpl2>(env, configuration); -@@ -313,7 +315,8 @@ RtpVideoStreamReceiver2::RtpVideoStreamReceiver2( +@@ -314,7 +316,8 @@ RtpVideoStreamReceiver2::RtpVideoStreamReceiver2( rtcp_packet_type_counter_observer, rtcp_cname_callback, config_.rtp.rtcp_xr.receiver_reference_time_report, diff --git a/third_party/libwebrtc/moz-patch-stack/s0037.patch b/third_party/libwebrtc/moz-patch-stack/s0037.patch @@ -15,10 +15,10 @@ 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 f51b30ad41..252425d32d 100644 +index 3842cbb455..2e34b47608 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc -@@ -1176,6 +1176,16 @@ std::optional<int64_t> RtpVideoStreamReceiver2::LastReceivedKeyframePacketMs() +@@ -1177,6 +1177,16 @@ std::optional<int64_t> RtpVideoStreamReceiver2::LastReceivedKeyframePacketMs() return std::nullopt; } diff --git a/third_party/libwebrtc/moz-patch-stack/s0042.patch b/third_party/libwebrtc/moz-patch-stack/s0042.patch @@ -159,10 +159,10 @@ 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 252425d32d..5ef6f85a9f 100644 +index 2e34b47608..c6fa9d745f 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc -@@ -1181,9 +1181,10 @@ std::optional<int64_t> RtpVideoStreamReceiver2::LastReceivedKeyframePacketMs() +@@ -1182,9 +1182,10 @@ std::optional<int64_t> RtpVideoStreamReceiver2::LastReceivedKeyframePacketMs() // seem to be any support for these stats right now. So, we hack this in. void RtpVideoStreamReceiver2::RemoteRTCPSenderInfo( uint32_t* packet_count, uint32_t* octet_count, diff --git a/third_party/libwebrtc/moz-patch-stack/s0057.patch b/third_party/libwebrtc/moz-patch-stack/s0057.patch @@ -214,10 +214,10 @@ index 111b7f3c45..fb411d4bbf 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 5ef6f85a9f..94ec20c1d4 100644 +index c6fa9d745f..1674e76f71 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc -@@ -286,6 +286,7 @@ RtpVideoStreamReceiver2::RtpVideoStreamReceiver2( +@@ -287,6 +287,7 @@ RtpVideoStreamReceiver2::RtpVideoStreamReceiver2( RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer, RtcpCnameCallback* rtcp_cname_callback, NackPeriodicProcessor* nack_periodic_processor, @@ -225,7 +225,7 @@ index 5ef6f85a9f..94ec20c1d4 100644 OnCompleteFrameCallback* complete_frame_callback, scoped_refptr<FrameDecryptorInterface> frame_decryptor, scoped_refptr<FrameTransformerInterface> frame_transformer) -@@ -329,6 +330,7 @@ RtpVideoStreamReceiver2::RtpVideoStreamReceiver2( +@@ -330,6 +331,7 @@ RtpVideoStreamReceiver2::RtpVideoStreamReceiver2( config_.rtp.nack, &rtcp_feedback_buffer_, &rtcp_feedback_buffer_)), @@ -233,7 +233,7 @@ index 5ef6f85a9f..94ec20c1d4 100644 packet_buffer_(kPacketBufferStartSize, PacketBufferMaxSize(env_.field_trials())), reference_finder_(std::make_unique<RtpFrameReferenceFinder>()), -@@ -1401,7 +1403,8 @@ void RtpVideoStreamReceiver2::FrameDecoded(int64_t picture_id) { +@@ -1402,7 +1404,8 @@ void RtpVideoStreamReceiver2::FrameDecoded(int64_t picture_id) { int64_t unwrapped_rtp_seq_num = rtp_seq_num_unwrapper_.Unwrap(seq_num); packet_infos_.erase(packet_infos_.begin(), packet_infos_.upper_bound(unwrapped_rtp_seq_num)); diff --git a/third_party/libwebrtc/moz-patch-stack/s0058.patch b/third_party/libwebrtc/moz-patch-stack/s0058.patch @@ -30,10 +30,10 @@ index c8058ea132..568fd441d2 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 94ec20c1d4..4468be7128 100644 +index 1674e76f71..daddda1aa2 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc -@@ -1404,7 +1404,9 @@ void RtpVideoStreamReceiver2::FrameDecoded(int64_t picture_id) { +@@ -1405,7 +1405,9 @@ void RtpVideoStreamReceiver2::FrameDecoded(int64_t picture_id) { packet_infos_.erase(packet_infos_.begin(), packet_infos_.upper_bound(unwrapped_rtp_seq_num)); uint32_t num_packets_cleared = packet_buffer_.ClearTo(seq_num); diff --git a/third_party/libwebrtc/moz-patch-stack/s0059.patch b/third_party/libwebrtc/moz-patch-stack/s0059.patch @@ -166,10 +166,10 @@ index 568fd441d2..30eec9f090 100644 } diff --git a/video/rtp_video_stream_receiver2.cc b/video/rtp_video_stream_receiver2.cc -index 4468be7128..c6298b0025 100644 +index daddda1aa2..daaf552044 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc -@@ -91,6 +91,7 @@ +@@ -92,6 +92,7 @@ #include "rtc_base/numerics/sequence_number_util.h" #include "rtc_base/strings/string_builder.h" #include "rtc_base/thread.h" @@ -177,7 +177,7 @@ index 4468be7128..c6298b0025 100644 #include "system_wrappers/include/ntp_time.h" #include "video/buffered_frame_decryptor.h" -@@ -1405,6 +1406,9 @@ void RtpVideoStreamReceiver2::FrameDecoded(int64_t picture_id) { +@@ -1406,6 +1407,9 @@ void RtpVideoStreamReceiver2::FrameDecoded(int64_t picture_id) { packet_infos_.upper_bound(unwrapped_rtp_seq_num)); uint32_t num_packets_cleared = packet_buffer_.ClearTo(seq_num); if (num_packets_cleared > 0) { diff --git a/third_party/libwebrtc/moz-patch-stack/s0060.patch b/third_party/libwebrtc/moz-patch-stack/s0060.patch @@ -9,10 +9,10 @@ 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 c6298b0025..93e4c70b04 100644 +index daaf552044..8ad0499bb4 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc -@@ -829,6 +829,12 @@ void RtpVideoStreamReceiver2::OnRtpPacket(const RtpPacketReceived& packet) { +@@ -830,6 +830,12 @@ void RtpVideoStreamReceiver2::OnRtpPacket(const RtpPacketReceived& packet) { void RtpVideoStreamReceiver2::RequestKeyFrame() { RTC_DCHECK_RUN_ON(&worker_task_checker_); diff --git a/third_party/libwebrtc/moz-patch-stack/s0071.patch b/third_party/libwebrtc/moz-patch-stack/s0071.patch @@ -50,10 +50,10 @@ 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 93e4c70b04..e756ce0b75 100644 +index 8ad0499bb4..36c64f24d8 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc -@@ -383,7 +383,7 @@ RtpVideoStreamReceiver2::RtpVideoStreamReceiver2( +@@ -384,7 +384,7 @@ RtpVideoStreamReceiver2::RtpVideoStreamReceiver2( frame_transformer_delegate_ = make_ref_counted<RtpVideoStreamReceiverFrameTransformerDelegate>( this, &env_.clock(), std::move(frame_transformer), diff --git a/third_party/libwebrtc/system_wrappers/source/field_trial.cc b/third_party/libwebrtc/system_wrappers/source/field_trial.cc @@ -47,11 +47,12 @@ bool FieldTrialsStringIsValidInternal(const absl::string_view trials) { std::map<absl::string_view, absl::string_view> field_trials; while (next_item < trials.length()) { size_t name_end = trials.find(kPersistentStringSeparator, next_item); - if (name_end == trials.npos || next_item == name_end) + if (name_end == absl::string_view::npos || next_item == name_end) return false; size_t group_name_end = trials.find(kPersistentStringSeparator, name_end + 1); - if (group_name_end == trials.npos || name_end + 1 == group_name_end) + if (group_name_end == absl::string_view::npos || + name_end + 1 == group_name_end) return false; absl::string_view name = trials.substr(next_item, name_end - next_item); absl::string_view group_name = diff --git a/third_party/libwebrtc/video/rtp_streams_synchronizer2.cc b/third_party/libwebrtc/video/rtp_streams_synchronizer2.cc @@ -125,8 +125,8 @@ void RtpStreamsSynchronizer::UpdateDelay() { int relative_delay_ms; // Calculate how much later or earlier the audio stream is compared to video. - if (!sync_->ComputeRelativeDelay(audio_measurement_, video_measurement_, - &relative_delay_ms)) { + if (!StreamSynchronization::ComputeRelativeDelay( + audio_measurement_, video_measurement_, &relative_delay_ms)) { return; } diff --git a/third_party/libwebrtc/video/rtp_video_stream_receiver2.cc b/third_party/libwebrtc/video/rtp_video_stream_receiver2.cc @@ -62,6 +62,7 @@ #include "modules/rtp_rtcp/include/rtcp_statistics.h" #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" #include "modules/rtp_rtcp/source/absolute_capture_time_interpolator.h" +#include "modules/rtp_rtcp/source/capture_clock_offset_updater.h" #include "modules/rtp_rtcp/source/corruption_detection_extension.h" #include "modules/rtp_rtcp/source/create_video_rtp_depacketizer.h" #include "modules/rtp_rtcp/source/frame_object.h" @@ -602,7 +603,7 @@ bool RtpVideoStreamReceiver2::OnReceivedPayloadData( rtp_packet.GetExtension<AbsoluteCaptureTimeExtension>())); if (packet_info.absolute_capture_time().has_value()) { packet_info.set_local_capture_clock_offset( - capture_clock_offset_updater_.ConvertsToTimeDela( + CaptureClockOffsetUpdater::ConvertToTimeDelta( capture_clock_offset_updater_.AdjustEstimatedCaptureClockOffset( packet_info.absolute_capture_time() ->estimated_capture_clock_offset)));