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

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: sync&resolve again 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
« no previous file with comments | « webkit/plugins/ppapi/mock_plugin_delegate.cc ('k') | webkit/plugins/ppapi/ppb_audio_input_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « webkit/plugins/ppapi/mock_plugin_delegate.cc ('k') | webkit/plugins/ppapi/ppb_audio_input_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698