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_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_H_ |
6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_ | 6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 // runner to ensure the audio thread is not stuck for more than 60 seconds; if | 55 // runner to ensure the audio thread is not stuck for more than 60 seconds; if |
56 // a hang is detected, the process will be crashed. See EnableHangMonitor(). | 56 // a hang is detected, the process will be crashed. See EnableHangMonitor(). |
57 static AudioManager* CreateWithHangTimer( | 57 static AudioManager* CreateWithHangTimer( |
58 AudioLogFactory* audio_log_factory, | 58 AudioLogFactory* audio_log_factory, |
59 const scoped_refptr<base::SingleThreadTaskRunner>& monitor_task_runner); | 59 const scoped_refptr<base::SingleThreadTaskRunner>& monitor_task_runner); |
60 | 60 |
61 // Similar to Create() except uses a FakeAudioLogFactory for testing. | 61 // Similar to Create() except uses a FakeAudioLogFactory for testing. |
62 static AudioManager* CreateForTesting(); | 62 static AudioManager* CreateForTesting(); |
63 | 63 |
64 // Enables non-crash dumps when audio thread hangs are detected. | 64 // Enables non-crash dumps when audio thread hangs are detected. |
65 // TODO(dalecurtis): There are no callers to this function at present. A list | |
66 // of bad drivers has been given to Microsoft. This should be re-enabled in | |
67 // the future if Microsoft is able to triage third party drivers. | |
xhwang
2016/01/05 22:10:31
add a link to the bug?
DaleCurtis
2016/01/05 23:03:35
Done.
| |
65 static void EnableCrashKeyLoggingForAudioThreadHangs(); | 68 static void EnableCrashKeyLoggingForAudioThreadHangs(); |
66 | 69 |
67 #if defined(OS_LINUX) | 70 #if defined(OS_LINUX) |
68 // Sets the name of the audio source as seen by external apps. Only actually | 71 // Sets the name of the audio source as seen by external apps. Only actually |
69 // used with PulseAudio as of this writing. | 72 // used with PulseAudio as of this writing. |
70 static void SetGlobalAppName(const std::string& app_name); | 73 static void SetGlobalAppName(const std::string& app_name); |
71 | 74 |
72 // Returns the app name or an empty string if it is not set. | 75 // Returns the app name or an empty string if it is not set. |
73 static const std::string& GetGlobalAppName(); | 76 static const std::string& GetGlobalAppName(); |
74 #endif | 77 #endif |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
228 protected: | 231 protected: |
229 AudioManager(); | 232 AudioManager(); |
230 | 233 |
231 private: | 234 private: |
232 DISALLOW_COPY_AND_ASSIGN(AudioManager); | 235 DISALLOW_COPY_AND_ASSIGN(AudioManager); |
233 }; | 236 }; |
234 | 237 |
235 } // namespace media | 238 } // namespace media |
236 | 239 |
237 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ | 240 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ |
OLD | NEW |