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

Unified Diff: media/base/audio_renderer_mixer.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
Index: media/base/audio_renderer_mixer.cc
diff --git a/media/base/audio_renderer_mixer.cc b/media/base/audio_renderer_mixer.cc
index 112d7ef8b7726ad4ecf379a99d58193ff761f0dd..e91c6830d5b6144d0fec1bf8a901d25254899e3c 100644
--- a/media/base/audio_renderer_mixer.cc
+++ b/media/base/audio_renderer_mixer.cc
@@ -71,6 +71,17 @@ void AudioRendererMixer::RemoveErrorCallback(const base::Closure& error_cb) {
NOTREACHED();
}
+void AudioRendererMixer::SwitchOutputDevice(
+ const std::string& device_id,
+ const GURL& security_origin,
+ const base::Callback<void(int)>& callback) {
+ DVLOG(1) << __FUNCTION__ << "(" << device_id << ", "
+ << security_origin << ")";
+ base::AutoLock auto_lock(lock_);
+ audio_sink_->SwitchOutputDevice(device_id, security_origin, callback);
+}
+
+
int AudioRendererMixer::Render(AudioBus* audio_bus,
int audio_delay_milliseconds) {
base::AutoLock auto_lock(lock_);

Powered by Google App Engine
This is Rietveld 408576698