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

Unified Diff: content/renderer/media/media_stream_dependency_factory.cc

Issue 37793005: move the APM to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added a switch, it uses the APM in WebRtc if the switch is off, otherwise use the APM in Chrome. Created 7 years, 2 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
Index: content/renderer/media/media_stream_dependency_factory.cc
diff --git a/content/renderer/media/media_stream_dependency_factory.cc b/content/renderer/media/media_stream_dependency_factory.cc
index 9e8b69b2f9f34163d9b5e9d1182766c97190874f..7fc155a2195b6411bb281d70cb9ac3f94317f151 100644
--- a/content/renderer/media/media_stream_dependency_factory.cc
+++ b/content/renderer/media/media_stream_dependency_factory.cc
@@ -65,7 +65,7 @@ struct {
{ webrtc::MediaConstraintsInterface::kAutoGainControl,
webrtc::MediaConstraintsInterface::kValueTrue },
{ webrtc::MediaConstraintsInterface::kExperimentalAutoGainControl,
- webrtc::MediaConstraintsInterface::kValueTrue },
+ webrtc::MediaConstraintsInterface::kValueFalse },
{ webrtc::MediaConstraintsInterface::kNoiseSuppression,
webrtc::MediaConstraintsInterface::kValueTrue },
{ webrtc::MediaConstraintsInterface::kHighpassFilter,
@@ -441,11 +441,11 @@ bool MediaStreamDependencyFactory::AddNativeMediaStreamTrack(
webaudio_source.get(),
source_data->local_audio_source(),
&track_constraints));
+ // Set the source provider to the webkit.
+ WebKit::WebMediaStreamTrack writable_track = track;
+ writable_track.setSourceProvider(static_cast<WebRtcLocalAudioTrack*>(
+ audio_track.get())->audio_source_provider());
audio_track->set_enabled(track.isEnabled());
- if (capturer.get()) {
- WebKit::WebMediaStreamTrack writable_track = track;
- writable_track.setSourceProvider(capturer->audio_source_provider());
- }
return native_stream->AddTrack(audio_track.get());
} else {
DCHECK(source.type() == WebKit::WebMediaStreamSource::TypeVideo);
@@ -672,7 +672,8 @@ MediaStreamDependencyFactory::CreateLocalAudioTrack(
// for each audio track.
scoped_refptr<WebRtcLocalAudioTrack> audio_track(
WebRtcLocalAudioTrack::Create(id, capturer, webaudio_source,
- source, constraints));
+ source, constraints,
+ GetWebRtcAudioDevice()));
// Add the WebRtcAudioDevice as the sink to the local audio track.
audio_track->AddSink(GetWebRtcAudioDevice());

Powered by Google App Engine
This is Rietveld 408576698