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

Unified Diff: webkit/plugins/ppapi/plugin_delegate.h

Issue 9705056: PepperPlatformAudioInputImpl: support audio input device selection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes in response to Shijing's suggestions. Created 8 years, 9 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: webkit/plugins/ppapi/plugin_delegate.h
diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h
index be8cd1635115d4ca2eec7df6c7f36d91c31df58e..b211e04475d290e5c94b83a490ac2e4ad61c71d3 100644
--- a/webkit/plugins/ppapi/plugin_delegate.h
+++ b/webkit/plugins/ppapi/plugin_delegate.h
@@ -227,15 +227,21 @@ class PluginDelegate {
virtual ~PlatformAudioOutput() {}
};
+ class PlatformAudioInputClient : public PlatformAudioCommonClient {
+ public:
+ virtual void StreamCreationFailed() = 0;
+
+ protected:
+ virtual ~PlatformAudioInputClient() {}
+ };
+
class PlatformAudioInput {
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;
+ // Starts the capture.
+ virtual void 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;
+ // Stops the capture.
+ virtual void StopCapture() = 0;
// Closes the stream. Make sure to call this before the object is
// destructed.
@@ -348,12 +354,14 @@ class PluginDelegate {
uint32_t sample_count,
PlatformAudioCommonClient* 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.

Powered by Google App Engine
This is Rietveld 408576698