commit 4cccf2828ec5036189f04b10e7b1c98e6dae5269
parent dcb134fd84592acb4b6e49c2ed940a010727b5b2
Author: Dan Baker <dbaker@mozilla.com>
Date: Mon, 1 Dec 2025 23:54:22 -0700
Bug 2000941 - Vendor libwebrtc from 30b9d513d3
Upstream commit: https://webrtc.googlesource.com/src/+/30b9d513d36f789371a57aef373d7bf191663edb
Remove per-pc NetworkController injection and PC::GetNetworkController
Remove helpers added to support the RtpTransport web API now that
prototyping of that API has been removed (see attached bug).
Minor APIs with no known usages so should be ok to delete, per
conversation with reviewer.
No-Iwyu: Failing on unrelated missing include, fixing in change 411780
Bug: chromium:345101934
Change-Id: I43c7f318cbee5c5887e62f73d7d392d5fff56f9c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/410160
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45722}
Diffstat:
9 files changed, 9 insertions(+), 58 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-12-02T06:51:47.056078+00:00.
+libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-12-02T06:54:08.569393+00:00.
# base of lastest vendoring
-b72ef3160d
+30b9d513d3
diff --git a/third_party/libwebrtc/api/peer_connection_interface.h b/third_party/libwebrtc/api/peer_connection_interface.h
@@ -1227,10 +1227,6 @@ class RTC_EXPORT PeerConnectionInterface : public RefCountInterface {
// pointers.
virtual Thread* signaling_thread() const = 0;
- // NetworkController instance being used by this PeerConnection, to be used
- // to identify instances when using a custom NetworkControllerFactory.
- virtual NetworkControllerInterface* GetNetworkController() = 0;
-
protected:
// Dtor protected as objects shouldn't be deleted via this interface.
~PeerConnectionInterface() override = default;
@@ -1387,9 +1383,6 @@ struct RTC_EXPORT PeerConnectionDependencies final {
std::unique_ptr<RTCCertificateGeneratorInterface> cert_generator;
std::unique_ptr<SSLCertificateVerifier> tls_cert_verifier;
std::unique_ptr<VideoBitrateAllocatorFactory> video_bitrate_allocator_factory;
- // Optional network controller factory to use.
- // Overrides that set in PeerConnectionFactoryDependencies.
- std::unique_ptr<NetworkControllerFactoryInterface> network_controller_factory;
// Optional permission factory to request Local Network Access permission.
std::unique_ptr<LocalNetworkAccessPermissionFactoryInterface>
diff --git a/third_party/libwebrtc/api/test/mock_peerconnectioninterface.h b/third_party/libwebrtc/api/test/mock_peerconnectioninterface.h
@@ -39,7 +39,6 @@
#include "api/stats/rtc_stats_collector_callback.h"
#include "api/transport/bandwidth_estimation_settings.h"
#include "api/transport/bitrate_settings.h"
-#include "api/transport/network_control.h"
#include "rtc_base/ref_counted_object.h"
#include "rtc_base/thread.h"
#include "test/gmock.h"
@@ -237,10 +236,6 @@ class MockPeerConnectionInterface : public PeerConnectionInterface {
MOCK_METHOD(void, StopRtcEventLog, (), (override));
MOCK_METHOD(void, Close, (), (override));
MOCK_METHOD(Thread*, signaling_thread, (), (const, override));
- MOCK_METHOD(NetworkControllerInterface*,
- GetNetworkController,
- (),
- (override));
};
static_assert(
diff --git a/third_party/libwebrtc/pc/peer_connection.h b/third_party/libwebrtc/pc/peer_connection.h
@@ -56,7 +56,6 @@
#include "api/transport/bitrate_settings.h"
#include "api/transport/data_channel_transport_interface.h"
#include "api/transport/enums.h"
-#include "api/transport/network_control.h"
#include "api/turn_customizer.h"
#include "call/call.h"
#include "call/payload_type_picker.h"
@@ -84,7 +83,6 @@
#include "pc/transceiver_list.h"
#include "pc/transport_stats.h"
#include "pc/usage_pattern.h"
-#include "rtc_base/checks.h"
#include "rtc_base/copy_on_write_buffer.h"
#include "rtc_base/rtc_certificate.h"
#include "rtc_base/ssl_certificate.h"
@@ -446,15 +444,6 @@ class PeerConnection : public PeerConnectionInternal,
int FeedbackAccordingToRfc8888CountForTesting() const;
int FeedbackAccordingToTransportCcCountForTesting() const;
- NetworkControllerInterface* GetNetworkController() override {
- if (!worker_thread()->IsCurrent()) {
- return worker_thread()->BlockingCall(
- [this]() { return GetNetworkController(); });
- }
- RTC_DCHECK_RUN_ON(worker_thread());
- RTC_DCHECK(call_);
- return call_->GetTransportControllerSend()->GetNetworkController();
- }
PayloadTypePicker& payload_type_picker() override {
return payload_type_picker_;
}
diff --git a/third_party/libwebrtc/pc/peer_connection_factory.cc b/third_party/libwebrtc/pc/peer_connection_factory.cc
@@ -32,7 +32,6 @@
#include "api/scoped_refptr.h"
#include "api/sequence_checker.h"
#include "api/transport/bitrate_settings.h"
-#include "api/transport/network_control.h"
#include "api/units/data_rate.h"
#include "call/call_config.h"
#include "media/base/codec.h"
@@ -288,13 +287,9 @@ PeerConnectionFactory::CreatePeerConnectionOrError(
dependencies.allocator->SetNetworkIgnoreMask(options().network_ignore_mask);
dependencies.allocator->SetVpnList(configuration.vpn_list);
- std::unique_ptr<NetworkControllerFactoryInterface>
- network_controller_factory =
- std::move(dependencies.network_controller_factory);
- std::unique_ptr<Call> call = worker_thread()->BlockingCall(
- [this, &env, &configuration, &network_controller_factory] {
- return CreateCall_w(env, std::move(configuration),
- std::move(network_controller_factory));
+ std::unique_ptr<Call> call =
+ worker_thread()->BlockingCall([this, &env, &configuration] {
+ return CreateCall_w(env, std::move(configuration));
});
auto pc = PeerConnection::Create(env, context_, options_, std::move(call),
@@ -337,9 +332,7 @@ scoped_refptr<AudioTrackInterface> PeerConnectionFactory::CreateAudioTrack(
std::unique_ptr<Call> PeerConnectionFactory::CreateCall_w(
const Environment& env,
- const PeerConnectionInterface::RTCConfiguration& configuration,
- std::unique_ptr<NetworkControllerFactoryInterface>
- per_call_network_controller_factory) {
+ const PeerConnectionInterface::RTCConfiguration& configuration) {
RTC_DCHECK_RUN_ON(worker_thread());
CallConfig call_config(env, network_thread());
@@ -369,12 +362,7 @@ std::unique_ptr<Call> PeerConnectionFactory::CreateCall_w(
network_state_predictor_factory_.get();
call_config.neteq_factory = neteq_factory_.get();
- if (per_call_network_controller_factory != nullptr) {
- RTC_LOG(LS_INFO) << "Using pc injected network controller factory";
- call_config.per_call_network_controller_factory =
- std::move(per_call_network_controller_factory);
- } else if (field_trials().IsEnabled(
- "WebRTC-Bwe-InjectedCongestionController")) {
+ if (field_trials().IsEnabled("WebRTC-Bwe-InjectedCongestionController")) {
RTC_LOG(LS_INFO) << "Using pcf injected network controller factory";
call_config.network_controller_factory =
injected_network_controller_factory_.get();
diff --git a/third_party/libwebrtc/pc/peer_connection_factory.h b/third_party/libwebrtc/pc/peer_connection_factory.h
@@ -126,9 +126,7 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface {
std::unique_ptr<Call> CreateCall_w(
const Environment& env,
- const PeerConnectionInterface::RTCConfiguration& configuration,
- std::unique_ptr<NetworkControllerFactoryInterface>
- network_controller_factory);
+ const PeerConnectionInterface::RTCConfiguration& configuration);
scoped_refptr<ConnectionContext> context_;
PeerConnectionFactoryInterface::Options options_
diff --git a/third_party/libwebrtc/pc/peer_connection_proxy.h b/third_party/libwebrtc/pc/peer_connection_proxy.h
@@ -19,7 +19,6 @@
#include <vector>
#include "api/adaptation/resource.h"
-#include "api/candidate.h"
#include "api/data_channel_event_observer_interface.h"
#include "api/data_channel_interface.h"
#include "api/dtls_transport_interface.h"
@@ -40,7 +39,6 @@
#include "api/stats/rtc_stats_collector_callback.h"
#include "api/transport/bandwidth_estimation_settings.h"
#include "api/transport/bitrate_settings.h"
-#include "api/transport/network_control.h"
#include "pc/proxy.h"
#include "rtc_base/thread.h"
@@ -192,7 +190,7 @@ PROXY_METHOD1(void,
SetDataChannelEventObserver,
std::unique_ptr<DataChannelEventObserverInterface>)
PROXY_METHOD0(void, Close)
-PROXY_METHOD0(NetworkControllerInterface*, GetNetworkController)
+
BYPASS_PROXY_CONSTMETHOD0(Thread*, signaling_thread)
END_PROXY_MAP(PeerConnection)
diff --git a/third_party/libwebrtc/pc/test/fake_peer_connection_base.h b/third_party/libwebrtc/pc/test/fake_peer_connection_base.h
@@ -47,7 +47,6 @@
#include "api/stats/rtc_stats_collector_callback.h"
#include "api/transport/bandwidth_estimation_settings.h"
#include "api/transport/bitrate_settings.h"
-#include "api/transport/network_control.h"
#include "call/call.h"
#include "call/payload_type_picker.h"
#include "p2p/base/port.h"
@@ -406,10 +405,6 @@ class FakePeerConnectionBase : public PeerConnectionInternal {
const FieldTrialsView& trials() const override { return field_trials_; }
- NetworkControllerInterface* GetNetworkController() override {
- return nullptr;
- }
-
PayloadTypePicker& payload_type_picker() override {
return payload_type_picker_;
}
diff --git a/third_party/libwebrtc/pc/test/mock_peer_connection_internal.h b/third_party/libwebrtc/pc/test/mock_peer_connection_internal.h
@@ -45,7 +45,6 @@
#include "api/stats/rtc_stats_collector_callback.h"
#include "api/transport/bandwidth_estimation_settings.h"
#include "api/transport/bitrate_settings.h"
-#include "api/transport/network_control.h"
#include "call/call.h"
#include "call/payload_type_picker.h"
#include "p2p/base/port.h"
@@ -379,10 +378,6 @@ class MockPeerConnectionInternal : public PeerConnectionInternal {
OnSctpDataChannelStateChanged,
(int channel_id, DataChannelInterface::DataState),
(override));
- MOCK_METHOD(NetworkControllerInterface*,
- GetNetworkController,
- (),
- (override));
MOCK_METHOD(PayloadTypePicker&, payload_type_picker, (), (override));
};