| 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> |
| 11 #include <utility> | 11 #include <utility> |
| 12 | 12 |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/scoped_vector.h" | |
| 16 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
| 17 #include "base/threading/thread.h" | 16 #include "base/threading/thread.h" |
| 18 #include "build/build_config.h" | 17 #include "build/build_config.h" |
| 19 #include "media/audio/audio_debug_recording_manager.h" | 18 #include "media/audio/audio_debug_recording_manager.h" |
| 20 #include "media/audio/audio_device_name.h" | 19 #include "media/audio/audio_device_name.h" |
| 21 #include "media/audio/audio_manager.h" | 20 #include "media/audio/audio_manager.h" |
| 22 #include "media/audio/audio_output_dispatcher.h" | 21 #include "media/audio/audio_output_dispatcher.h" |
| 23 | 22 |
| 24 #if defined(OS_WIN) | 23 #if defined(OS_WIN) |
| 25 #include "base/win/scoped_com_initializer.h" | 24 #include "base/win/scoped_com_initializer.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 158 |
| 160 virtual std::unique_ptr<AudioDebugRecordingManager> | 159 virtual std::unique_ptr<AudioDebugRecordingManager> |
| 161 CreateAudioDebugRecordingManager( | 160 CreateAudioDebugRecordingManager( |
| 162 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 161 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| 163 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner); | 162 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner); |
| 164 | 163 |
| 165 private: | 164 private: |
| 166 FRIEND_TEST_ALL_PREFIXES(AudioManagerTest, AudioDebugRecording); | 165 FRIEND_TEST_ALL_PREFIXES(AudioManagerTest, AudioDebugRecording); |
| 167 | 166 |
| 168 struct DispatcherParams; | 167 struct DispatcherParams; |
| 169 typedef ScopedVector<DispatcherParams> AudioOutputDispatchers; | 168 typedef std::vector<std::unique_ptr<DispatcherParams>> AudioOutputDispatchers; |
| 170 | 169 |
| 171 class CompareByParams; | 170 class CompareByParams; |
| 172 | 171 |
| 173 // AudioManager: | 172 // AudioManager: |
| 174 void InitializeOutputDebugRecording( | 173 void InitializeOutputDebugRecording( |
| 175 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner) final; | 174 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner) final; |
| 176 | 175 |
| 177 // These functions assign group ids to devices based on their device ids. | 176 // These functions assign group ids to devices based on their device ids. |
| 178 // The default implementation is an attempt to do this based on | 177 // The default implementation is an attempt to do this based on |
| 179 // GetAssociatedOutputDeviceID. Must be called on the audio worker thread | 178 // GetAssociatedOutputDeviceID. Must be called on the audio worker thread |
| (...skipping 26 matching lines...) Expand all Loading... |
| 206 | 205 |
| 207 // Debug recording manager. | 206 // Debug recording manager. |
| 208 std::unique_ptr<AudioDebugRecordingManager> debug_recording_manager_; | 207 std::unique_ptr<AudioDebugRecordingManager> debug_recording_manager_; |
| 209 | 208 |
| 210 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); | 209 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); |
| 211 }; | 210 }; |
| 212 | 211 |
| 213 } // namespace media | 212 } // namespace media |
| 214 | 213 |
| 215 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ | 214 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ |
| OLD | NEW |