summaryrefslogtreecommitdiffstats
path: root/video/out/vo.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-14 00:03:32 +0200
committerwm4 <wm4@nowhere>2013-06-14 00:37:39 +0200
commit648c3d790a2e5123fdea0f02743058b59e85dd94 (patch)
tree86a23dc42467be861ed85c7b152178d3c3a45f19 /video/out/vo.h
parent297aad1f3b18f7cbf7afd646ca863e0e40857bcb (diff)
downloadmpv-648c3d790a2e5123fdea0f02743058b59e85dd94.tar.bz2
mpv-648c3d790a2e5123fdea0f02743058b59e85dd94.tar.xz
core: introduce separate VOCTRLs for screensaver stop/resume
This is slightly better because VOCTRL_RESUME/VOCTRL_PAUSE are usually needed by VOs to know whether video is actually being played (for whatever reason), and they wouldn't be passed to the backend's VOCTRL handler, like vo_x11_control(). Also try to make sure that these flags (both pause state and screensaver state) are set consistently in some corner cases. For example, it seems enabling video in the middle of playing a file while the player is paused would not set the paused flag. If codec initialization fails, destroy the VO instead of keeping it around to make sure the state is consistent. Framestepping is implemented by unpausing the player for the duration of a frame. Remove the special handling of VOCTRL_PAUSE/RESUME in these cases. It was most likely needed because these VOCTRLs used to be important for screen redrawing (blatant guess), which is now handled completely differently. The only potentially bad side-effect is that the screensaver will be disabled/reenabled for the duration of one frame.
Diffstat (limited to 'video/out/vo.h')
-rw-r--r--video/out/vo.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/vo.h b/video/out/vo.h
index 3dcc58b6c3..c1ab0eff8b 100644
--- a/video/out/vo.h
+++ b/video/out/vo.h
@@ -63,6 +63,9 @@ enum mp_voctrl {
VOCTRL_SET_CURSOR_VISIBILITY, // bool
+ VOCTRL_KILL_SCREENSAVER,
+ VOCTRL_RESTORE_SCREENSAVER,
+
VOCTRL_SET_DEINTERLACE,
VOCTRL_GET_DEINTERLACE,