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

Unified Diff: media/base/audio_renderer_sink.h

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_sink.h
diff --git a/media/base/audio_renderer_sink.h b/media/base/audio_renderer_sink.h
index fa1ee84c250a10e16eb0db310b38a31cd555c65c..434e9bbca097c8fc60c00a44288338dd4acd64f7 100644
--- a/media/base/audio_renderer_sink.h
+++ b/media/base/audio_renderer_sink.h
@@ -5,13 +5,17 @@
#ifndef MEDIA_BASE_AUDIO_RENDERER_SINK_H_
#define MEDIA_BASE_AUDIO_RENDERER_SINK_H_
+#include <string>
#include <vector>
+
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "media/audio/audio_parameters.h"
#include "media/base/audio_bus.h"
#include "media/base/media_export.h"
+#include "url/gurl.h"
namespace media {
@@ -56,6 +60,12 @@ class AudioRendererSink
// Returns |true| on success.
virtual bool SetVolume(double volume) = 0;
+ // Switches the audio output device.
miu 2015/06/03 21:01:01 The documentation here is insufficient: Please cla
+ virtual void SwitchOutputDevice(
+ const std::string& device_id,
+ const GURL& security_origin,
+ const base::Callback<void(int)>& callback) = 0;
+
protected:
friend class base::RefCountedThreadSafe<AudioRendererSink>;
virtual ~AudioRendererSink() {}

Powered by Google App Engine
This is Rietveld 408576698