| Index: webkit/plugins/ppapi/plugin_delegate.h
|
| diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h
|
| index 9bd49fa5be4d798e2d3031b3b3622068998da031..8b6f4434271b7348c64645fc892bb36a4d23d6cb 100644
|
| --- a/webkit/plugins/ppapi/plugin_delegate.h
|
| +++ b/webkit/plugins/ppapi/plugin_delegate.h
|
| @@ -203,11 +203,11 @@ class PluginDelegate {
|
| virtual bool Echo(const base::Callback<void()>& callback) = 0;
|
| };
|
|
|
| - // The (interface for the) client used by |PlatformAudio| and
|
| + // The base class of clients used by |PlatformAudioOutput| and
|
| // |PlatformAudioInput|.
|
| - class PlatformAudioCommonClient {
|
| + class PlatformAudioClientBase {
|
| protected:
|
| - virtual ~PlatformAudioCommonClient() {}
|
| + virtual ~PlatformAudioClientBase() {}
|
|
|
| public:
|
| // Called when the stream is created.
|
| @@ -216,6 +216,11 @@ class PluginDelegate {
|
| base::SyncSocket::Handle socket) = 0;
|
| };
|
|
|
| + class PlatformAudioOutputClient : public PlatformAudioClientBase {
|
| + protected:
|
| + virtual ~PlatformAudioOutputClient() {}
|
| + };
|
| +
|
| class PlatformAudioOutput {
|
| public:
|
| // Starts the playback. Returns false on error or if called before the
|
| @@ -234,15 +239,18 @@ class PluginDelegate {
|
| virtual ~PlatformAudioOutput() {}
|
| };
|
|
|
| - class PlatformAudioInput {
|
| + class PlatformAudioInputClient : public PlatformAudioClientBase {
|
| public:
|
| - // Starts the capture. Returns false on error or if called before the
|
| - // stream is created or after the stream is closed.
|
| - virtual bool StartCapture() = 0;
|
| + virtual void StreamCreationFailed() = 0;
|
|
|
| - // Stops the capture. Returns false on error or if called before the stream
|
| - // is created or after the stream is closed.
|
| - virtual bool StopCapture() = 0;
|
| + protected:
|
| + virtual ~PlatformAudioInputClient() {}
|
| + };
|
| +
|
| + class PlatformAudioInput {
|
| + public:
|
| + virtual void StartCapture() = 0;
|
| + virtual void StopCapture() = 0;
|
|
|
| // Closes the stream. Make sure to call this before the object is
|
| // destructed.
|
| @@ -356,14 +364,16 @@ class PluginDelegate {
|
| virtual PlatformAudioOutput* CreateAudioOutput(
|
| uint32_t sample_rate,
|
| uint32_t sample_count,
|
| - PlatformAudioCommonClient* client) = 0;
|
| + PlatformAudioOutputClient* client) = 0;
|
|
|
| + // If |device_id| is empty, the default audio input device will be used.
|
| // The caller is responsible for calling Shutdown() on the returned pointer
|
| // to clean up the corresponding resources allocated during this call.
|
| virtual PlatformAudioInput* CreateAudioInput(
|
| + const std::string& device_id,
|
| uint32_t sample_rate,
|
| uint32_t sample_count,
|
| - PlatformAudioCommonClient* client) = 0;
|
| + PlatformAudioInputClient* client) = 0;
|
|
|
| // A pointer is returned immediately, but it is not ready to be used until
|
| // BrokerConnected has been called.
|
|
|