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

Unified Diff: media/audio/audio_manager_base.h

Issue 11298006: Browser-wide audio mirroring for TabCapture API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Relevant files only. Created 8 years, 1 month 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/audio/audio_manager_base.h
diff --git a/media/audio/audio_manager_base.h b/media/audio/audio_manager_base.h
index 57b4fe44edb67707401d4b55bd4441dcda9c1dea..9fe3dceace195fe67538a31de8b0e28111fbcbce 100644
--- a/media/audio/audio_manager_base.h
+++ b/media/audio/audio_manager_base.h
@@ -6,6 +6,7 @@
#define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
#include <map>
+#include <set>
#include <string>
#include <utility>
@@ -31,6 +32,8 @@ class AudioOutputDispatcher;
// AudioManagerBase provides AudioManager functions common for all platforms.
class MEDIA_EXPORT AudioManagerBase : public AudioManager {
public:
+ typedef std::set<AudioOutputStream*> AudioOutputStreamList;
+
// Name of the generic "default" device.
static const char kDefaultDeviceName[];
// Unique Id of the generic "default" device.
@@ -66,6 +69,11 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
void IncreaseActiveInputStreamCount();
void DecreaseActiveInputStreamCount();
+ // These must be called on the audio thread.
+ void RegisterVirtualAudioOutputStream(AudioOutputStream* stream);
+ void UnregisterVirtualAudioOutputStream(AudioOutputStream* stream);
+ AudioOutputStreamList GetVirtualAudioOutputStreams();
+
// Creates the output stream for the |AUDIO_PCM_LINEAR| format. The legacy
// name is also from |AUDIO_PCM_LINEAR|.
virtual AudioOutputStream* MakeLinearOutputStream(
@@ -159,6 +167,8 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
// and GetMessageLoop() starts returning NULL.
scoped_refptr<base::MessageLoopProxy> message_loop_;
+ AudioOutputStreamList virtual_audio_output_streams_;
+
DISALLOW_COPY_AND_ASSIGN(AudioManagerBase);
};

Powered by Google App Engine
This is Rietveld 408576698