diff --git a/api/peer_connection_interface.h b/api/peer_connection_interface.h index f626b95000..7cb0e8f4fd 100644 --- a/api/peer_connection_interface.h +++ b/api/peer_connection_interface.h @@ -1402,17 +1402,14 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface { ~PeerConnectionFactoryInterface() override = default; }; -// This is a lower-level version of the CreatePeerConnectionFactory functions -// above. It's implemented in the "peerconnection" build target, whereas the -// above methods are only implemented in the broader "libjingle_peerconnection" -// build target, which pulls in the implementations of every module webrtc may -// use. +// CreateModularPeerConnectionFactory is implemented in the "peerconnection" +// build target, which doesn't pull in the implementations of every module +// webrtc may use. // // If an application knows it will only require certain modules, it can reduce // webrtc's impact on its binary size by depending only on the "peerconnection" // target and the modules the application requires, using -// CreateModularPeerConnectionFactory instead of one of the -// CreatePeerConnectionFactory methods above. For example, if an application +// CreateModularPeerConnectionFactory. For example, if an application // only uses WebRTC for audio, it can pass in null pointers for the // video-specific interfaces, and omit the corresponding modules from its // build. @@ -1421,42 +1418,6 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface { // will create the necessary thread internally. If |signaling_thread| is null, // the PeerConnectionFactory will use the thread on which this method is called // as the signaling thread, wrapping it in an rtc::Thread object if needed. -// -// If non-null, a reference is added to |default_adm|, and ownership of -// |video_encoder_factory| and |video_decoder_factory| is transferred to the -// returned factory. -// -// If |audio_mixer| is null, an internal audio mixer will be created and used. -// -// TODO(deadbeef): Use rtc::scoped_refptr<> and std::unique_ptr<> to make this -// ownership transfer and ref counting more obvious. -// -// TODO(deadbeef): Encapsulate these modules in a struct, so that when a new -// module is inevitably exposed, we can just add a field to the struct instead -// of adding a whole new CreateModularPeerConnectionFactory overload. -rtc::scoped_refptr -CreateModularPeerConnectionFactory( - rtc::Thread* network_thread, - rtc::Thread* worker_thread, - rtc::Thread* signaling_thread, - std::unique_ptr media_engine, - std::unique_ptr call_factory, - std::unique_ptr event_log_factory); - -rtc::scoped_refptr -CreateModularPeerConnectionFactory( - rtc::Thread* network_thread, - rtc::Thread* worker_thread, - rtc::Thread* signaling_thread, - std::unique_ptr media_engine, - std::unique_ptr call_factory, - std::unique_ptr event_log_factory, - std::unique_ptr fec_controller_factory, - std::unique_ptr - network_state_predictor_factory, - std::unique_ptr - network_controller_factory = nullptr); - rtc::scoped_refptr CreateModularPeerConnectionFactory( PeerConnectionFactoryDependencies dependencies); diff --git a/pc/peer_connection_factory.cc b/pc/peer_connection_factory.cc index ce1797b2f2..b2b12b0dbd 100644 --- a/pc/peer_connection_factory.cc +++ b/pc/peer_connection_factory.cc @@ -41,52 +41,6 @@ namespace webrtc { -rtc::scoped_refptr -CreateModularPeerConnectionFactory( - rtc::Thread* network_thread, - rtc::Thread* worker_thread, - rtc::Thread* signaling_thread, - std::unique_ptr media_engine, - std::unique_ptr call_factory, - std::unique_ptr event_log_factory) { - PeerConnectionFactoryDependencies dependencies; - dependencies.network_thread = network_thread; - dependencies.worker_thread = worker_thread; - dependencies.signaling_thread = signaling_thread; - dependencies.media_engine = std::move(media_engine); - dependencies.call_factory = std::move(call_factory); - dependencies.event_log_factory = std::move(event_log_factory); - return CreateModularPeerConnectionFactory(std::move(dependencies)); -} - -rtc::scoped_refptr -CreateModularPeerConnectionFactory( - rtc::Thread* network_thread, - rtc::Thread* worker_thread, - rtc::Thread* signaling_thread, - std::unique_ptr media_engine, - std::unique_ptr call_factory, - std::unique_ptr event_log_factory, - std::unique_ptr fec_controller_factory, - std::unique_ptr - network_state_predictor_factory, - std::unique_ptr - network_controller_factory) { - PeerConnectionFactoryDependencies dependencies; - dependencies.network_thread = network_thread; - dependencies.worker_thread = worker_thread; - dependencies.signaling_thread = signaling_thread; - dependencies.media_engine = std::move(media_engine); - dependencies.call_factory = std::move(call_factory); - dependencies.event_log_factory = std::move(event_log_factory); - dependencies.fec_controller_factory = std::move(fec_controller_factory); - dependencies.network_state_predictor_factory = - std::move(network_state_predictor_factory); - dependencies.network_controller_factory = - std::move(network_controller_factory); - return CreateModularPeerConnectionFactory(std::move(dependencies)); -} - rtc::scoped_refptr CreateModularPeerConnectionFactory( PeerConnectionFactoryDependencies dependencies) {