summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-08-15 23:33:33 +0200
committerwm4 <wm4@nowhere>2014-08-15 23:33:33 +0200
commit543ba6c114303c8c3a71b37864f6d901c41808eb (patch)
tree3735649107f6df38de3adaf9081ecb672546c7a3 /options
parent22a95290126398c1f416dbadaf596ba79c872996 (diff)
downloadmpv-543ba6c114303c8c3a71b37864f6d901c41808eb.tar.bz2
mpv-543ba6c114303c8c3a71b37864f6d901c41808eb.tar.xz
video: add VO framedropping mode
This mostly uses the same idea as with vo_vdpau.c, but much simplified. On X11, it tries to get the display framerate with XF86VM, and limits the frequency of new video frames against it. Note that this is an old extension, and is confirmed not to work correctly with multi-monitor setups. But we're using it because it was already around (it is also used by vo_vdpau). This attempts to predict the next vsync event by using the time of the last frame and the display FPS. Even if that goes completely wrong, the results are still relatively good. On other systems, or if the X11 code doesn't return a display FPS, a framerate of 1000 is assumed. This is infinite for all practical purposes, and means that only frames which are definitely too late are dropped. This probably has worse results, but is still useful. "--framedrop=yes" is basically replaced with "--framedrop=decoder". The old framedropping mode is kept around, and should perhaps be improved. Dropping on the decoder level is still useful if decoding itself is too slow.
Diffstat (limited to 'options')
-rw-r--r--options/options.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/options/options.c b/options/options.c
index caf0171a7a..af294a7709 100644
--- a/options/options.c
+++ b/options/options.c
@@ -458,7 +458,9 @@ const m_option_t mp_opts[] = {
OPT_CHOICE("framedrop", frame_dropping, 0,
({"no", 0},
- {"yes", 1})),
+ {"vo", 1},
+ {"decoder", 2},
+ {"decoder+vo", 3})),
OPT_FLAG("untimed", untimed, M_OPT_FIXED),