OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 // |
| 5 // The avrt namespace encapsulates the details needed to support MMCSS. |
| 6 // |
| 7 // The Multimedia Class Scheduler service (MMCSS) enables multimedia |
| 8 // applications to ensure that their time-sensitive processing receives |
| 9 // prioritized access to CPU resources. This service enables multimedia |
| 10 // applications to utilize as much of the CPU as possible without denying |
| 11 // CPU resources to lower-priority applications. |
| 12 // MMCSS requires Windows Vista or higher and that the Avrt DLL is loaded. |
| 13 // |
| 14 #ifndef MEDIA_AUDIO_WIN_AVRT_WRAPPER_WIN_H_ |
| 15 #define MEDIA_AUDIO_WIN_AVRT_WRAPPER_WIN_H_ |
| 16 |
| 17 #include <windows.h> |
| 18 #include <avrt.h> |
| 19 |
| 20 #include "base/basictypes.h" |
| 21 |
| 22 namespace avrt { |
| 23 |
| 24 // Loads the Avrt.dll which is available on Windows Vista and later. |
| 25 bool Initialize(); |
| 26 |
| 27 // Function wrappers for the underlying MMCSS functions. |
| 28 bool AvRevertMmThreadCharacteristics(HANDLE avrt_handle); |
| 29 HANDLE AvSetMmThreadCharacteristics(const wchar_t* task_name, |
| 30 DWORD* task_index); |
| 31 bool AvSetMmThreadPriority(HANDLE avrt_handle, AVRT_PRIORITY priority); |
| 32 |
| 33 } // namespace avrt |
| 34 |
| 35 #endif // MEDIA_AUDIO_WIN_AVRT_WRAPPER_WIN_H_ |
| 36 |
OLD | NEW |