Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: webrtc/pc/createpeerconnectionfactory.cc

Issue 2965703002: Enable the injection of an APM into a peerconnection (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/pc/createpeerconnectionfactory.cc
diff --git a/webrtc/pc/createpeerconnectionfactory.cc b/webrtc/pc/createpeerconnectionfactory.cc
index c29ef52d3159ddd281d87a2bf20ef9b8229794c0..6861d822ae5993044386bbb9a542cdd929fab2fb 100644
--- a/webrtc/pc/createpeerconnectionfactory.cc
+++ b/webrtc/pc/createpeerconnectionfactory.cc
@@ -40,8 +40,7 @@ CreatePeerConnectionFactory() {
// Note: all the other CreatePeerConnectionFactory variants just end up calling
// this, ultimately.
-rtc::scoped_refptr<PeerConnectionFactoryInterface>
-CreatePeerConnectionFactoryWithAudioMixer(
+rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(
peah-webrtc 2017/06/30 11:48:46 This name was chosen in discussion with kwiberg@ a
rtc::Thread* network_thread,
rtc::Thread* worker_thread,
rtc::Thread* signaling_thread,
@@ -50,12 +49,18 @@ CreatePeerConnectionFactoryWithAudioMixer(
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<AudioMixer> audio_mixer,
+ rtc::scoped_refptr<AudioProcessing> audio_processing) {
+ rtc::scoped_refptr<AudioProcessing> audio_processing_use = audio_processing;
+ if (!audio_processing_use) {
+ audio_processing_use = AudioProcessing::Create();
+ }
+
std::unique_ptr<cricket::MediaEngineInterface> media_engine(
cricket::WebRtcMediaEngineFactory::Create(
default_adm, audio_encoder_factory, audio_decoder_factory,
video_encoder_factory, video_decoder_factory, audio_mixer,
- AudioProcessing::Create()));
+ audio_processing_use));
std::unique_ptr<CallFactoryInterface> call_factory = CreateCallFactory();
@@ -69,6 +74,23 @@ CreatePeerConnectionFactoryWithAudioMixer(
std::move(call_factory), std::move(event_log_factory));
}
+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) {
+ return CreatePeerConnectionFactory(
+ network_thread, worker_thread, signaling_thread, default_adm,
+ audio_encoder_factory, audio_decoder_factory, video_encoder_factory,
+ video_decoder_factory, audio_mixer, nullptr);
+}
+
rtc::scoped_refptr<PeerConnectionFactoryInterface>
CreatePeerConnectionFactoryWithAudioMixer(
rtc::Thread* network_thread,
« webrtc/api/peerconnectioninterface.h ('K') | « webrtc/api/peerconnectioninterface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698