Index: webrtc/media/engine/webrtcmediaengine.cc |
diff --git a/webrtc/media/engine/webrtcmediaengine.cc b/webrtc/media/engine/webrtcmediaengine.cc |
index f452b74233ffa6890515d8c7923044643c41e28e..53e15d657543625e31b5aa9964ef1aad427b7861 100644 |
--- a/webrtc/media/engine/webrtcmediaengine.cc |
+++ b/webrtc/media/engine/webrtcmediaengine.cc |
@@ -29,15 +29,19 @@ class WebRtcMediaEngine2 |
#endif |
public: |
WebRtcMediaEngine2(webrtc::AudioDeviceModule* adm, |
- WebRtcVideoEncoderFactory* encoder_factory, |
- WebRtcVideoDecoderFactory* decoder_factory) |
+ const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& |
+ audio_decoder_factory, |
+ WebRtcVideoEncoderFactory* video_encoder_factory, |
+ WebRtcVideoDecoderFactory* video_decoder_factory) |
#ifdef HAVE_WEBRTC_VIDEO |
- : CompositeMediaEngine<WebRtcVoiceEngine, WebRtcVideoEngine2>(adm) { |
+ : CompositeMediaEngine<WebRtcVoiceEngine, WebRtcVideoEngine2>( |
+ adm, audio_decoder_factory){ |
#else |
- : CompositeMediaEngine<WebRtcVoiceEngine, NullWebRtcVideoEngine>(adm) { |
+ : CompositeMediaEngine<WebRtcVoiceEngine, NullWebRtcVideoEngine>( |
+ adm, audio_decoder_factory) { |
#endif |
- video_.SetExternalDecoderFactory(decoder_factory); |
- video_.SetExternalEncoderFactory(encoder_factory); |
+ video_.SetExternalDecoderFactory(video_decoder_factory); |
+ video_.SetExternalEncoderFactory(video_encoder_factory); |
} |
}; |
@@ -45,10 +49,12 @@ class WebRtcMediaEngine2 |
cricket::MediaEngineInterface* CreateWebRtcMediaEngine( |
webrtc::AudioDeviceModule* adm, |
- cricket::WebRtcVideoEncoderFactory* encoder_factory, |
- cricket::WebRtcVideoDecoderFactory* decoder_factory) { |
- return new cricket::WebRtcMediaEngine2(adm, encoder_factory, |
- decoder_factory); |
+ const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& |
+ audio_decoder_factory, |
+ cricket::WebRtcVideoEncoderFactory* video_encoder_factory, |
+ cricket::WebRtcVideoDecoderFactory* video_decoder_factory) { |
+ return new cricket::WebRtcMediaEngine2( |
+ adm, audio_decoder_factory, video_encoder_factory, video_decoder_factory); |
} |
void DestroyWebRtcMediaEngine(cricket::MediaEngineInterface* media_engine) { |
@@ -61,9 +67,12 @@ namespace cricket { |
// ChannelManager. |
MediaEngineInterface* WebRtcMediaEngineFactory::Create( |
webrtc::AudioDeviceModule* adm, |
- WebRtcVideoEncoderFactory* encoder_factory, |
- WebRtcVideoDecoderFactory* decoder_factory) { |
- return CreateWebRtcMediaEngine(adm, encoder_factory, decoder_factory); |
+ const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& |
+ audio_decoder_factory, |
+ WebRtcVideoEncoderFactory* video_encoder_factory, |
+ WebRtcVideoDecoderFactory* video_decoder_factory) { |
+ return CreateWebRtcMediaEngine(adm, audio_decoder_factory, |
+ video_encoder_factory, video_decoder_factory); |
} |
namespace { |