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

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

Issue 2570993002: Support external audio mixer in webrtc 2. (Closed)
Patch Set: Created 4 years 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/webrtcvoiceengine.h » ('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 1531be36b5dc1b1c39133be3362dbc82bcc620be..1a828393daff3d1946fbb5a6c1c60db1f56797d6 100644
--- a/webrtc/media/engine/webrtcmediaengine.cc
+++ b/webrtc/media/engine/webrtcmediaengine.cc
@@ -33,15 +33,20 @@ class WebRtcMediaEngine2
const rtc::scoped_refptr<webrtc::AudioDecoderFactory>&
audio_decoder_factory,
WebRtcVideoEncoderFactory* video_encoder_factory,
- WebRtcVideoDecoderFactory* video_decoder_factory)
+ WebRtcVideoDecoderFactory* video_decoder_factory,
+ rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer)
#ifdef HAVE_WEBRTC_VIDEO
: CompositeMediaEngine<WebRtcVoiceEngine, WebRtcVideoEngine2>(
- adm, audio_decoder_factory){
+ adm,
+ audio_decoder_factory,
+ audio_mixer){
#else
: CompositeMediaEngine<WebRtcVoiceEngine, NullWebRtcVideoEngine>(
- adm, audio_decoder_factory) {
+ adm,
+ audio_decoder_factory,
+ audio_mixer) {
#endif
- video_.SetExternalDecoderFactory(video_decoder_factory);
+ video_.SetExternalDecoderFactory(video_decoder_factory);
video_.SetExternalEncoderFactory(video_encoder_factory);
}
};
@@ -53,9 +58,11 @@ cricket::MediaEngineInterface* CreateWebRtcMediaEngine(
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);
+ cricket::WebRtcVideoDecoderFactory* video_decoder_factory,
+ rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer) {
+ return new cricket::WebRtcMediaEngine2(adm, audio_decoder_factory,
+ video_encoder_factory,
+ video_decoder_factory, audio_mixer);
}
void DestroyWebRtcMediaEngine(cricket::MediaEngineInterface* media_engine) {
@@ -71,9 +78,20 @@ MediaEngineInterface* WebRtcMediaEngineFactory::Create(
webrtc::AudioDeviceModule* adm,
WebRtcVideoEncoderFactory* video_encoder_factory,
WebRtcVideoDecoderFactory* video_decoder_factory) {
- return CreateWebRtcMediaEngine(adm,
- webrtc::CreateBuiltinAudioDecoderFactory(),
- video_encoder_factory, video_decoder_factory);
+ return CreateWebRtcMediaEngine(
+ adm, webrtc::CreateBuiltinAudioDecoderFactory(), video_encoder_factory,
+ video_decoder_factory, nullptr);
+}
+
+MediaEngineInterface* WebRtcMediaEngineFactory::Create(
+ webrtc::AudioDeviceModule* adm,
+ 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,
+ nullptr);
}
// Used by PeerConnectionFactory to create a media engine passed into
@@ -83,9 +101,11 @@ MediaEngineInterface* WebRtcMediaEngineFactory::Create(
const rtc::scoped_refptr<webrtc::AudioDecoderFactory>&
audio_decoder_factory,
WebRtcVideoEncoderFactory* video_encoder_factory,
- WebRtcVideoDecoderFactory* video_decoder_factory) {
+ WebRtcVideoDecoderFactory* video_decoder_factory,
+ rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer) {
return CreateWebRtcMediaEngine(adm, audio_decoder_factory,
- video_encoder_factory, video_decoder_factory);
+ video_encoder_factory, video_decoder_factory,
+ audio_mixer);
}
namespace {
« no previous file with comments | « webrtc/media/engine/webrtcmediaengine.h ('k') | webrtc/media/engine/webrtcvoiceengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698