Allows injection of network controller factory into peer connection factory.
Bug: webrtc:9155
Change-Id: I0a17024042f154297aba20f5d2dc766feb27f3f7
Reviewed-on: https://webrtc-review.googlesource.com/73123
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23313}
diff --git a/api/BUILD.gn b/api/BUILD.gn
index effdb5d..f8b282f 100644
--- a/api/BUILD.gn
+++ b/api/BUILD.gn
@@ -108,6 +108,7 @@
"audio:audio_mixer_api",
"audio_codecs:audio_codecs_api",
"transport:bitrate_settings",
+ "transport:network_control",
"video:video_frame",
# Basically, don't add stuff here. You might break sensitive downstream
diff --git a/api/peerconnectioninterface.h b/api/peerconnectioninterface.h
index 7ec8353..8c06029 100644
--- a/api/peerconnectioninterface.h
+++ b/api/peerconnectioninterface.h
@@ -91,6 +91,7 @@
#include "api/stats/rtcstatscollectorcallback.h"
#include "api/statstypes.h"
#include "api/transport/bitrate_settings.h"
+#include "api/transport/network_control.h"
#include "api/turncustomizer.h"
#include "api/umametrics.h"
#include "logging/rtc_event_log/rtc_event_log_factory_interface.h"
@@ -1424,6 +1425,8 @@
// created and used.
// If |fec_controller_factory| is null, an internal fec controller module will
// be created and used.
+// If |network_controller_factory| is provided, it will be used if enabled via
+// field trial.
rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(
rtc::Thread* network_thread,
rtc::Thread* worker_thread,
@@ -1435,7 +1438,9 @@
cricket::WebRtcVideoDecoderFactory* video_decoder_factory,
rtc::scoped_refptr<AudioMixer> audio_mixer,
rtc::scoped_refptr<AudioProcessing> audio_processing,
- std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory);
+ std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory,
+ std::unique_ptr<NetworkControllerFactoryInterface>
+ network_controller_factory = nullptr);
// Create a new instance of PeerConnectionFactoryInterface with optional video
// codec factories. These video factories represents all video codecs, i.e. no
@@ -1536,7 +1541,9 @@
std::unique_ptr<cricket::MediaEngineInterface> media_engine,
std::unique_ptr<CallFactoryInterface> call_factory,
std::unique_ptr<RtcEventLogFactoryInterface> event_log_factory,
- std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory);
+ std::unique_ptr<FecControllerFactoryInterface> fec_controller_factory,
+ std::unique_ptr<NetworkControllerFactoryInterface>
+ network_controller_factory = nullptr);
} // namespace webrtc