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

Unified Diff: media/audio/audio_source_diverter.h

Issue 11413078: Tab Audio Capture: Browser-side connect/disconnect functionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable mirroring on ios platform, since much of content is not compiled in. Created 7 years, 11 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
« no previous file with comments | « media/audio/audio_output_controller_unittest.cc ('k') | media/media.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_source_diverter.h
diff --git a/media/audio/audio_source_diverter.h b/media/audio/audio_source_diverter.h
new file mode 100644
index 0000000000000000000000000000000000000000..787ddec7867dfd693ce04623ca1bb23d4ca2c949
--- /dev/null
+++ b/media/audio/audio_source_diverter.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_AUDIO_AUDIO_SOURCE_DIVERTER_H_
+#define MEDIA_AUDIO_AUDIO_SOURCE_DIVERTER_H_
+
+#include "media/base/media_export.h"
+
+// Audio sources may optionally implement AudioSourceDiverter to temporarily
+// divert audio data to an alternate AudioOutputStream. This allows the audio
+// data to be plumbed to an alternate consumer; for example, a loopback
+// mechanism for audio mirroring.
+
+namespace media {
+
+class AudioOutputStream;
+class AudioParameters;
+
+class MEDIA_EXPORT AudioSourceDiverter {
+public:
+ // Returns the audio parameters of the divertable audio data.
+ virtual const AudioParameters& GetAudioParameters() = 0;
+
+ // Start providing audio data to the given |to_stream|, which is in an
+ // unopened state. |to_stream| remains under the control of the
+ // AudioSourceDiverter.
+ virtual void StartDiverting(AudioOutputStream* to_stream) = 0;
+
+ // Stops diverting audio data to the stream. The AudioSourceDiverter is
+ // responsible for making sure the stream is closed, perhaps asynchronously.
+ virtual void StopDiverting() = 0;
+
+protected:
+ virtual ~AudioSourceDiverter() {}
+};
+
+} // namespace media
+
+#endif // MEDIA_AUDIO_AUDIO_SOURCE_DIVERTER_H_
« no previous file with comments | « media/audio/audio_output_controller_unittest.cc ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698