PSA: webrtc::CreatePeerConnectionFactory is moving

283 views
Skip to first unread message

mbon...@webrtc.org

unread,
Nov 19, 2018, 8:23:18 AM11/19/18
to discuss-webrtc

Hi,


we are moving the functions to create instances of PeerConnectionFactoryInterface from  api/peerconnectioninterface.h to api/create_peerconnection_factory.h (CL with the change).


This is needed in order to move definitions next to declarations (at the moment these functions are declared in api/peerconnectioninterface.h but defined in pc/createpeerconnectionfactory.cc; this makes it impossible for the build system to ensure that everyone that #includes the header also links with the implementation).


In order to fix your build, code that calls CreatePeerConnectionFactory will have to include api/create_peerconnection_factory.h and depend on api:create_peerconnection_factory.


Affected functions:


rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(

   rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory,

   rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory);


rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(

   rtc::Thread* network_thread,

   rtc::Thread* worker_thread,

   rtc::Thread* signaling_thread,

   AudioDeviceModule* default_adm,

   rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory,

   rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory,

   cricket::WebRtcVideoEncoderFactory* video_encoder_factory,

   cricket::WebRtcVideoDecoderFactory* video_decoder_factory);


rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(

   rtc::Thread* network_thread,

   rtc::Thread* worker_thread,

   rtc::Thread* signaling_thread,

   AudioDeviceModule* default_adm,

   rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory,

   rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory,

   cricket::WebRtcVideoEncoderFactory* video_encoder_factory,

   cricket::WebRtcVideoDecoderFactory* video_decoder_factory,

   rtc::scoped_refptr<AudioMixer> audio_mixer,

   rtc::scoped_refptr<AudioProcessing> audio_processing);


rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(

   rtc::Thread* network_thread,

   rtc::Thread* worker_thread,

   rtc::Thread* signaling_thread,

   AudioDeviceModule* default_adm,

   rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory,

   rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory,

   cricket::WebRtcVideoEncoderFactory* video_encoder_factory,

   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<NetworkControllerFactoryInterface>

       network_controller_factory = nullptr);


rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(

   rtc::Thread* network_thread,

   rtc::Thread* worker_thread,

   rtc::Thread* signaling_thread,

   rtc::scoped_refptr<AudioDeviceModule> default_adm,

   rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory,

   rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory,

   std::unique_ptr<VideoEncoderFactory> video_encoder_factory,

   std::unique_ptr<VideoDecoderFactory> video_decoder_factory,

   rtc::scoped_refptr<AudioMixer> audio_mixer,

   rtc::scoped_refptr<AudioProcessing> audio_processing);


rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactoryWithAudioMixer(

   rtc::Thread* network_thread,

   rtc::Thread* worker_thread,

   rtc::Thread* signaling_thread,

   AudioDeviceModule* default_adm,

   rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory,

   rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory,

   cricket::WebRtcVideoEncoderFactory* video_encoder_factory,

   cricket::WebRtcVideoDecoderFactory* video_decoder_factory,

   rtc::scoped_refptr<AudioMixer> audio_mixer);


rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(

   rtc::Thread* worker_and_network_thread,

   rtc::Thread* signaling_thread,

   AudioDeviceModule* default_adm,

   rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory,

   rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory,

   cricket::WebRtcVideoEncoderFactory* video_encoder_factory,

   cricket::WebRtcVideoDecoderFactory* video_decoder_factory) {

 return CreatePeerConnectionFactory(

     worker_and_network_thread, worker_and_network_thread, signaling_thread,

     default_adm, audio_encoder_factory, audio_decoder_factory,

     video_encoder_factory, video_decoder_factory);


Reply all
Reply to author
Forward
0 new messages