Bug 1942428 - Vendor libwebrtc from fb62f90706
Upstream commit: https://webrtc.googlesource.com/src/+/fb62f907066102a82ba503fa4b712a2cae9be516 Verify that transport-cc is used when RFC8888 field trial is off. This is preparatory to ensuring that transport-cc gets turned off when RFC8888 ccfb is negotiated. Bug: webrtc:378698658 Change-Id: Ie76677bd6aa046701562bbd93d8489858488f863 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368543 Reviewed-by: Per Kjellander <perkj@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43426}
This commit is contained in:
@@ -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-01-21T21:11:31.889120+00:00.
|
||||
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-01-21T21:13:12.600708+00:00.
|
||||
# base of lastest vendoring
|
||||
2d47c9395b
|
||||
fb62f90706
|
||||
|
||||
5
third_party/libwebrtc/call/call.cc
vendored
5
third_party/libwebrtc/call/call.cc
vendored
@@ -280,6 +280,7 @@ class Call final : public webrtc::Call,
|
||||
|
||||
void EnableSendCongestionControlFeedbackAccordingToRfc8888() override;
|
||||
int FeedbackAccordingToRfc8888Count() override;
|
||||
int FeedbackAccordingToTransportCcCount() override;
|
||||
|
||||
const FieldTrialsView& trials() const override;
|
||||
|
||||
@@ -1187,6 +1188,10 @@ int Call::FeedbackAccordingToRfc8888Count() {
|
||||
return transport_send_->ReceivedCongestionControlFeedbackCount();
|
||||
}
|
||||
|
||||
int Call::FeedbackAccordingToTransportCcCount() {
|
||||
return transport_send_->ReceivedTransportCcFeedbackCount();
|
||||
}
|
||||
|
||||
const FieldTrialsView& Call::trials() const {
|
||||
return env_.field_trials();
|
||||
}
|
||||
|
||||
1
third_party/libwebrtc/call/call.h
vendored
1
third_party/libwebrtc/call/call.h
vendored
@@ -148,6 +148,7 @@ class Call {
|
||||
|
||||
virtual void EnableSendCongestionControlFeedbackAccordingToRfc8888() = 0;
|
||||
virtual int FeedbackAccordingToRfc8888Count() = 0;
|
||||
virtual int FeedbackAccordingToTransportCcCount() = 0;
|
||||
|
||||
virtual const FieldTrialsView& trials() const = 0;
|
||||
|
||||
|
||||
@@ -639,6 +639,7 @@ void RtpTransportControllerSend::OnTransportFeedback(
|
||||
Timestamp receive_time,
|
||||
const rtcp::TransportFeedback& feedback) {
|
||||
RTC_DCHECK_RUN_ON(&sequence_checker_);
|
||||
++transport_cc_feedback_count_;
|
||||
feedback_demuxer_.OnTransportFeedback(feedback);
|
||||
std::optional<TransportPacketsFeedback> feedback_msg =
|
||||
transport_feedback_adapter_.ProcessTransportFeedback(feedback,
|
||||
|
||||
@@ -146,6 +146,10 @@ class RtpTransportControllerSend final
|
||||
RTC_DCHECK_RUN_ON(&sequence_checker_);
|
||||
return feedback_count_;
|
||||
}
|
||||
int ReceivedTransportCcFeedbackCount() const override {
|
||||
RTC_DCHECK_RUN_ON(&sequence_checker_);
|
||||
return transport_cc_feedback_count_;
|
||||
}
|
||||
|
||||
private:
|
||||
void MaybeCreateControllers() RTC_RUN_ON(sequence_checker_);
|
||||
@@ -235,6 +239,7 @@ class RtpTransportControllerSend final
|
||||
bool is_congested_ RTC_GUARDED_BY(sequence_checker_);
|
||||
// Count of feedback messages received.
|
||||
int feedback_count_ RTC_GUARDED_BY(sequence_checker_) = 0;
|
||||
int transport_cc_feedback_count_ RTC_GUARDED_BY(sequence_checker_) = 0;
|
||||
|
||||
// Protected by internal locks.
|
||||
RateLimiter retransmission_rate_limiter_;
|
||||
|
||||
@@ -163,6 +163,8 @@ class RtpTransportControllerSendInterface {
|
||||
virtual NetworkControllerInterface* GetNetworkController() = 0;
|
||||
// Count of RFC8888 feedback reports received
|
||||
virtual int ReceivedCongestionControlFeedbackCount() const = 0;
|
||||
// Count of transport-cc feedback reports received
|
||||
virtual int ReceivedTransportCcFeedbackCount() const = 0;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@@ -119,6 +119,7 @@ class MockRtpTransportControllerSend
|
||||
ReceivedCongestionControlFeedbackCount,
|
||||
(),
|
||||
(const, override));
|
||||
MOCK_METHOD(int, ReceivedTransportCcFeedbackCount, (), (const, override));
|
||||
};
|
||||
} // namespace webrtc
|
||||
#endif // CALL_TEST_MOCK_RTP_TRANSPORT_CONTROLLER_SEND_H_
|
||||
|
||||
@@ -471,6 +471,7 @@ class FakeCall final : public webrtc::Call, public webrtc::PacketReceiver {
|
||||
}
|
||||
void EnableSendCongestionControlFeedbackAccordingToRfc8888() override {}
|
||||
int FeedbackAccordingToRfc8888Count() { return 0; }
|
||||
int FeedbackAccordingToTransportCcCount() { return 0; }
|
||||
|
||||
private:
|
||||
webrtc::AudioSendStream* CreateAudioSendStream(
|
||||
|
||||
@@ -31,10 +31,10 @@ index 07a61605a9..039e9c7c9b 100644
|
||||
deps = [
|
||||
":audio_sender_interface",
|
||||
diff --git a/call/call.cc b/call/call.cc
|
||||
index 735b3d2c78..88242a6817 100644
|
||||
index f1385c9933..d6ea8135b8 100644
|
||||
--- a/call/call.cc
|
||||
+++ b/call/call.cc
|
||||
@@ -513,19 +513,6 @@ class Call final : public webrtc::Call,
|
||||
@@ -514,19 +514,6 @@ class Call final : public webrtc::Call,
|
||||
};
|
||||
} // namespace internal
|
||||
|
||||
@@ -55,7 +55,7 @@ index 735b3d2c78..88242a6817 100644
|
||||
std::unique_ptr<RtpTransportControllerSendInterface> transport_send;
|
||||
if (config.rtp_transport_controller_send_factory != nullptr) {
|
||||
diff --git a/call/call.h b/call/call.h
|
||||
index c69e37416f..fd18e92a11 100644
|
||||
index ae6eaf82d9..eb4dae0f95 100644
|
||||
--- a/call/call.h
|
||||
+++ b/call/call.h
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
using testing::Eq;
|
||||
using testing::HasSubstr;
|
||||
|
||||
class PeerConnectionCongestionControlTest
|
||||
@@ -83,4 +84,24 @@ TEST_F(PeerConnectionCongestionControlTest, CcfbGetsUsed) {
|
||||
kDefaultTimeout);
|
||||
}
|
||||
|
||||
TEST_F(PeerConnectionCongestionControlTest, TransportCcGetsUsed) {
|
||||
test::ScopedFieldTrials trials(
|
||||
"WebRTC-RFC8888CongestionControlFeedback/Disabled/");
|
||||
ASSERT_TRUE(CreatePeerConnectionWrappers());
|
||||
ConnectFakeSignaling();
|
||||
caller()->AddAudioVideoTracks();
|
||||
caller()->CreateAndSetAndSignalOffer();
|
||||
ASSERT_TRUE_WAIT(SignalingStateStable(), kDefaultTimeout);
|
||||
MediaExpectations media_expectations;
|
||||
media_expectations.CalleeExpectsSomeAudio();
|
||||
media_expectations.CalleeExpectsSomeVideo();
|
||||
ASSERT_TRUE(ExpectNewFrames(media_expectations));
|
||||
auto pc_internal = caller()->pc_internal();
|
||||
EXPECT_TRUE_WAIT(
|
||||
pc_internal->FeedbackAccordingToTransportCcCountForTesting() > 0,
|
||||
kDefaultTimeout);
|
||||
// Test that RFC 8888 feedback is NOT generated when field trial disabled.
|
||||
EXPECT_THAT(pc_internal->FeedbackAccordingToRfc8888CountForTesting(), Eq(0));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
7
third_party/libwebrtc/pc/peer_connection.cc
vendored
7
third_party/libwebrtc/pc/peer_connection.cc
vendored
@@ -3038,6 +3038,13 @@ int PeerConnection::FeedbackAccordingToRfc8888CountForTesting() const {
|
||||
});
|
||||
}
|
||||
|
||||
int PeerConnection::FeedbackAccordingToTransportCcCountForTesting() const {
|
||||
return worker_thread()->BlockingCall([this]() {
|
||||
RTC_DCHECK_RUN_ON(worker_thread());
|
||||
return call_->FeedbackAccordingToTransportCcCount();
|
||||
});
|
||||
}
|
||||
|
||||
std::function<void(const rtc::CopyOnWriteBuffer& packet,
|
||||
int64_t packet_time_us)>
|
||||
PeerConnection::InitializeRtcpCallback() {
|
||||
|
||||
1
third_party/libwebrtc/pc/peer_connection.h
vendored
1
third_party/libwebrtc/pc/peer_connection.h
vendored
@@ -443,6 +443,7 @@ class PeerConnection : public PeerConnectionInternal,
|
||||
}
|
||||
void RequestUsagePatternReportForTesting();
|
||||
int FeedbackAccordingToRfc8888CountForTesting() const;
|
||||
int FeedbackAccordingToTransportCcCountForTesting() const;
|
||||
|
||||
NetworkControllerInterface* GetNetworkController() override {
|
||||
if (!worker_thread()->IsCurrent()) {
|
||||
|
||||
Reference in New Issue
Block a user