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

Unified Diff: content/renderer/media/media_stream_renderer_factory_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
« no previous file with comments | « content/renderer/media/media_stream_center.cc ('k') | content/renderer/media/media_stream_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_renderer_factory_impl.cc
diff --git a/content/renderer/media/media_stream_renderer_factory_impl.cc b/content/renderer/media/media_stream_renderer_factory_impl.cc
index 2bd9799bb0c6dc1fabe38e2b498e56f2698864cb..78cd37500f0c190a6848568f6dbfcf2fbae42276 100644
--- a/content/renderer/media/media_stream_renderer_factory_impl.cc
+++ b/content/renderer/media/media_stream_renderer_factory_impl.cc
@@ -11,6 +11,7 @@
#include "content/renderer/media/media_stream_video_track.h"
#include "content/renderer/media/track_audio_renderer.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_audio_renderer.h"
#include "content/renderer/render_thread_impl.h"
#include "media/base/audio_hardware_config.h"
@@ -114,11 +115,7 @@ MediaStreamRendererFactoryImpl::GetAudioRenderer(
// If the track has a local source, or is a remote track that does not use the
// WebRTC audio pipeline, return a new TrackAudioRenderer instance.
- //
- // TODO(miu): In a soon up-coming change, I'll introduce a cleaner way (i.e.,
- // rather than calling GetAudioAdapter()) to determine whether a remote source
- // is via WebRTC or something else.
- if (audio_track->is_local_track() || !audio_track->GetAudioAdapter()) {
+ if (!PeerConnectionRemoteAudioTrack::From(audio_track)) {
// TODO(xians): Add support for the case where the media stream contains
// multiple audio tracks.
DVLOG(1) << "Creating TrackAudioRenderer for "
« no previous file with comments | « content/renderer/media/media_stream_center.cc ('k') | content/renderer/media/media_stream_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698