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

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

Issue 8587009: Add OVERRIDE to content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 1 month 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // Returns |true| on success. 141 // Returns |true| on success.
142 bool GetVolume(double* volume); 142 bool GetVolume(double* volume);
143 143
144 double sample_rate() const { return audio_parameters_.sample_rate; } 144 double sample_rate() const { return audio_parameters_.sample_rate; }
145 size_t buffer_size() const { return audio_parameters_.samples_per_packet; } 145 size_t buffer_size() const { return audio_parameters_.samples_per_packet; }
146 146
147 // Methods called on IO thread ---------------------------------------------- 147 // Methods called on IO thread ----------------------------------------------
148 // AudioInputMessageFilter::Delegate impl., called by AudioInputMessageFilter 148 // AudioInputMessageFilter::Delegate impl., called by AudioInputMessageFilter
149 virtual void OnLowLatencyCreated(base::SharedMemoryHandle handle, 149 virtual void OnLowLatencyCreated(base::SharedMemoryHandle handle,
150 base::SyncSocket::Handle socket_handle, 150 base::SyncSocket::Handle socket_handle,
151 uint32 length); 151 uint32 length) OVERRIDE;
152 virtual void OnVolume(double volume); 152 virtual void OnVolume(double volume) OVERRIDE;
153 virtual void OnStateChanged(AudioStreamState state); 153 virtual void OnStateChanged(AudioStreamState state) OVERRIDE;
154 virtual void OnDeviceReady(int index); 154 virtual void OnDeviceReady(int index) OVERRIDE;
155 155
156 private: 156 private:
157 // Methods called on IO thread ---------------------------------------------- 157 // Methods called on IO thread ----------------------------------------------
158 // The following methods are tasks posted on the IO thread that needs to 158 // The following methods are tasks posted on the IO thread that needs to
159 // be executed on that thread. They interact with AudioInputMessageFilter and 159 // be executed on that thread. They interact with AudioInputMessageFilter and
160 // sends IPC messages on that thread. 160 // sends IPC messages on that thread.
161 void InitializeOnIOThread(); 161 void InitializeOnIOThread();
162 void SetSessionIdOnIOThread(int session_id); 162 void SetSessionIdOnIOThread(int session_id);
163 void StartOnIOThread(); 163 void StartOnIOThread();
164 void ShutDownOnIOThread(base::WaitableEvent* completion); 164 void ShutDownOnIOThread(base::WaitableEvent* completion);
165 void SetVolumeOnIOThread(double volume); 165 void SetVolumeOnIOThread(double volume);
166 166
167 void Send(IPC::Message* message); 167 void Send(IPC::Message* message);
168 168
169 // Method called on the audio thread ---------------------------------------- 169 // Method called on the audio thread ----------------------------------------
170 // Calls the client's callback for capturing audio. 170 // Calls the client's callback for capturing audio.
171 void FireCaptureCallback(); 171 void FireCaptureCallback();
172 172
173 // DelegateSimpleThread::Delegate implementation. 173 // DelegateSimpleThread::Delegate implementation.
174 virtual void Run(); 174 virtual void Run() OVERRIDE;
175 175
176 // Format 176 // Format
177 AudioParameters audio_parameters_; 177 AudioParameters audio_parameters_;
178 178
179 CaptureCallback* callback_; 179 CaptureCallback* callback_;
180 CaptureEventHandler* event_handler_; 180 CaptureEventHandler* event_handler_;
181 181
182 // The client callback receives captured audio here. 182 // The client callback receives captured audio here.
183 std::vector<float*> audio_data_; 183 std::vector<float*> audio_data_;
184 184
(...skipping 27 matching lines...) Expand all
212 // callback. Only modified on the IO thread. 212 // callback. Only modified on the IO thread.
213 bool pending_device_ready_; 213 bool pending_device_ready_;
214 214
215 scoped_ptr<base::SharedMemory> shared_memory_; 215 scoped_ptr<base::SharedMemory> shared_memory_;
216 scoped_ptr<base::SyncSocket> socket_; 216 scoped_ptr<base::SyncSocket> socket_;
217 217
218 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice); 218 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice);
219 }; 219 };
220 220
221 #endif // CONTENT_RENDERER_MEDIA_AUDIO_INPUT_DEVICE_H_ 221 #endif // CONTENT_RENDERER_MEDIA_AUDIO_INPUT_DEVICE_H_
OLDNEW
« no previous file with comments | « content/renderer/media/audio_device.h ('k') | content/renderer/media/audio_input_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698