Index: media/engine/webrtcmediaengine.cc |
diff --git a/media/engine/webrtcmediaengine.cc b/media/engine/webrtcmediaengine.cc |
index 99b6041a185123347eb0971431dc9b0a3f33ff79..888b6a9d985e39a995c66f3d55935a1c0ed60cc1 100644 |
--- a/media/engine/webrtcmediaengine.cc |
+++ b/media/engine/webrtcmediaengine.cc |
@@ -14,6 +14,8 @@ |
#include "api/audio_codecs/builtin_audio_decoder_factory.h" |
#include "api/audio_codecs/builtin_audio_encoder_factory.h" |
+#include "api/video_codecs/video_decoder_factory.h" |
+#include "api/video_codecs/video_encoder_factory.h" |
#include "media/engine/webrtcvoiceengine.h" |
#ifdef HAVE_WEBRTC_VIDEO |
@@ -121,6 +123,32 @@ MediaEngineInterface* WebRtcMediaEngineFactory::Create( |
video_decoder_factory, audio_mixer, audio_processing); |
} |
+std::unique_ptr<MediaEngineInterface> WebRtcMediaEngineFactory::Create( |
+ rtc::scoped_refptr<webrtc::AudioDeviceModule> adm, |
+ rtc::scoped_refptr<webrtc::AudioEncoderFactory> audio_encoder_factory, |
+ rtc::scoped_refptr<webrtc::AudioDecoderFactory> audio_decoder_factory, |
+ std::unique_ptr<webrtc::VideoEncoderFactory> video_encoder_factory, |
+ std::unique_ptr<webrtc::VideoDecoderFactory> video_decoder_factory, |
+ rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer, |
+ rtc::scoped_refptr<webrtc::AudioProcessing> audio_processing) { |
+#ifdef HAVE_WEBRTC_VIDEO |
+ typedef WebRtcVideoEngine VideoEngine; |
+ std::tuple<std::unique_ptr<webrtc::VideoEncoderFactory>, |
+ std::unique_ptr<webrtc::VideoDecoderFactory>> |
+ video_args(std::move(video_encoder_factory), |
+ std::move(video_decoder_factory)); |
+#else |
+ typedef NullWebRtcVideoEngine VideoEngine; |
+ std::tuple<> video_args; |
+#endif |
+ return std::unique_ptr<MediaEngineInterface>( |
+ new CompositeMediaEngine<WebRtcVoiceEngine, VideoEngine>( |
+ std::forward_as_tuple(adm, audio_encoder_factory, |
+ audio_decoder_factory, audio_mixer, |
+ audio_processing), |
+ std::move(video_args))); |
+} |
+ |
namespace { |
// Remove mutually exclusive extensions with lower priority. |
void DiscardRedundantExtensions( |