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

Unified Diff: content/renderer/media/webrtc_local_audio_renderer.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: content/renderer/media/webrtc_local_audio_renderer.cc
diff --git a/content/renderer/media/webrtc_local_audio_renderer.cc b/content/renderer/media/webrtc_local_audio_renderer.cc
index 727ed361d123719c421dd7d8f958dedb335940ac..f25a2b18b18ac3e7486af7c8e2ce8de264e0957e 100644
--- a/content/renderer/media/webrtc_local_audio_renderer.cc
+++ b/content/renderer/media/webrtc_local_audio_renderer.cc
@@ -207,6 +207,18 @@ void WebRtcLocalAudioRenderer::SetVolume(float volume) {
sink_->SetVolume(volume);
}
+void WebRtcLocalAudioRenderer::SwitchOutputDevice(
+ const std::string& device_id,
+ const GURL& security_origin,
+ const base::Callback<void(int)>& callback) {
+ DVLOG(1) << "WebRtcLocalAudioRenderer::SwitchOutputDevice("
+ << device_id << ")";
+ DCHECK(message_loop_->BelongsToCurrentThread());
+
+ if (sink_.get())
+ sink_->SwitchOutputDevice(device_id, security_origin, callback);
+}
+
base::TimeDelta WebRtcLocalAudioRenderer::GetCurrentRenderTime() const {
DCHECK(message_loop_->BelongsToCurrentThread());
base::AutoLock auto_lock(thread_lock_);

Powered by Google App Engine
This is Rietveld 408576698