commit 5e973be67a99b0026d530046064e54c6c73443c5
parent 2f88c894875c54d14ae11abdc5f20f3b2f76ef8b
Author: Dan Baker <dbaker@mozilla.com>
Date: Fri, 24 Oct 2025 13:57:40 -0600
Bug 1995393 - Vendor libwebrtc from 1d43877169
Upstream commit: https://webrtc.googlesource.com/src/+/1d438771695d5fdb0cfef161435d474b2153aa52
Cleanup RtcpSender from code for legacy RtpRtcp
Convert configuration to RTCP one directly in ModuleRtpRtcp2
Make scheduling callback required, update all tests to provide it.
Bug: webrtc:42224904
Change-Id: Ibe6f35ad5093978e4fac73b502f7466b723f8fb6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/405400
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45400}
Diffstat:
13 files changed, 76 insertions(+), 125 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-24T19:55:21.136057+00:00.
+libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-24T19:57:27.900215+00:00.
# base of lastest vendoring
-b057f44c3f
+1d43877169
diff --git a/third_party/libwebrtc/modules/rtp_rtcp/BUILD.gn b/third_party/libwebrtc/modules/rtp_rtcp/BUILD.gn
@@ -356,6 +356,7 @@ rtc_library("rtp_rtcp") {
"//third_party/abseil-cpp/absl/algorithm:container",
"//third_party/abseil-cpp/absl/base:core_headers",
"//third_party/abseil-cpp/absl/container:inlined_vector",
+ "//third_party/abseil-cpp/absl/functional:any_invocable",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/strings:string_view",
diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/rtcp_sender.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/rtcp_sender.cc
@@ -53,7 +53,6 @@
#include "modules/rtp_rtcp/source/rtcp_packet/tmmbn.h"
#include "modules/rtp_rtcp/source/rtcp_packet/tmmbr.h"
#include "modules/rtp_rtcp/source/rtp_rtcp_config.h"
-#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
#include "modules/rtp_rtcp/source/tmmbr_help.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
@@ -67,8 +66,6 @@ namespace {
const uint32_t kRtcpAnyExtendedReports = kRtcpXrReceiverReferenceTime |
kRtcpXrDlrrReportBlock |
kRtcpXrTargetBitrate;
-constexpr int32_t kDefaultVideoReportInterval = 1000;
-constexpr int32_t kDefaultAudioReportInterval = 5000;
} // namespace
// Helper to put several RTCP packets into lower layer datagram RTCP packet.
@@ -127,23 +124,6 @@ class RTCPSender::RtcpContext {
const Timestamp now_;
};
-RTCPSender::Configuration RTCPSender::Configuration::FromRtpRtcpConfiguration(
- const RtpRtcpInterface::Configuration& configuration) {
- RTCPSender::Configuration result;
- result.audio = configuration.audio;
- result.local_media_ssrc = configuration.local_media_ssrc;
- result.outgoing_transport = configuration.outgoing_transport;
- result.non_sender_rtt_measurement = configuration.non_sender_rtt_measurement;
- if (configuration.rtcp_report_interval_ms) {
- result.rtcp_report_interval =
- TimeDelta::Millis(configuration.rtcp_report_interval_ms);
- }
- result.receive_statistics = configuration.receive_statistics;
- result.rtcp_packet_type_counter_observer =
- configuration.rtcp_packet_type_counter_observer;
- return result;
-}
-
RTCPSender::RTCPSender(const Environment& env, Configuration config)
: env_(env),
audio_(config.audio),
@@ -151,30 +131,26 @@ RTCPSender::RTCPSender(const Environment& env, Configuration config)
random_(env_.clock().TimeInMicroseconds()),
method_(RtcpMode::kOff),
transport_(config.outgoing_transport),
- report_interval_(config.rtcp_report_interval.value_or(
- TimeDelta::Millis(config.audio ? kDefaultAudioReportInterval
- : kDefaultVideoReportInterval))),
- schedule_next_rtcp_send_evaluation_function_(
- std::move(config.schedule_next_rtcp_send_evaluation_function)),
+ report_interval_(config.rtcp_report_interval),
+ schedule_next_rtcp_send_evaluation_(
+ std::move(config.schedule_next_rtcp_send_evaluation)),
sending_(false),
timestamp_offset_(0),
last_rtp_timestamp_(0),
remote_ssrc_(0),
receive_statistics_(config.receive_statistics),
-
sequence_number_fir_(0),
-
remb_bitrate_(0),
-
tmmbr_send_bps_(0),
packet_oh_send_(0),
max_packet_size_(IP_PACKET_SIZE - 28), // IPv4 + UDP by default.
-
xr_send_receiver_reference_time_enabled_(
config.non_sender_rtt_measurement),
packet_type_counter_observer_(config.rtcp_packet_type_counter_observer),
send_video_bitrate_allocation_(false),
last_payload_type_(-1) {
+ RTC_CHECK(schedule_next_rtcp_send_evaluation_);
+ RTC_CHECK_GT(report_interval_, TimeDelta::Zero());
RTC_DCHECK(transport_ != nullptr);
builders_[kRtcpSr] = &RTCPSender::BuildSR;
@@ -915,10 +891,7 @@ void RTCPSender::SendCombinedRtcpPacket(
void RTCPSender::SetNextRtcpSendEvaluationDuration(TimeDelta duration) {
next_time_to_send_rtcp_ = env_.clock().CurrentTime() + duration;
- // TODO(bugs.webrtc.org/11581): make unconditional once downstream consumers
- // are using the callback method.
- if (schedule_next_rtcp_send_evaluation_function_)
- schedule_next_rtcp_send_evaluation_function_(duration);
+ schedule_next_rtcp_send_evaluation_(duration);
}
} // namespace webrtc
diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/rtcp_sender.h b/third_party/libwebrtc/modules/rtp_rtcp/source/rtcp_sender.h
@@ -13,7 +13,6 @@
#include <cstddef>
#include <cstdint>
-#include <functional>
#include <map>
#include <memory>
#include <optional>
@@ -21,6 +20,7 @@
#include <string>
#include <vector>
+#include "absl/functional/any_invocable.h"
#include "absl/strings/string_view.h"
#include "api/array_view.h"
#include "api/call/transport.h"
@@ -40,7 +40,6 @@
#include "modules/rtp_rtcp/source/rtcp_packet/report_block.h"
#include "modules/rtp_rtcp/source/rtcp_packet/tmmb_item.h"
#include "modules/rtp_rtcp/source/rtcp_receiver.h"
-#include "modules/rtp_rtcp/source/rtp_rtcp_interface.h"
#include "rtc_base/random.h"
#include "rtc_base/synchronization/mutex.h"
#include "rtc_base/thread_annotations.h"
@@ -51,11 +50,6 @@ namespace webrtc {
class RTCPSender final {
public:
struct Configuration {
- // TODO(bugs.webrtc.org/11581): Remove this temporary conversion utility
- // once rtc_rtcp_impl.cc/h are gone.
- static Configuration FromRtpRtcpConfiguration(
- const RtpRtcpInterface::Configuration& config);
-
// True for a audio version of the RTP/RTCP module object false will create
// a video version.
bool audio = false;
@@ -69,19 +63,14 @@ class RTCPSender final {
// Estimate RTT as non-sender as described in
// https://tools.ietf.org/html/rfc3611#section-4.4 and #section-4.5
bool non_sender_rtt_measurement = false;
- // Optional callback which, if specified, is used by RTCPSender to schedule
- // the next time to evaluate if RTCP should be sent by means of
- // TimeToSendRTCPReport/SendRTCP.
- // The RTCPSender client still needs to call TimeToSendRTCPReport/SendRTCP
- // to actually get RTCP sent.
- //
- // Note: It's recommended to use the callback to ensure program design that
- // doesn't use polling.
- // TODO(bugs.webrtc.org/11581): Make mandatory once downstream consumers
- // have migrated to the callback solution.
- std::function<void(TimeDelta)> schedule_next_rtcp_send_evaluation_function;
-
- std::optional<TimeDelta> rtcp_report_interval;
+
+ // Mandatory callback which is used by RTCPSender to schedule the next time
+ // to evaluate if RTCP should be sent by means of
+ // TimeToSendRTCPReport/SendRTCP. The RTCPSender client still needs to call
+ // TimeToSendRTCPReport/SendRTCP to actually get RTCP sent.
+ absl::AnyInvocable<void(TimeDelta)> schedule_next_rtcp_send_evaluation;
+
+ TimeDelta rtcp_report_interval;
ReceiveStatisticsProvider* receive_statistics = nullptr;
RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer = nullptr;
};
@@ -247,10 +236,7 @@ class RTCPSender final {
Transport* const transport_;
const TimeDelta report_interval_;
- // Set from
- // RTCPSender::Configuration::schedule_next_rtcp_send_evaluation_function.
- const std::function<void(TimeDelta)>
- schedule_next_rtcp_send_evaluation_function_;
+ absl::AnyInvocable<void(TimeDelta)> schedule_next_rtcp_send_evaluation_;
mutable Mutex mutex_rtcp_sender_;
bool sending_ RTC_GUARDED_BY(mutex_rtcp_sender_);
diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
@@ -106,9 +106,10 @@ class RtcpSenderTest : public ::testing::Test {
RTCPSender::Configuration configuration;
configuration.audio = false;
configuration.outgoing_transport = &test_transport_;
- configuration.rtcp_report_interval = TimeDelta::Millis(1000);
+ configuration.rtcp_report_interval = TimeDelta::Seconds(1);
configuration.receive_statistics = receive_statistics_.get();
configuration.local_media_ssrc = kSenderSsrc;
+ configuration.schedule_next_rtcp_send_evaluation = [](TimeDelta) {};
return configuration;
}
@@ -117,16 +118,15 @@ class RtcpSenderTest : public ::testing::Test {
RtpRtcpInterface::Configuration result;
result.audio = config.audio;
result.outgoing_transport = config.outgoing_transport;
- result.rtcp_report_interval_ms = config.rtcp_report_interval->ms();
+ result.rtcp_report_interval_ms = config.rtcp_report_interval.ms();
result.receive_statistics = config.receive_statistics;
result.local_media_ssrc = config.local_media_ssrc;
return result;
}
- std::unique_ptr<RTCPSender> CreateRtcpSender(
- const RTCPSender::Configuration& config,
- bool init_timestamps = true) {
- auto rtcp_sender = std::make_unique<RTCPSender>(env_, config);
+ std::unique_ptr<RTCPSender> CreateRtcpSender(RTCPSender::Configuration config,
+ bool init_timestamps = true) {
+ auto rtcp_sender = std::make_unique<RTCPSender>(env_, std::move(config));
rtcp_sender->SetRemoteSSRC(kRemoteSsrc);
if (init_timestamps) {
rtcp_sender->SetTimestampOffset(kStartRtpTimestamp);
@@ -235,12 +235,8 @@ TEST_F(RtcpSenderTest, SendConsecutiveSrWithExactSlope) {
}
TEST_F(RtcpSenderTest, DoNotSendSrBeforeRtp) {
- RTCPSender::Configuration config;
- config.receive_statistics = receive_statistics_.get();
- config.outgoing_transport = &test_transport_;
- config.rtcp_report_interval = TimeDelta::Millis(1000);
- config.local_media_ssrc = kSenderSsrc;
- auto rtcp_sender = CreateRtcpSender(config, /*init_timestamps=*/false);
+ auto rtcp_sender =
+ CreateRtcpSender(GetDefaultConfig(), /*init_timestamps=*/false);
rtcp_sender->SetRTCPStatus(RtcpMode::kReducedSize);
rtcp_sender->SetSendingStatus(feedback_state(), true);
@@ -255,12 +251,8 @@ TEST_F(RtcpSenderTest, DoNotSendSrBeforeRtp) {
}
TEST_F(RtcpSenderTest, DoNotSendCompundBeforeRtp) {
- RTCPSender::Configuration config;
- config.receive_statistics = receive_statistics_.get();
- config.outgoing_transport = &test_transport_;
- config.rtcp_report_interval = TimeDelta::Millis(1000);
- config.local_media_ssrc = kSenderSsrc;
- auto rtcp_sender = CreateRtcpSender(config, /*init_timestamps=*/false);
+ auto rtcp_sender =
+ CreateRtcpSender(GetDefaultConfig(), /*init_timestamps=*/false);
rtcp_sender->SetRTCPStatus(RtcpMode::kCompound);
rtcp_sender->SetSendingStatus(feedback_state(), true);
@@ -543,7 +535,7 @@ TEST_F(RtcpSenderTest, SendXrWithMultipleDlrrSubBlocks) {
TEST_F(RtcpSenderTest, SendXrWithRrtr) {
RTCPSender::Configuration config = GetDefaultConfig();
config.non_sender_rtt_measurement = true;
- auto rtcp_sender = CreateRtcpSender(config);
+ auto rtcp_sender = CreateRtcpSender(std::move(config));
rtcp_sender->SetRTCPStatus(RtcpMode::kCompound);
rtcp_sender->SetSendingStatus(feedback_state(), false);
NtpTime ntp = clock_.CurrentNtpTime();
@@ -559,7 +551,7 @@ TEST_F(RtcpSenderTest, SendXrWithRrtr) {
TEST_F(RtcpSenderTest, SendXrWithRrtrUsingSetter) {
RTCPSender::Configuration config = GetDefaultConfig();
config.non_sender_rtt_measurement = false;
- auto rtcp_sender = CreateRtcpSender(config);
+ auto rtcp_sender = CreateRtcpSender(std::move(config));
rtcp_sender->SetNonSenderRttMeasurement(true);
rtcp_sender->SetRTCPStatus(RtcpMode::kCompound);
rtcp_sender->SetSendingStatus(feedback_state(), false);
@@ -576,7 +568,7 @@ TEST_F(RtcpSenderTest, SendXrWithRrtrUsingSetter) {
TEST_F(RtcpSenderTest, SendsNoRrtrUsingSetter) {
RTCPSender::Configuration config = GetDefaultConfig();
config.non_sender_rtt_measurement = true;
- auto rtcp_sender = CreateRtcpSender(config);
+ auto rtcp_sender = CreateRtcpSender(std::move(config));
rtcp_sender->SetNonSenderRttMeasurement(false);
rtcp_sender->SetRTCPStatus(RtcpMode::kCompound);
rtcp_sender->SetSendingStatus(feedback_state(), false);
@@ -587,7 +579,7 @@ TEST_F(RtcpSenderTest, SendsNoRrtrUsingSetter) {
TEST_F(RtcpSenderTest, TestNoXrRrtrSentIfSending) {
RTCPSender::Configuration config = GetDefaultConfig();
config.non_sender_rtt_measurement = true;
- auto rtcp_sender = CreateRtcpSender(config);
+ auto rtcp_sender = CreateRtcpSender(std::move(config));
rtcp_sender->SetRTCPStatus(RtcpMode::kCompound);
rtcp_sender->SetSendingStatus(feedback_state(), true);
EXPECT_EQ(0, rtcp_sender->SendRTCP(feedback_state(), kRtcpReport));
@@ -597,7 +589,7 @@ TEST_F(RtcpSenderTest, TestNoXrRrtrSentIfSending) {
TEST_F(RtcpSenderTest, TestNoXrRrtrSentIfNotEnabled) {
RTCPSender::Configuration config = GetDefaultConfig();
config.non_sender_rtt_measurement = false;
- auto rtcp_sender = CreateRtcpSender(config);
+ auto rtcp_sender = CreateRtcpSender(std::move(config));
rtcp_sender->SetRTCPStatus(RtcpMode::kCompound);
rtcp_sender->SetSendingStatus(feedback_state(), false);
EXPECT_EQ(0, rtcp_sender->SendRTCP(feedback_state(), kRtcpReport));
@@ -606,12 +598,9 @@ TEST_F(RtcpSenderTest, TestNoXrRrtrSentIfNotEnabled) {
TEST_F(RtcpSenderTest, TestRegisterRtcpPacketTypeObserver) {
RtcpPacketTypeCounterObserverImpl observer;
- RTCPSender::Configuration config;
- config.receive_statistics = receive_statistics_.get();
- config.outgoing_transport = &test_transport_;
+ RTCPSender::Configuration config = GetDefaultConfig();
config.rtcp_packet_type_counter_observer = &observer;
- config.rtcp_report_interval = TimeDelta::Millis(1000);
- auto rtcp_sender = CreateRtcpSender(config);
+ auto rtcp_sender = CreateRtcpSender(std::move(config));
rtcp_sender->SetRTCPStatus(RtcpMode::kReducedSize);
EXPECT_EQ(0, rtcp_sender->SendRTCP(feedback_state(), kRtcpPli));
EXPECT_EQ(1, parser()->pli()->num_packets());
@@ -700,12 +689,9 @@ TEST_F(RtcpSenderTest, ByeMustBeLast) {
}));
// Re-configure rtcp_sender with mock_transport_
- RTCPSender::Configuration config;
- config.receive_statistics = receive_statistics_.get();
+ RTCPSender::Configuration config = GetDefaultConfig();
config.outgoing_transport = &mock_transport;
- config.rtcp_report_interval = TimeDelta::Millis(1000);
- config.local_media_ssrc = kSenderSsrc;
- auto rtcp_sender = CreateRtcpSender(config);
+ auto rtcp_sender = CreateRtcpSender(std::move(config));
rtcp_sender->SetTimestampOffset(kStartRtpTimestamp);
rtcp_sender->SetLastRtpTime(kRtpTimestamp, clock_.CurrentTime(),
diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
@@ -12,12 +12,12 @@
#include <cstdint>
#include <cstring>
-#include <functional>
#include <memory>
#include <optional>
#include <utility>
#include <vector>
+#include "absl/functional/any_invocable.h"
#include "absl/strings/string_view.h"
#include "api/array_view.h"
#include "api/environment/environment.h"
@@ -57,15 +57,6 @@ namespace webrtc {
namespace {
constexpr TimeDelta kDefaultExpectedRetransmissionTime = TimeDelta::Millis(125);
constexpr TimeDelta kRttUpdateInterval = TimeDelta::Millis(1000);
-
-RTCPSender::Configuration AddRtcpSendEvaluationCallback(
- RTCPSender::Configuration config,
- std::function<void(TimeDelta)> send_evaluation_callback) {
- config.schedule_next_rtcp_send_evaluation_function =
- std::move(send_evaluation_callback);
- return config;
-}
-
} // namespace
ModuleRtpRtcpImpl2::RtpSenderContext::RtpSenderContext(
@@ -89,13 +80,25 @@ ModuleRtpRtcpImpl2::ModuleRtpRtcpImpl2(const Environment& env,
const Configuration& configuration)
: env_(env),
worker_queue_(TaskQueueBase::Current()),
- rtcp_sender_(env_,
- AddRtcpSendEvaluationCallback(
- RTCPSender::Configuration::FromRtpRtcpConfiguration(
- configuration),
- [this](TimeDelta duration) {
- ScheduleRtcpSendEvaluation(duration);
- })),
+ rtcp_sender_(
+ env_,
+ {.audio = configuration.audio,
+ .local_media_ssrc = configuration.local_media_ssrc,
+ .outgoing_transport = configuration.outgoing_transport,
+ .non_sender_rtt_measurement =
+ configuration.non_sender_rtt_measurement,
+ .schedule_next_rtcp_send_evaluation =
+ [this](TimeDelta duration) {
+ ScheduleRtcpSendEvaluation(duration);
+ },
+ .rtcp_report_interval =
+ configuration.rtcp_report_interval_ms > 0
+ ? TimeDelta::Millis(configuration.rtcp_report_interval_ms)
+ : (configuration.audio ? TimeDelta::Seconds(5)
+ : TimeDelta::Seconds(1)),
+ .receive_statistics = configuration.receive_statistics,
+ .rtcp_packet_type_counter_observer =
+ configuration.rtcp_packet_type_counter_observer}),
rtcp_receiver_(env_, configuration, this),
packet_overhead_(28), // IPV4 UDP.
nack_last_time_sent_full_ms_(0),
diff --git a/third_party/libwebrtc/moz-patch-stack/s0001.patch b/third_party/libwebrtc/moz-patch-stack/s0001.patch
@@ -596,10 +596,10 @@ index 28509654c4..1e2ae94c85 100644
device_names->push_back(ToUtf8(device.DeviceName));
}
diff --git a/modules/rtp_rtcp/source/rtcp_sender.cc b/modules/rtp_rtcp/source/rtcp_sender.cc
-index 403890209e..429d497f10 100644
+index 589b387d11..2b936a151e 100644
--- a/modules/rtp_rtcp/source/rtcp_sender.cc
+++ b/modules/rtp_rtcp/source/rtcp_sender.cc
-@@ -205,7 +205,7 @@ void RTCPSender::SetRTCPStatus(RtcpMode new_method) {
+@@ -181,7 +181,7 @@ void RTCPSender::SetRTCPStatus(RtcpMode new_method) {
next_time_to_send_rtcp_ = std::nullopt;
} else if (method_ == RtcpMode::kOff) {
// When switching on, reschedule the next packet
diff --git a/third_party/libwebrtc/moz-patch-stack/s0003.patch b/third_party/libwebrtc/moz-patch-stack/s0003.patch
@@ -61,10 +61,10 @@ index 555269ae24..c5e84e0368 100644
std::optional<TimeDelta> LastRtt() const;
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
-index 3e90e257b6..c48d70e172 100644
+index 7234bda64a..4f461f159e 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
-@@ -526,6 +526,11 @@ void ModuleRtpRtcpImpl2::GetSendStreamDataCounters(
+@@ -529,6 +529,11 @@ void ModuleRtpRtcpImpl2::GetSendStreamDataCounters(
}
// Received RTCP report.
diff --git a/third_party/libwebrtc/moz-patch-stack/s0004.patch b/third_party/libwebrtc/moz-patch-stack/s0004.patch
@@ -63,10 +63,10 @@ index c5e84e0368..3b0ca48f5b 100644
std::optional<TimeDelta> AverageRtt() const;
std::optional<TimeDelta> LastRtt() const;
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
-index c48d70e172..27c22f4c88 100644
+index 4f461f159e..3949ca3804 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
-@@ -527,8 +527,10 @@ void ModuleRtpRtcpImpl2::GetSendStreamDataCounters(
+@@ -530,8 +530,10 @@ void ModuleRtpRtcpImpl2::GetSendStreamDataCounters(
// Received RTCP report.
void ModuleRtpRtcpImpl2::RemoteRTCPSenderInfo(uint32_t* packet_count,
diff --git a/third_party/libwebrtc/moz-patch-stack/s0042.patch b/third_party/libwebrtc/moz-patch-stack/s0042.patch
@@ -69,10 +69,10 @@ index bb8c521514..ec3f6e39d7 100644
std::optional<TimeDelta> AverageRtt() const;
std::optional<TimeDelta> LastRtt() const;
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
-index 27c22f4c88..c44664b73e 100644
+index 3949ca3804..80225eb427 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
-@@ -526,11 +526,11 @@ void ModuleRtpRtcpImpl2::GetSendStreamDataCounters(
+@@ -529,11 +529,11 @@ void ModuleRtpRtcpImpl2::GetSendStreamDataCounters(
}
// Received RTCP report.
diff --git a/third_party/libwebrtc/moz-patch-stack/s0082.patch b/third_party/libwebrtc/moz-patch-stack/s0082.patch
@@ -30,10 +30,10 @@ index 25cc81396c..4fa0e8c5e7 100644
rtp_module.SetSendingMediaStatus(sending);
if (sending) {
diff --git a/modules/rtp_rtcp/source/rtcp_sender.cc b/modules/rtp_rtcp/source/rtcp_sender.cc
-index 429d497f10..4f7ec4f751 100644
+index 2b936a151e..43d9fc784d 100644
--- a/modules/rtp_rtcp/source/rtcp_sender.cc
+++ b/modules/rtp_rtcp/source/rtcp_sender.cc
-@@ -217,8 +217,23 @@ bool RTCPSender::Sending() const {
+@@ -193,8 +193,23 @@ bool RTCPSender::Sending() const {
void RTCPSender::SetSendingStatus(const FeedbackState& /* feedback_state */,
bool sending) {
@@ -60,10 +60,10 @@ index 429d497f10..4f7ec4f751 100644
void RTCPSender::SetNonSenderRttMeasurement(bool enabled) {
diff --git a/modules/rtp_rtcp/source/rtcp_sender_unittest.cc b/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
-index 4184f22e1b..0e8163ccf7 100644
+index 35a7e96156..fa63ae090f 100644
--- a/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
+++ b/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
-@@ -347,12 +347,13 @@ TEST_F(RtcpSenderTest, SendBye) {
+@@ -339,12 +339,13 @@ TEST_F(RtcpSenderTest, SendBye) {
EXPECT_EQ(kSenderSsrc, parser()->bye()->sender_ssrc());
}
diff --git a/third_party/libwebrtc/moz-patch-stack/s0108.patch b/third_party/libwebrtc/moz-patch-stack/s0108.patch
@@ -9,10 +9,10 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/73f9e0e64eb65e9f2
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/rtp_rtcp/source/rtcp_sender.cc b/modules/rtp_rtcp/source/rtcp_sender.cc
-index 4f7ec4f751..14dcdd9cfa 100644
+index 43d9fc784d..59cc0218be 100644
--- a/modules/rtp_rtcp/source/rtcp_sender.cc
+++ b/modules/rtp_rtcp/source/rtcp_sender.cc
-@@ -215,7 +215,7 @@ bool RTCPSender::Sending() const {
+@@ -191,7 +191,7 @@ bool RTCPSender::Sending() const {
return sending_;
}
diff --git a/third_party/libwebrtc/video/video_send_stream_tests.cc b/third_party/libwebrtc/video/video_send_stream_tests.cc
@@ -1078,7 +1078,8 @@ void VideoSendStreamTest::TestNackRetransmission(
config.rtcp_report_interval = TimeDelta::Millis(kRtcpIntervalMs);
config.local_media_ssrc =
test::VideoTestConstants::kReceiverLocalVideoSsrc;
- RTCPSender rtcp_sender(env_, config);
+ config.schedule_next_rtcp_send_evaluation = [](TimeDelta) {};
+ RTCPSender rtcp_sender(env_, std::move(config));
rtcp_sender.SetRTCPStatus(RtcpMode::kReducedSize);
rtcp_sender.SetRemoteSSRC(test::VideoTestConstants::kVideoSendSsrcs[0]);
@@ -1280,7 +1281,8 @@ void VideoSendStreamTest::TestPacketFragmentationSize(TestVideoFormat format,
config.outgoing_transport = transport_adapter_.get();
config.rtcp_report_interval = TimeDelta::Millis(kRtcpIntervalMs);
config.local_media_ssrc = test::VideoTestConstants::kVideoSendSsrcs[0];
- RTCPSender rtcp_sender(env_, config);
+ config.schedule_next_rtcp_send_evaluation = [](TimeDelta) {};
+ RTCPSender rtcp_sender(env_, std::move(config));
rtcp_sender.SetRTCPStatus(RtcpMode::kReducedSize);
rtcp_sender.SetRemoteSSRC(test::VideoTestConstants::kVideoSendSsrcs[0]);