Index: webkit/plugins/ppapi/plugin_delegate.h |
=================================================================== |
--- webkit/plugins/ppapi/plugin_delegate.h (revision 103964) |
+++ webkit/plugins/ppapi/plugin_delegate.h (working copy) |
@@ -217,6 +217,39 @@ |
virtual ~PlatformAudio() {} |
}; |
+ |
viettrungluu
2011/11/08 00:41:54
nit: remove extra blank line
|
+ class PlatformAudioInput { |
+ public: |
+ class Client { |
+ protected: |
+ virtual ~Client() {} |
+ |
+ public: |
+ // Called when the stream is created. |
+ virtual void StreamCreated(base::SharedMemoryHandle shared_memory_handle, |
+ size_t shared_memory_size, |
+ base::SyncSocket::Handle socket) = 0; |
+ }; |
+ |
+ // Starts the playback. Returns false on error or if called before the |
+ // stream is created or after the stream is closed. |
+ virtual bool StartCapture() = 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; |
+ |
+ // Closes the stream. Make sure to call this before the object is |
+ // destructed. |
+ virtual void ShutDown() = 0; |
+ |
+ protected: |
+ virtual ~PlatformAudioInput() {} |
+ }; |
+ |
viettrungluu
2011/11/08 00:41:54
nit: remove extra blank lines
|
+ |
+ |
+ |
// Interface for PlatformVideoDecoder is directly inherited from general media |
// VideoDecodeAccelerator interface. |
class PlatformVideoDecoder : public media::VideoDecodeAccelerator { |
@@ -285,6 +318,12 @@ |
uint32_t sample_count, |
PlatformAudio::Client* 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, |
+ uint32_t sample_count, |
viettrungluu
2011/11/08 00:41:54
nit: indentation
|
+ PlatformAudioInput::Client* client) = 0; |
+ |
// A pointer is returned immediately, but it is not ready to be used until |
// BrokerConnected has been called. |
// The caller is responsible for calling Release() on the returned pointer |