mpv/osdep
Avi Halachmi (:avih) 930b483a68 win32: Windows 10: timeBeginPeriod on demand
Before this commit, timeBeginPeriod(1) was set once when mpv starts,
and the timers remained hi-res till mpv exits.

Now we do the same as before on Windows version < 10.
On Windows 10+ we now use timeBeginPeriod if needed, per timeout.

To force a mode regardless of Windows version, set env MPV_HRT:
- "always":  the old behavior - hires timers as long as mpv runs.
- "perwait": sets 1ms timer resolution if timeout <= 50ms.
- "never":   don't use timeBeginPeriod at all.

It was observed that on Windows 10 we lose about 0.5ms accuracy of
timeouts with "perwait" mode (acceptable), but otherwise it works
well for continuous timeouts (one after the other) and random ones.

On Windows 7 with "perwait": continous timeouts are accurate, but
random timeouts (after some time without timeouts) have bad
accuracy - roughly 16ms resolution instead of the requested 1ms.

Windows 8 was not tested, so to err on the side of caution, we keep
the legacy behavior "always" by default.
2021-09-21 00:45:08 +10:00
..
android osdep: remove posix_spawn() helpers and wrappers 2020-05-15 16:37:41 +02:00
macos mac: fix dangling pointers 2021-01-13 16:23:47 +01:00
win32 win32: Windows 10: timeBeginPeriod on demand 2021-09-21 00:45:08 +10:00
atomic.h atomic: add atomic_exchange_explicit() fallback 2020-03-05 22:00:50 +01:00
compiler.h
endian.h
getpid.h
glob-win.c
io.c win32: scripting utils.get_env_list(): use UTF-8 2020-08-16 12:24:19 +03:00
io.h win32: scripting utils.get_env_list(): use UTF-8 2020-08-16 12:24:19 +03:00
macOS_swift_bridge.h
macosx_application.h mac: use visible frame rectangle for window geometry calculation 2020-12-19 21:37:55 +02:00
macosx_application.m mac: use visible frame rectangle for window geometry calculation 2020-12-19 21:37:55 +02:00
macosx_application_objc.h mac: fix media key support for libmpv users 2020-02-22 13:56:31 +01:00
macosx_compat.h
macosx_events.h
macosx_events.m mac: fix media key support for libmpv users 2020-02-22 13:56:31 +01:00
macosx_events_objc.h mac: fix media key support for libmpv users 2020-02-22 13:56:31 +01:00
macosx_menubar.h
macosx_menubar.m mac: add ability to toggle visibility on all workspaces from menubar 2021-02-21 13:38:53 +01:00
macosx_menubar_objc.h
macosx_touchbar.h mac: only update touch bar items when necessary 2021-02-13 15:51:32 +01:00
macosx_touchbar.m mac: only update touch bar items when necessary 2021-02-13 15:51:32 +01:00
macosx_versions.h
main-fn-cocoa.c
main-fn-unix.c
main-fn-win.c
main-fn.h
mpv.exe.manifest win32: request the UTF-8 code page for Windows APIs 2020-08-08 15:00:25 +03:00
mpv.rc build: change filenames of generated files 2020-06-04 16:59:05 +02:00
path-macosx.m
path-unix.c Revert "path: switch back to using non-XDG config dir by default" 2020-10-16 00:47:18 +03:00
path-uwp.c
path-win.c path: do not use old_home for win32 exe dir 2020-11-16 00:44:40 +02:00
path.h
polldev.c
polldev.h
semaphore.h
semaphore_osx.c
strnlen.h
subprocess-dummy.c command: extend subprocess command 2020-07-20 21:02:17 +02:00
subprocess-posix.c command: extend subprocess command stdin, change behavior 2020-08-16 02:54:44 +02:00
subprocess-win.c subprocess-win: update to mp_subprocess2 2020-07-20 21:02:17 +02:00
subprocess.c command: extend subprocess command 2020-07-20 21:02:17 +02:00
subprocess.h command: extend subprocess command stdin, change behavior 2020-08-16 02:54:44 +02:00
terminal-dummy.c osdep/terminal: Add function to get terminal pixel dimensions 2020-11-22 13:34:25 +02:00
terminal-unix.c terminal-unix: identify and ignore unknown CSI sequences 2021-08-19 15:39:42 +03:00
terminal-win.c osdep/terminal: Add function to get terminal pixel dimensions 2020-11-22 13:34:25 +02:00
terminal.h osdep/terminal: Add function to get terminal pixel dimensions 2020-11-22 13:34:25 +02:00
threads.c build: restore BSD thread names after 9f461b85bf 2020-04-23 13:58:16 +02:00
threads.h osdep: add a pthread debugging wrapper 2020-03-18 22:42:13 +01:00
timer-darwin.c
timer-linux.c
timer-win2.c win32: Windows 10: timeBeginPeriod on demand 2021-09-21 00:45:08 +10:00
timer.c
timer.h win32: Windows 10: timeBeginPeriod on demand 2021-09-21 00:45:08 +10:00
w32_keyboard.c
w32_keyboard.h
win32-console-wrapper.c
windows_utils.c subprocess-win: update to mp_subprocess2 2020-07-20 21:02:17 +02:00
windows_utils.h subprocess-win: update to mp_subprocess2 2020-07-20 21:02:17 +02:00