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

Unified Diff: content/renderer/media/audio_input_device.h

Issue 8659040: There is a racing between SyncSocket::Receive in audio_thread_ and SyncSocket::Close in renderer ... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: update Created 9 years 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 | « content/renderer/media/audio_device.cc ('k') | content/renderer/media/audio_input_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/audio_input_device.h
diff --git a/content/renderer/media/audio_input_device.h b/content/renderer/media/audio_input_device.h
index 56379fefb391a495a2b76a760637c46fcd61010b..ec7452559c409b20396392ac92bd7f2cb9e474ac 100644
--- a/content/renderer/media/audio_input_device.h
+++ b/content/renderer/media/audio_input_device.h
@@ -131,9 +131,8 @@ class CONTENT_EXPORT AudioInputDevice
void Start();
// Stops audio capturing. This method is synchronous/blocking.
- // Returns |true| on success.
// TODO(henrika): add support for notification when recording has stopped.
- bool Stop();
+ void Stop();
// Sets the capture volume scaling, with range [0.0, 1.0] inclusive.
// Returns |true| on success.
@@ -170,7 +169,7 @@ class CONTENT_EXPORT AudioInputDevice
// Method called on the audio thread ----------------------------------------
// Calls the client's callback for capturing audio.
- void FireCaptureCallback();
+ void FireCaptureCallback(int16* input_audio);
// DelegateSimpleThread::Delegate implementation.
virtual void Run() OVERRIDE;
@@ -195,11 +194,6 @@ class CONTENT_EXPORT AudioInputDevice
// Callbacks for capturing audio occur on this thread.
scoped_ptr<base::DelegateSimpleThread> audio_thread_;
- // IPC message stuff.
- base::SharedMemory* shared_memory() { return shared_memory_.get(); }
- base::SyncSocket* socket() { return socket_.get(); }
- void* shared_memory_data() { return shared_memory()->memory(); }
-
// Cached audio input message filter (lives on the main render thread).
scoped_refptr<AudioInputMessageFilter> filter_;
@@ -214,8 +208,9 @@ class CONTENT_EXPORT AudioInputDevice
// callback. Only modified on the IO thread.
bool pending_device_ready_;
- scoped_ptr<base::SharedMemory> shared_memory_;
- scoped_ptr<base::SyncSocket> socket_;
+ base::SharedMemoryHandle shared_memory_handle_;
+ base::SyncSocket::Handle socket_handle_;
+ int memory_length_;
DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice);
};
« no previous file with comments | « content/renderer/media/audio_device.cc ('k') | content/renderer/media/audio_input_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698