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

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

Issue 1647773002: MediaStream audio sourcing: Bypass audio processing for non-WebRTC cases. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NOT FOR REVIEW -- This will be broken-up across multiple CLs. Created 4 years, 10 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 e480d9f59779d9185ad81245144801c95208a266..ca6a34faab6979f3c7dac1c56ffdaa87939ed037 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"
@@ -109,8 +110,8 @@ MediaStreamRendererFactoryImpl::GetAudioRenderer(
// and mixes audio from all the tracks that belong to the media stream.
// For now, we have separate renderers depending on if the first audio track
// in the stream is local or remote.
- MediaStreamAudioTrack* audio_track = MediaStreamAudioTrack::GetTrack(
- audio_tracks[0]);
+ MediaStreamAudioTrack* const audio_track =
+ MediaStreamAudioTrack::Get(audio_tracks[0]);
if (!audio_track) {
// This can happen if the track was cloned.
// TODO(tommi, perkj): Fix cloning of tracks to handle extra data too.
@@ -120,11 +121,9 @@ 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()) {
+ PeerConnectionRemoteAudioTrack* const pc_remote_audio_track =
+ PeerConnectionRemoteAudioTrack::From(audio_track);
+ if (audio_track->is_local_track() || !pc_remote_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