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

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

Issue 10790121: First step towards moving AudioDevice from content/ to media/audio. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unnecessary #include Created 8 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // This method must be called before Start(). It will not have any effect 154 // This method must be called before Start(). It will not have any effect
155 // if it is called while capturing has already started. 155 // if it is called while capturing has already started.
156 void SetAutomaticGainControl(bool enabled); 156 void SetAutomaticGainControl(bool enabled);
157 157
158 // Methods called on IO thread ---------------------------------------------- 158 // Methods called on IO thread ----------------------------------------------
159 // AudioInputMessageFilter::Delegate impl., called by AudioInputMessageFilter. 159 // AudioInputMessageFilter::Delegate impl., called by AudioInputMessageFilter.
160 virtual void OnStreamCreated(base::SharedMemoryHandle handle, 160 virtual void OnStreamCreated(base::SharedMemoryHandle handle,
161 base::SyncSocket::Handle socket_handle, 161 base::SyncSocket::Handle socket_handle,
162 uint32 length) OVERRIDE; 162 uint32 length) OVERRIDE;
163 virtual void OnVolume(double volume) OVERRIDE; 163 virtual void OnVolume(double volume) OVERRIDE;
164 virtual void OnStateChanged(AudioStreamState state) OVERRIDE; 164 virtual void OnStateChanged(media::AudioStreamState state) OVERRIDE;
165 virtual void OnDeviceReady(const std::string& device_id) OVERRIDE; 165 virtual void OnDeviceReady(const std::string& device_id) OVERRIDE;
166 166
167 protected: 167 protected:
168 virtual ~AudioInputDevice(); 168 virtual ~AudioInputDevice();
169 169
170 private: 170 private:
171 friend class base::RefCountedThreadSafe<AudioInputDevice>; 171 friend class base::RefCountedThreadSafe<AudioInputDevice>;
172 172
173 // Methods called on IO thread ---------------------------------------------- 173 // Methods called on IO thread ----------------------------------------------
174 // The following methods are tasks posted on the IO thread that needs to 174 // The following methods are tasks posted on the IO thread that needs to
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 // In order to avoid a race between OnStreamCreated and Stop(), we use this 220 // In order to avoid a race between OnStreamCreated and Stop(), we use this
221 // guard to control stopping and starting the audio thread. 221 // guard to control stopping and starting the audio thread.
222 base::Lock audio_thread_lock_; 222 base::Lock audio_thread_lock_;
223 AudioDeviceThread audio_thread_; 223 AudioDeviceThread audio_thread_;
224 scoped_ptr<AudioInputDevice::AudioThreadCallback> audio_callback_; 224 scoped_ptr<AudioInputDevice::AudioThreadCallback> audio_callback_;
225 225
226 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice); 226 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice);
227 }; 227 };
228 228
229 #endif // CONTENT_RENDERER_MEDIA_AUDIO_INPUT_DEVICE_H_ 229 #endif // CONTENT_RENDERER_MEDIA_AUDIO_INPUT_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698