diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-25 22:26:11 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-25 22:26:11 +0000 |
commit | 60c331a16cba4f5347f77df8d5e3907bc3f24ae0 (patch) | |
tree | da8d0eb8e23d24b4d05cf310114e77cfa0f26600 /webkit/plugins | |
parent | 7d018f7ff67d4f2febddaac5c98cfd76a79d58fd (diff) | |
download | chromium_src-60c331a16cba4f5347f77df8d5e3907bc3f24ae0.zip chromium_src-60c331a16cba4f5347f77df8d5e3907bc3f24ae0.tar.gz chromium_src-60c331a16cba4f5347f77df8d5e3907bc3f24ae0.tar.bz2 |
Split out the pepper audio delegates.
This moves the audio input and output delegates into their own files.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/9430034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123671 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins')
-rw-r--r-- | webkit/plugins/ppapi/mock_plugin_delegate.cc | 2 | ||||
-rw-r--r-- | webkit/plugins/ppapi/mock_plugin_delegate.h | 7 | ||||
-rw-r--r-- | webkit/plugins/ppapi/plugin_delegate.h | 14 | ||||
-rw-r--r-- | webkit/plugins/ppapi/ppb_audio_impl.cc | 12 | ||||
-rw-r--r-- | webkit/plugins/ppapi/ppb_audio_impl.h | 2 |
5 files changed, 20 insertions, 17 deletions
diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.cc b/webkit/plugins/ppapi/mock_plugin_delegate.cc index b1527e0..d73f763 100644 --- a/webkit/plugins/ppapi/mock_plugin_delegate.cc +++ b/webkit/plugins/ppapi/mock_plugin_delegate.cc @@ -79,7 +79,7 @@ uint32_t MockPluginDelegate::GetAudioHardwareOutputBufferSize() { return 0; } -MockPluginDelegate::PlatformAudio* MockPluginDelegate::CreateAudio( +MockPluginDelegate::PlatformAudioOutput* MockPluginDelegate::CreateAudioOutput( uint32_t sample_rate, uint32_t sample_count, PlatformAudioCommonClient* client) { diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.h b/webkit/plugins/ppapi/mock_plugin_delegate.h index ffaefa6..08e25b0 100644 --- a/webkit/plugins/ppapi/mock_plugin_delegate.h +++ b/webkit/plugins/ppapi/mock_plugin_delegate.h @@ -36,9 +36,10 @@ class MockPluginDelegate : public PluginDelegate { PlatformVideoCaptureEventHandler* handler); virtual uint32_t GetAudioHardwareOutputSampleRate(); virtual uint32_t GetAudioHardwareOutputBufferSize(); - virtual PlatformAudio* CreateAudio(uint32_t sample_rate, - uint32_t sample_count, - PlatformAudioCommonClient* client); + virtual PlatformAudioOutput* CreateAudioOutput( + uint32_t sample_rate, + uint32_t sample_count, + PlatformAudioCommonClient* client); virtual PlatformAudioInput* CreateAudioInput( uint32_t sample_rate, uint32_t sample_count, diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h index 67ad74a..3d02e1c 100644 --- a/webkit/plugins/ppapi/plugin_delegate.h +++ b/webkit/plugins/ppapi/plugin_delegate.h @@ -202,7 +202,7 @@ class PluginDelegate { base::SyncSocket::Handle socket) = 0; }; - class PlatformAudio { + class PlatformAudioOutput { public: // Starts the playback. Returns false on error or if called before the // stream is created or after the stream is closed. @@ -217,7 +217,7 @@ class PluginDelegate { virtual void ShutDown() = 0; protected: - virtual ~PlatformAudio() {} + virtual ~PlatformAudioOutput() {} }; class PlatformAudioInput { @@ -336,13 +336,15 @@ class PluginDelegate { // The caller is responsible for calling Shutdown() on the returned pointer // to clean up the corresponding resources allocated during this call. - virtual PlatformAudio* CreateAudio(uint32_t sample_rate, - uint32_t sample_count, - PlatformAudioCommonClient* client) = 0; + virtual PlatformAudioOutput* CreateAudioOutput( + uint32_t sample_rate, + uint32_t sample_count, + PlatformAudioCommonClient* client) = 0; // The caller is responsible for calling Shutdown() on the returned pointer // to clean up the corresponding resources allocated during this call. - virtual PlatformAudioInput* CreateAudioInput(uint32_t sample_rate, + virtual PlatformAudioInput* CreateAudioInput( + uint32_t sample_rate, uint32_t sample_count, PlatformAudioCommonClient* client) = 0; diff --git a/webkit/plugins/ppapi/ppb_audio_impl.cc b/webkit/plugins/ppapi/ppb_audio_impl.cc index 152c4f5..a8c9806 100644 --- a/webkit/plugins/ppapi/ppb_audio_impl.cc +++ b/webkit/plugins/ppapi/ppb_audio_impl.cc @@ -77,9 +77,9 @@ bool PPB_Audio_Impl::Init(PP_Resource config, // When the stream is created, we'll get called back on StreamCreated(). CHECK(!audio_); - audio_ = plugin_delegate->CreateAudio(enter.object()->GetSampleRate(), - enter.object()->GetSampleFrameCount(), - this); + audio_ = plugin_delegate->CreateAudioOutput( + enter.object()->GetSampleRate(), enter.object()->GetSampleFrameCount(), + this); return audio_ != NULL; } @@ -123,9 +123,9 @@ int32_t PPB_Audio_Impl::OpenTrusted(PP_Resource config, // When the stream is created, we'll get called back on StreamCreated(). DCHECK(!audio_); - audio_ = plugin_delegate->CreateAudio(enter.object()->GetSampleRate(), - enter.object()->GetSampleFrameCount(), - this); + audio_ = plugin_delegate->CreateAudioOutput( + enter.object()->GetSampleRate(), enter.object()->GetSampleFrameCount(), + this); if (!audio_) return PP_ERROR_FAILED; diff --git a/webkit/plugins/ppapi/ppb_audio_impl.h b/webkit/plugins/ppapi/ppb_audio_impl.h index d131090..19acfc3 100644 --- a/webkit/plugins/ppapi/ppb_audio_impl.h +++ b/webkit/plugins/ppapi/ppb_audio_impl.h @@ -73,7 +73,7 @@ class PPB_Audio_Impl : public ::ppapi::Resource, // PluginDelegate audio object that we delegate audio IPC through. We don't // own this pointer but are responsible for calling Shutdown on it. - PluginDelegate::PlatformAudio* audio_; + PluginDelegate::PlatformAudioOutput* audio_; DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Impl); }; |