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

Unified Diff: media/renderers/renderer_impl.cc

Issue 1122393004: Add support for switching the audio output device for HTMLMediaElements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes to MediaPlayers so that they invoke callbacks in the correct threads. First complete implem… Created 5 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
« media/blink/webmediaplayer_impl.cc ('K') | « media/renderers/renderer_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/renderer_impl.cc
diff --git a/media/renderers/renderer_impl.cc b/media/renderers/renderer_impl.cc
index c06553a0d7dc9f955352b26b57cd066208df6fa7..474417a28cacede34d3f3be37f81d425f7a73fa3 100644
--- a/media/renderers/renderer_impl.cc
+++ b/media/renderers/renderer_impl.cc
@@ -195,6 +195,18 @@ void RendererImpl::SetVolume(float volume) {
audio_renderer_->SetVolume(volume);
}
+void RendererImpl::SwitchAudioOutputDevice(
+ const std::string& device_id,
+ const GURL& security_origin,
+ const base::Callback<void(int)>& callback) {
+ DCHECK(task_runner_->BelongsToCurrentThread());
+ DVLOG(1) << __FUNCTION__ << "(" << device_id << ", "
+ << security_origin << ")";
+
+ if (audio_renderer_)
+ audio_renderer_->SwitchOutputDevice(device_id, security_origin, callback);
+}
+
base::TimeDelta RendererImpl::GetMediaTime() {
// No BelongsToCurrentThread() checking because this can be called from other
// threads.
« media/blink/webmediaplayer_impl.cc ('K') | « media/renderers/renderer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698