summaryrefslogtreecommitdiffstats
path: root/video/out/vo.h
diff options
context:
space:
mode:
authorRudolf Polzer <divverent@xonotic.org>2012-12-19 12:58:52 +0100
committerRudolf Polzer <divverent@xonotic.org>2012-12-19 12:58:52 +0100
commit7d0a20954f4ad642901a65fcb39ab601032ddcea (patch)
tree5699e70be76ec3f5ba2cc49faed378a3034601a7 /video/out/vo.h
parent51c98619c8d039b4cf459910a3a934637cb69e05 (diff)
downloadmpv-7d0a20954f4ad642901a65fcb39ab601032ddcea.tar.bz2
mpv-7d0a20954f4ad642901a65fcb39ab601032ddcea.tar.xz
core: make WAKEUP_PERIOD overridable by the vo
This is better than having just the operating system type decide the wakeup period, as e.g. when compiling for Win32/cygwin, a wakeup period of 0.5 would work perfectly fine. Instead, the default wakeup period is now only decided by availability of a working select() system call (which is the case on cygwin but not mingw and MSVC) AND a vo that can provide an event file descriptor or a similar hack (vo_corevideo). vos that cannot do either need polling for event handling and now can set the wakeup period to 0.02 in the vo code.
Diffstat (limited to 'video/out/vo.h')
-rw-r--r--video/out/vo.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/vo.h b/video/out/vo.h
index 22e4650bde..452d50d548 100644
--- a/video/out/vo.h
+++ b/video/out/vo.h
@@ -241,6 +241,7 @@ struct vo {
bool want_redraw; // visible frame wrong (window resize), needs refresh
bool redrawing; // between redrawing frame and flipping it
bool hasframe; // >= 1 frame has been drawn, so redraw is possible
+ double wakeup_period; // if > 0, this sets the maximum wakeup period for event polling
double flip_queue_offset; // queue flip events at most this much in advance