commit 67bd5318da47e5047a390a50bc4a2641fe13792f parent 1370263e8eab83fd21d3ccd5f76880e636084f81 Author: Dan Baker <dbaker@mozilla.com> Date: Thu, 23 Oct 2025 17:35:21 -0600 Bug 1995393 - Vendor libwebrtc from 9d79cd6bcc Upstream commit: https://webrtc.googlesource.com/src/+/9d79cd6bccd11259716d3734027de19d4bb9d8f1 Use injected clock in channel_receive Stops using the global clock methods from time_utils. This CL was uploaded by an experimental version of git cl split (https://crbug.com/389069356). R=danilchap@webrtc.org, hta@webrtc.org Bug: webrtc:42223992 Change-Id: Iee8ab7528aa6c453a9aaa79fb1794fa14b1c468a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/404960 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Evan Shrubsole <eshr@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Auto-Submit: Evan Shrubsole <eshr@webrtc.org> Cr-Commit-Position: refs/heads/main@{#45382} Diffstat:
4 files changed, 11 insertions(+), 12 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 /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-23T23:32:50.070321+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-23T23:35:09.183741+00:00. # base of lastest vendoring -2d3c3291d1 +9d79cd6bcc diff --git a/third_party/libwebrtc/audio/channel_receive.cc b/third_party/libwebrtc/audio/channel_receive.cc @@ -78,7 +78,6 @@ #include "rtc_base/synchronization/mutex.h" #include "rtc_base/system/no_unique_address.h" #include "rtc_base/thread_annotations.h" -#include "rtc_base/time_utils.h" #include "rtc_base/trace_event.h" #include "system_wrappers/include/metrics.h" #include "system_wrappers/include/ntp_time.h" @@ -661,7 +660,7 @@ void ChannelReceive::SetReceiveCodecs( void ChannelReceive::OnRtpPacket(const RtpPacketReceived& packet) { RTC_DCHECK_RUN_ON(&worker_thread_checker_); - Timestamp now = Timestamp::Millis(TimeMillis()); + Timestamp now = env_.clock().CurrentTime(); last_received_rtp_timestamp_ = packet.Timestamp(); last_received_rtp_system_time_ = now; @@ -758,7 +757,7 @@ void ChannelReceive::ReceivedRTCPPacket(const uint8_t* data, size_t length) { RTC_DCHECK_RUN_ON(&worker_thread_checker_); // Store playout timestamp for the received RTCP packet - UpdatePlayoutTimestamp(true, Timestamp::Millis(TimeMillis())); + UpdatePlayoutTimestamp(true, env_.clock().CurrentTime()); // Deliver RTCP packet to RTP/RTCP module for parsing rtp_rtcp_->IncomingRtcpPacket(MakeArrayView(data, length)); diff --git a/third_party/libwebrtc/audio/channel_receive_unittest.cc b/third_party/libwebrtc/audio/channel_receive_unittest.cc @@ -38,7 +38,6 @@ #include "modules/rtp_rtcp/source/rtp_packet_received.h" #include "rtc_base/logging.h" #include "rtc_base/string_encode.h" -#include "rtc_base/time_utils.h" #include "system_wrappers/include/ntp_time.h" #include "test/gmock.h" #include "test/gtest.h" @@ -92,7 +91,8 @@ class ChannelReceiveTest : public Test { uint32_t RtpNow() { // Note - the "random" offset of this timestamp is zero. - return TimeMillis() * 1000 / kSampleRateHz; + return time_controller_.GetClock()->TimeInMilliseconds() * 1000 / + kSampleRateHz; } RtpPacketReceived CreateRtpPacket() { diff --git a/third_party/libwebrtc/moz-patch-stack/s0035.patch b/third_party/libwebrtc/moz-patch-stack/s0035.patch @@ -42,10 +42,10 @@ index 3a4ae1702a..84ea0c996b 100644 } // namespace diff --git a/audio/channel_receive.cc b/audio/channel_receive.cc -index eda5824569..5be553dba5 100644 +index 90d3c70aa0..f4bf58d775 100644 --- a/audio/channel_receive.cc +++ b/audio/channel_receive.cc -@@ -132,7 +132,8 @@ class ChannelReceive : public ChannelReceiveInterface, +@@ -131,7 +131,8 @@ class ChannelReceive : public ChannelReceiveInterface, std::optional<AudioCodecPairId> codec_pair_id, scoped_refptr<FrameDecryptorInterface> frame_decryptor, const CryptoOptions& crypto_options, @@ -55,7 +55,7 @@ index eda5824569..5be553dba5 100644 ~ChannelReceive() override; void SetSink(AudioSinkInterface* sink) override; -@@ -561,7 +562,8 @@ ChannelReceive::ChannelReceive( +@@ -560,7 +561,8 @@ ChannelReceive::ChannelReceive( std::optional<AudioCodecPairId> codec_pair_id, scoped_refptr<FrameDecryptorInterface> frame_decryptor, const CryptoOptions& crypto_options, @@ -65,7 +65,7 @@ index eda5824569..5be553dba5 100644 : env_(env), worker_thread_(TaskQueueBase::Current()), rtp_receive_statistics_(ReceiveStatistics::Create(&env_.clock())), -@@ -595,6 +597,7 @@ ChannelReceive::ChannelReceive( +@@ -594,6 +596,7 @@ ChannelReceive::ChannelReceive( configuration.local_media_ssrc = local_ssrc; configuration.rtcp_packet_type_counter_observer = this; configuration.non_sender_rtt_measurement = enable_non_sender_rtt; @@ -73,7 +73,7 @@ index eda5824569..5be553dba5 100644 if (frame_transformer) InitFrameTransformerDelegate(std::move(frame_transformer)); -@@ -1182,13 +1185,14 @@ std::unique_ptr<ChannelReceiveInterface> CreateChannelReceive( +@@ -1181,13 +1184,14 @@ std::unique_ptr<ChannelReceiveInterface> CreateChannelReceive( std::optional<AudioCodecPairId> codec_pair_id, scoped_refptr<FrameDecryptorInterface> frame_decryptor, const CryptoOptions& crypto_options,