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

Unified Diff: content/renderer/media/audio_device_factory.h

Issue 10790121: First step towards moving AudioDevice from content/ to media/audio. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments and renamed the IPC classes+files Created 8 years, 5 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/audio_device_factory.h
diff --git a/content/renderer/media/audio_device_factory.h b/content/renderer/media/audio_device_factory.h
index b15e96701c94e67eb3c232d4361dbc9139a307ad..ed15f8a7201a3d72a4b420d99b09c9f5336dd177 100644
--- a/content/renderer/media/audio_device_factory.h
+++ b/content/renderer/media/audio_device_factory.h
@@ -12,6 +12,8 @@ namespace media {
class AudioRendererSink;
}
+class AudioInputDevice;
+
namespace content {
// A factory for creating AudioRendererSinks. There is a global factory
@@ -23,17 +25,25 @@ class CONTENT_EXPORT AudioDeviceFactory {
// Creates an AudioRendererSink using the currently registered factory,
// or the default one if no factory is registered. Ownership of the returned
// pointer will be passed to the caller.
- static media::AudioRendererSink* Create();
+ static media::AudioRendererSink* NewOutputDevice();
scherkus (not reviewing) 2012/07/25 22:34:11 hrmm.. these names are a bit strange it's an Audi
tommi (sloooow) - chröme 2012/07/26 09:19:36 I agree. I think AudioDeviceFactory is fine but A
scherkus (not reviewing) 2012/07/26 17:57:31 I think the *Impl idea has some legs -- the one th
+
+ // TODO(henrika): Update AudioInputDevice to inherit from an interface
+ // similar to AudioRendererSink, but for input. Same for the callback
+ // interfaces.
+ static AudioInputDevice* NewInputDevice();
protected:
AudioDeviceFactory();
virtual ~AudioDeviceFactory();
- // You can derive from this class and specify an implementation for this
- // function to create a different kind of AudioRendererSink for testing.
- virtual media::AudioRendererSink* CreateAudioDevice() = 0;
+ // You can derive from this class and specify an implementation for these
+ // functions to provide alternate audio device implementations.
+ // If the return value of either of these function is NULL, we fall back
+ // on the default implementation.
+ virtual media::AudioRendererSink* CreateOutputDevice() = 0;
+ virtual AudioInputDevice* CreateInputDevice() = 0;
- private:
+private:
scherkus (not reviewing) 2012/07/25 22:34:11 indent
tommi (sloooow) - chröme 2012/07/26 09:19:36 Done.
// The current globally registered factory. This is NULL when we should
// create the default AudioRendererSinks.
static AudioDeviceFactory* factory_;

Powered by Google App Engine
This is Rietveld 408576698