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

Unified Diff: webrtc/media/engine/webrtcmediaengine.cc

Issue 1991233004: Moved creation of AudioDecoderFactory to inside PeerConnectionFactory. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@audio-decoder-factory-injections-3
Patch Set: Parental Advisory: Explicit Content Created 4 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
« no previous file with comments | « webrtc/media/engine/webrtcmediaengine.h ('k') | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « webrtc/media/engine/webrtcmediaengine.h ('k') | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698