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 <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <unordered_set> | 10 #include <unordered_set> |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // Appends a list of available output devices to |device_names|, | 145 // Appends a list of available output devices to |device_names|, |
146 // which must initially be empty. | 146 // which must initially be empty. |
147 virtual void GetAudioOutputDeviceNames(AudioDeviceNames* device_names); | 147 virtual void GetAudioOutputDeviceNames(AudioDeviceNames* device_names); |
148 | 148 |
149 // Returns the ID of the default audio output device. | 149 // Returns the ID of the default audio output device. |
150 // Implementations that don't yet support this should return an empty string. | 150 // Implementations that don't yet support this should return an empty string. |
151 virtual std::string GetDefaultOutputDeviceID(); | 151 virtual std::string GetDefaultOutputDeviceID(); |
152 | 152 |
153 virtual std::unique_ptr<AudioDebugRecordingManager> | 153 virtual std::unique_ptr<AudioDebugRecordingManager> |
154 CreateAudioDebugRecordingManager( | 154 CreateAudioDebugRecordingManager( |
155 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 155 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
156 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner); | |
157 | 156 |
158 private: | 157 private: |
159 FRIEND_TEST_ALL_PREFIXES(AudioManagerTest, AudioDebugRecording); | 158 FRIEND_TEST_ALL_PREFIXES(AudioManagerTest, AudioDebugRecording); |
160 | 159 |
161 struct DispatcherParams; | 160 struct DispatcherParams; |
162 typedef std::vector<std::unique_ptr<DispatcherParams>> AudioOutputDispatchers; | 161 typedef std::vector<std::unique_ptr<DispatcherParams>> AudioOutputDispatchers; |
163 | 162 |
164 class CompareByParams; | 163 class CompareByParams; |
165 | 164 |
166 // AudioManager: | 165 // AudioManager: |
167 void InitializeOutputDebugRecording( | 166 void InitializeOutputDebugRecording() final; |
168 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner) final; | |
169 | 167 |
170 // These functions assign group ids to devices based on their device ids. | 168 // These functions assign group ids to devices based on their device ids. |
171 // The default implementation is an attempt to do this based on | 169 // The default implementation is an attempt to do this based on |
172 // GetAssociatedOutputDeviceID. Must be called on the audio worker thread | 170 // GetAssociatedOutputDeviceID. Must be called on the audio worker thread |
173 // (see GetTaskRunner()). | 171 // (see GetTaskRunner()). |
174 std::string GetGroupIDOutput(const std::string& output_device_id); | 172 std::string GetGroupIDOutput(const std::string& output_device_id); |
175 std::string GetGroupIDInput(const std::string& input_device_id); | 173 std::string GetGroupIDInput(const std::string& input_device_id); |
176 | 174 |
177 // Max number of open output streams, modified by | 175 // Max number of open output streams, modified by |
178 // SetMaxOutputStreamsAllowed(). | 176 // SetMaxOutputStreamsAllowed(). |
(...skipping 20 matching lines...) Expand all Loading... |
199 | 197 |
200 // Debug recording manager. | 198 // Debug recording manager. |
201 std::unique_ptr<AudioDebugRecordingManager> debug_recording_manager_; | 199 std::unique_ptr<AudioDebugRecordingManager> debug_recording_manager_; |
202 | 200 |
203 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); | 201 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); |
204 }; | 202 }; |
205 | 203 |
206 } // namespace media | 204 } // namespace media |
207 | 205 |
208 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ | 206 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ |
OLD | NEW |