diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-26 11:52:36 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-26 11:52:36 +0000 |
commit | 94bbdac2dcb4ab8a719e21fec1e255ad1cad59f0 (patch) | |
tree | 89a8514e469183bf2cde15a88d6173a74ce2a6b3 /content/renderer/media/audio_device_factory.h | |
parent | 58cddec2e966620674519cb1d0cc56861687b380 (diff) | |
download | chromium_src-94bbdac2dcb4ab8a719e21fec1e255ad1cad59f0.zip chromium_src-94bbdac2dcb4ab8a719e21fec1e255ad1cad59f0.tar.gz chromium_src-94bbdac2dcb4ab8a719e21fec1e255ad1cad59f0.tar.bz2 |
First step towards moving AudioDevice and AudioInputDevice from content/ to media/audio. This cl introduces new IPC interface files in media/audio that have the definitions of an IPC layer for AudioDevice and AudioInputDevice.
AudioMessageFilter, AudionInputMessageFilter and others have been updated to use definitions from these file but in order to keep the diffs simple, I haven't actually moved the files over to media/audio. That will be the next step (and then no code changes should be needed).
TEST=There should be no functional changes here.
If there are problems, they should be caught by our existing unit
tests or build errors.
Review URL: https://chromiumcodereview.appspot.com/10790121
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148533 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/media/audio_device_factory.h')
-rw-r--r-- | content/renderer/media/audio_device_factory.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/content/renderer/media/audio_device_factory.h b/content/renderer/media/audio_device_factory.h index b15e967..14433ce 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,15 +25,23 @@ 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(); + + // 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: // The current globally registered factory. This is NULL when we should |