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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Low-latency audio capturing unit utilizing audio input stream provided 5 // Low-latency audio capturing unit utilizing audio input stream provided
6 // by browser process through IPC. 6 // by browser process through IPC.
7 // 7 //
8 // Relationship of classes: 8 // Relationship of classes:
9 // 9 //
10 // AudioInputController AudioInputDevice 10 // AudioInputController AudioInputDevice
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 int32 stream_id_; 207 int32 stream_id_;
208 208
209 // The media session ID used to identify which input device to be started. 209 // The media session ID used to identify which input device to be started.
210 // Only modified on the IO thread. 210 // Only modified on the IO thread.
211 int session_id_; 211 int session_id_;
212 212
213 // State variable used to indicate it is waiting for a OnDeviceReady() 213 // State variable used to indicate it is waiting for a OnDeviceReady()
214 // callback. Only modified on the IO thread. 214 // callback. Only modified on the IO thread.
215 bool pending_device_ready_; 215 bool pending_device_ready_;
216 216
217 // WaitableEvent for signaling the audio thread that it should stop.
218 base::WaitableEvent audio_event_;
219
217 scoped_ptr<base::SharedMemory> shared_memory_; 220 scoped_ptr<base::SharedMemory> shared_memory_;
218 scoped_ptr<base::SyncSocket> socket_; 221 scoped_ptr<base::SyncSocket> socket_;
219 222
220 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice); 223 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice);
221 }; 224 };
222 225
223 #endif // CONTENT_RENDERER_MEDIA_AUDIO_INPUT_DEVICE_H_ 226 #endif // CONTENT_RENDERER_MEDIA_AUDIO_INPUT_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698