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

Side by Side Diff: content/renderer/media/audio_input_device.h

Issue 9317001: Revert 119769 - Switch AudioDevice classes from SyncSocket to CancelableSyncSocket. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1025/src/
Patch Set: Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 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
11 // ^ ^ 11 // ^ ^
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 private: 157 private:
158 // Methods called on IO thread ---------------------------------------------- 158 // Methods called on IO thread ----------------------------------------------
159 // The following methods are tasks posted on the IO thread that needs to 159 // The following methods are tasks posted on the IO thread that needs to
160 // be executed on that thread. They interact with AudioInputMessageFilter and 160 // be executed on that thread. They interact with AudioInputMessageFilter and
161 // sends IPC messages on that thread. 161 // sends IPC messages on that thread.
162 void InitializeOnIOThread(); 162 void InitializeOnIOThread();
163 void SetSessionIdOnIOThread(int session_id); 163 void SetSessionIdOnIOThread(int session_id);
164 void StartOnIOThread(); 164 void StartOnIOThread();
165 void ShutDownOnIOThread(base::WaitableEvent* completion); 165 void ShutDownOnIOThread(base::WaitableEvent* completion);
166 void SetVolumeOnIOThread(double volume); 166 void SetVolumeOnIOThread(double volume);
167 // Closes socket and joins with the audio thread.
168 void ShutDownAudioThread();
169 167
170 void Send(IPC::Message* message); 168 void Send(IPC::Message* message);
171 169
172 // Method called on the audio thread ---------------------------------------- 170 // Method called on the audio thread ----------------------------------------
173 // Calls the client's callback for capturing audio. 171 // Calls the client's callback for capturing audio.
174 void FireCaptureCallback(int16* input_audio); 172 void FireCaptureCallback(int16* input_audio);
175 173
176 // DelegateSimpleThread::Delegate implementation. 174 // DelegateSimpleThread::Delegate implementation.
177 virtual void Run() OVERRIDE; 175 virtual void Run() OVERRIDE;
178 176
(...skipping 25 matching lines...) Expand all
204 202
205 // The media session ID used to identify which input device to be started. 203 // The media session ID used to identify which input device to be started.
206 // Only modified on the IO thread. 204 // Only modified on the IO thread.
207 int session_id_; 205 int session_id_;
208 206
209 // State variable used to indicate it is waiting for a OnDeviceReady() 207 // State variable used to indicate it is waiting for a OnDeviceReady()
210 // callback. Only modified on the IO thread. 208 // callback. Only modified on the IO thread.
211 bool pending_device_ready_; 209 bool pending_device_ready_;
212 210
213 base::SharedMemoryHandle shared_memory_handle_; 211 base::SharedMemoryHandle shared_memory_handle_;
214 scoped_ptr<base::CancelableSyncSocket> audio_socket_; 212 base::SyncSocket::Handle socket_handle_;
215 int memory_length_; 213 int memory_length_;
216 214
217 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice); 215 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice);
218 }; 216 };
219 217
220 #endif // CONTENT_RENDERER_MEDIA_AUDIO_INPUT_DEVICE_H_ 218 #endif // CONTENT_RENDERER_MEDIA_AUDIO_INPUT_DEVICE_H_
OLDNEW
« 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