diff options
author | wm4 <wm4@nowhere> | 2015-11-01 20:45:53 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-11-01 20:50:41 +0100 |
commit | 9de8730dc926be1a2875117a05d5f3005dbaf39a (patch) | |
tree | b93a40f74f8d198d9239a7d9cbf0d204456ccec6 /video | |
parent | 30a61064773e4fcb4c20a90787af95bc7d0e6d12 (diff) |
vo_opengl: win32: always request MMCSS for DWM
Quoting MSDN: "Notifies the Desktop Window Manager (DWM) to opt in to or
out of Multimedia Class Schedule Service (MMCSS) scheduling while the
calling process is alive.". Whatever this means. (An application can
change the scheduling priority of the window manager?)
Does this improve anything? I have no idea. Certainly this is a program
that does multimedia and graphics, so we seem to be a good match for
this.
Is it bad if we enable this even while playback is inactive or paused? I
have no idea either.
Is there a magic cargo cult function that will mark our renderer thread
as multimedia thing? I have no idea. (We use a function to enable MMCSS
for our audio thread in ao_wasapi.)
Diffstat (limited to 'video')
-rw-r--r-- | video/out/opengl/w32.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/video/out/opengl/w32.c b/video/out/opengl/w32.c index 8365a3933c..fc789619c8 100644 --- a/video/out/opengl/w32.c +++ b/video/out/opengl/w32.c @@ -262,6 +262,8 @@ static int w32_init(struct MPGLContext *ctx, int flags) current_w32_context = w32_ctx; wglMakeCurrent(w32_ctx->hdc, w32_ctx->context); + if (w32_ctx->pDwmEnableMMCSS) + w32_ctx->pDwmEnableMMCSS(TRUE); return 0; fail: @@ -295,6 +297,9 @@ static void w32_uninit(MPGLContext *ctx) wglMakeCurrent(w32_ctx->hdc, 0); vo_w32_run_on_thread(ctx->vo, destroy_gl, ctx); + if (w32_ctx->pDwmEnableMMCSS) + w32_ctx->pDwmEnableMMCSS(FALSE); + if (w32_ctx->dwmapi_dll) FreeLibrary(w32_ctx->dwmapi_dll); w32_ctx->dwmapi_dll = NULL; |