| OLD | NEW |
| 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 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ |
| 6 #define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ | 6 #define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // AudioInputStream will be capturing audio currently being played on the | 45 // AudioInputStream will be capturing audio currently being played on the |
| 46 // default playback device. At the moment this feature is supported only on | 46 // default playback device. At the moment this feature is supported only on |
| 47 // some platforms. AudioInputStream::Intialize() will return an error on | 47 // some platforms. AudioInputStream::Intialize() will return an error on |
| 48 // platforms that don't support it. GetInputStreamParameters() must be used | 48 // platforms that don't support it. GetInputStreamParameters() must be used |
| 49 // to get the parameters of the loopback device before creating a loopback | 49 // to get the parameters of the loopback device before creating a loopback |
| 50 // stream, otherwise stream initialization may fail. | 50 // stream, otherwise stream initialization may fail. |
| 51 static const char kLoopbackInputDeviceId[]; | 51 static const char kLoopbackInputDeviceId[]; |
| 52 | 52 |
| 53 virtual ~AudioManagerBase(); | 53 virtual ~AudioManagerBase(); |
| 54 | 54 |
| 55 virtual scoped_refptr<base::MessageLoopProxy> GetMessageLoop() OVERRIDE; | 55 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() OVERRIDE; |
| 56 virtual scoped_refptr<base::MessageLoopProxy> GetWorkerLoop() OVERRIDE; | 56 virtual scoped_refptr<base::SingleThreadTaskRunner> GetWorkerTaskRunner() |
| 57 OVERRIDE; |
| 57 | 58 |
| 58 virtual string16 GetAudioInputDeviceModel() OVERRIDE; | 59 virtual string16 GetAudioInputDeviceModel() OVERRIDE; |
| 59 | 60 |
| 60 virtual void ShowAudioInputSettings() OVERRIDE; | 61 virtual void ShowAudioInputSettings() OVERRIDE; |
| 61 | 62 |
| 62 virtual void GetAudioInputDeviceNames( | 63 virtual void GetAudioInputDeviceNames( |
| 63 AudioDeviceNames* device_names) OVERRIDE; | 64 AudioDeviceNames* device_names) OVERRIDE; |
| 64 | 65 |
| 65 virtual void GetAudioOutputDeviceNames( | 66 virtual void GetAudioOutputDeviceNames( |
| 66 AudioDeviceNames* device_names) OVERRIDE; | 67 AudioDeviceNames* device_names) OVERRIDE; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 // Number of currently open input streams. | 181 // Number of currently open input streams. |
| 181 int num_input_streams_; | 182 int num_input_streams_; |
| 182 | 183 |
| 183 // Track output state change listeners. | 184 // Track output state change listeners. |
| 184 ObserverList<AudioDeviceListener> output_listeners_; | 185 ObserverList<AudioDeviceListener> output_listeners_; |
| 185 | 186 |
| 186 // Thread used to interact with audio streams created by this audio manager. | 187 // Thread used to interact with audio streams created by this audio manager. |
| 187 scoped_ptr<base::Thread> audio_thread_; | 188 scoped_ptr<base::Thread> audio_thread_; |
| 188 mutable base::Lock audio_thread_lock_; | 189 mutable base::Lock audio_thread_lock_; |
| 189 | 190 |
| 190 // The message loop of the audio thread this object runs on. Used for internal | 191 // The task runner of the audio thread this object runs on. Used for internal |
| 191 // tasks which run on the audio thread even after Shutdown() has been started | 192 // tasks which run on the audio thread even after Shutdown() has been started |
| 192 // and GetMessageLoop() starts returning NULL. | 193 // and GetMessageLoop() starts returning NULL. |
| 193 scoped_refptr<base::MessageLoopProxy> message_loop_; | 194 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 194 | 195 |
| 195 // Map of cached AudioOutputDispatcher instances. Must only be touched | 196 // Map of cached AudioOutputDispatcher instances. Must only be touched |
| 196 // from the audio thread (no locking). | 197 // from the audio thread (no locking). |
| 197 AudioOutputDispatchers output_dispatchers_; | 198 AudioOutputDispatchers output_dispatchers_; |
| 198 | 199 |
| 199 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); | 200 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); |
| 200 }; | 201 }; |
| 201 | 202 |
| 202 } // namespace media | 203 } // namespace media |
| 203 | 204 |
| 204 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ | 205 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ |
| OLD | NEW |