Chromium Code Reviews

Unified Diff: webrtc/api/peerconnectionfactory.cc

Issue 2562333003: Revert of Support external audio mixer. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « webrtc/api/peerconnectionfactory.h ('k') | webrtc/api/peerconnectioninterface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnectionfactory.cc
diff --git a/webrtc/api/peerconnectionfactory.cc b/webrtc/api/peerconnectionfactory.cc
index 9da6e57f94e6435e23816b2d05af62e4bf268655..e76701e4869d09a8dc6359c076469e975d8305b8 100644
--- a/webrtc/api/peerconnectionfactory.cc
+++ b/webrtc/api/peerconnectionfactory.cc
@@ -57,9 +57,27 @@
AudioDeviceModule* default_adm,
cricket::WebRtcVideoEncoderFactory* encoder_factory,
cricket::WebRtcVideoDecoderFactory* decoder_factory) {
- return CreatePeerConnectionFactoryWithAudioMixer(
- network_thread, worker_thread, signaling_thread, default_adm,
- encoder_factory, decoder_factory, nullptr);
+ rtc::scoped_refptr<PeerConnectionFactory> pc_factory(
+ new rtc::RefCountedObject<PeerConnectionFactory>(
+ network_thread,
+ worker_thread,
+ signaling_thread,
+ default_adm,
+ CreateBuiltinAudioDecoderFactory(),
+ encoder_factory,
+ decoder_factory));
+
+ // Call Initialize synchronously but make sure its executed on
+ // |signaling_thread|.
+ MethodCall0<PeerConnectionFactory, bool> call(
+ pc_factory.get(),
+ &PeerConnectionFactory::Initialize);
+ bool result = call.Marshal(RTC_FROM_HERE, signaling_thread);
+
+ if (!result) {
+ return nullptr;
+ }
+ return PeerConnectionFactoryProxy::Create(signaling_thread, pc_factory);
}
PeerConnectionFactory::PeerConnectionFactory()
@@ -77,33 +95,6 @@
worker_thread_->Start();
}
-rtc::scoped_refptr<PeerConnectionFactoryInterface>
-CreatePeerConnectionFactoryWithAudioMixer(
- rtc::Thread* network_thread,
- rtc::Thread* worker_thread,
- rtc::Thread* signaling_thread,
- AudioDeviceModule* default_adm,
- cricket::WebRtcVideoEncoderFactory* encoder_factory,
- cricket::WebRtcVideoDecoderFactory* decoder_factory,
- rtc::scoped_refptr<AudioMixer> audio_mixer) {
- rtc::scoped_refptr<PeerConnectionFactory> pc_factory(
- new rtc::RefCountedObject<PeerConnectionFactory>(
- network_thread, worker_thread, signaling_thread, default_adm,
- CreateBuiltinAudioDecoderFactory(), encoder_factory, decoder_factory,
- audio_mixer));
-
- // Call Initialize synchronously but make sure it is executed on
- // |signaling_thread|.
- MethodCall0<PeerConnectionFactory, bool> call(
- pc_factory.get(), &PeerConnectionFactory::Initialize);
- bool result = call.Marshal(RTC_FROM_HERE, signaling_thread);
-
- if (!result) {
- return nullptr;
- }
- return PeerConnectionFactoryProxy::Create(signaling_thread, pc_factory);
-}
-
PeerConnectionFactory::PeerConnectionFactory(
rtc::Thread* network_thread,
rtc::Thread* worker_thread,
@@ -112,8 +103,7 @@
const rtc::scoped_refptr<webrtc::AudioDecoderFactory>&
audio_decoder_factory,
cricket::WebRtcVideoEncoderFactory* video_encoder_factory,
- cricket::WebRtcVideoDecoderFactory* video_decoder_factory,
- rtc::scoped_refptr<AudioMixer> audio_mixer)
+ cricket::WebRtcVideoDecoderFactory* video_decoder_factory)
: owns_ptrs_(false),
wraps_current_thread_(false),
network_thread_(network_thread),
@@ -122,8 +112,7 @@
default_adm_(default_adm),
audio_decoder_factory_(audio_decoder_factory),
video_encoder_factory_(video_encoder_factory),
- video_decoder_factory_(video_decoder_factory),
- external_audio_mixer_(audio_mixer) {
+ video_decoder_factory_(video_decoder_factory) {
RTC_DCHECK(network_thread);
RTC_DCHECK(worker_thread);
RTC_DCHECK(signaling_thread);
@@ -347,8 +336,10 @@
cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() {
ASSERT(worker_thread_ == rtc::Thread::Current());
return cricket::WebRtcMediaEngineFactory::Create(
- default_adm_.get(), audio_decoder_factory_, video_encoder_factory_.get(),
- video_decoder_factory_.get(), external_audio_mixer_);
+ default_adm_.get(),
+ audio_decoder_factory_,
+ video_encoder_factory_.get(),
+ video_decoder_factory_.get());
}
} // namespace webrtc
« no previous file with comments | « webrtc/api/peerconnectionfactory.h ('k') | webrtc/api/peerconnectioninterface.h » ('j') | no next file with comments »

Powered by Google App Engine