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

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

Issue 1834323002: MediaStream audio: Refactor 3 separate "glue" implementations into one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE + Workaround to ensure MediaStreamAudioProcessor is destroyed on the main thread. Created 4 years, 7 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/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() {
« no previous file with comments | « content/renderer/media/mock_media_stream_registry.cc ('k') | content/renderer/media/rtc_peer_connection_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698