Index: content/renderer/media/remote_media_stream_impl.cc |
diff --git a/content/renderer/media/remote_media_stream_impl.cc b/content/renderer/media/remote_media_stream_impl.cc |
index c889140c5b70bcbd43a82183cf68df490d85da41..2875dd65368c576256e5fe0d26ac29819c1c7417 100644 |
--- a/content/renderer/media/remote_media_stream_impl.cc |
+++ b/content/renderer/media/remote_media_stream_impl.cc |
@@ -18,9 +18,9 @@ |
#include "content/renderer/media/media_stream.h" |
#include "content/renderer/media/media_stream_track.h" |
#include "content/renderer/media/media_stream_video_track.h" |
-#include "content/renderer/media/webrtc/media_stream_remote_audio_track.h" |
#include "content/renderer/media/webrtc/media_stream_remote_video_source.h" |
#include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" |
+#include "content/renderer/media/webrtc/peer_connection_remote_audio_source.h" |
#include "content/renderer/media/webrtc/track_observer.h" |
#include "third_party/WebKit/public/platform/WebMediaStreamSource.h" |
#include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" |
@@ -239,11 +239,10 @@ void RemoteAudioTrackAdapter::Unregister() { |
void RemoteAudioTrackAdapter::InitializeWebkitAudioTrack() { |
InitializeWebkitTrack(blink::WebMediaStreamSource::TypeAudio); |
- webkit_track()->source().setExtraData( |
- new MediaStreamRemoteAudioSource(observed_track().get())); |
- webkit_track()->setExtraData( |
- new MediaStreamRemoteAudioTrack( |
- webkit_track()->source(), webkit_track()->isEnabled())); |
+ MediaStreamAudioSource* const source = |
+ new PeerConnectionRemoteAudioSource(observed_track().get()); |
+ webkit_track()->source().setExtraData(source); // Takes ownership. |
+ source->ConnectToTrack(*(webkit_track())); |
} |
void RemoteAudioTrackAdapter::OnChanged() { |