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

Unified Diff: media/base/audio_capturer_source.h

Issue 12440027: Do not pass the string device_id via IPC message to create an audio input stream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed Per's comments. Created 7 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 | « media/audio/audio_input_ipc.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_capturer_source.h
diff --git a/media/base/audio_capturer_source.h b/media/base/audio_capturer_source.h
index 2f99b926af564bf8ee3038ee1a711931dc82183a..deae5e22dc1eaebb43b128dbdb1ca2b4b52ba6a0 100644
--- a/media/base/audio_capturer_source.h
+++ b/media/base/audio_capturer_source.h
@@ -35,25 +35,15 @@ class AudioCapturerSource
virtual ~CaptureCallback() {}
};
- class CaptureEventHandler {
- public:
- // Notification to the client that the device with the specific |device_id|
- // has been started.
- virtual void OnDeviceStarted(const std::string& device_id) = 0;
-
- // Notification to the client that the device has been stopped.
- virtual void OnDeviceStopped() = 0;
-
- protected:
- virtual ~CaptureEventHandler() {}
- };
-
// Sets information about the audio stream format and the device
// to be used. It must be called before any of the other methods.
- // TODO(xians): Add |device_id| to this Initialize() function.
+ // The |session_id| is used by the browser to identify which input device to
+ // be used. For clients who do not care about device permission and device
+ // selection, pass |session_id| using
+ // AudioInputDeviceManager::kFakeOpenSessionId.
virtual void Initialize(const AudioParameters& params,
CaptureCallback* callback,
- CaptureEventHandler* event_handler) = 0;
+ int session_id) = 0;
// Starts the audio recording.
virtual void Start() = 0;
@@ -65,10 +55,6 @@ class AudioCapturerSource
// Sets the capture volume, with range [0.0, 1.0] inclusive.
virtual void SetVolume(double volume) = 0;
- // Specifies the |session_id| to query which device to use.
- // TODO(xians): Change the interface to SetDevice(const std::string&).
- virtual void SetDevice(int session_id) = 0;
-
// Enables or disables the WebRtc AGC control.
virtual void SetAutomaticGainControl(bool enable) = 0;
« no previous file with comments | « media/audio/audio_input_ipc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698