path: root/etc
diff options
authorwm4 <wm4@nowhere>2013-04-24 19:31:48 +0200
committerwm4 <wm4@nowhere>2013-04-24 20:27:12 +0200
commitff549a2f6ade72ee9af42e911139bbee41daee5a (patch)
treea495c7a77679c306ef1def02a510b21562880fd3 /etc
parent40f822782d036d206a95b8447b709ea2a65b151e (diff)
core: add backstep support
Allows stepping back one frame via the frame_back_step inout command, bound to "," by default. This uses the precise seeking facility, and a perfect frame index built on the fly. The index is built during playback and precise seeking, and contains (as of this commit) the last 100 displayed or skipped frames. This index is used to find the PTS of the previous frame, which is then used as target for a precise seek. If no PTS is found, the core attempts to do a seek before the current frame, and skip decoded frames until the current frame is reached; this will create a sufficient index and the normal backstep algorithm can be applied. This can be rather slow. The worst case for backstepping is about the same as the worst case for precise seeking if the previous frame can be deduced from the index. If not, the worst case will be twice as slow. There's also some minor danger that the index is incorrect in case framedropping is involved. For framedropping due to --framedrop, this problem is ignored (use of --framedrop is discouraged anyway). For framedropping during precise seeking (done to make it faster), we try to not add frames to the index that are produced when this can happen. I'm not sure how well that works (or if the logic is sane), and it's sure to break with some video filters. In the worst case, backstepping might silently skip frames if you backstep after a user-initiated precise seek. (Precise seeks to do indexing are not affected.) Likewise, video filters that somehow change timing of frames and do not do this in a deterministic way (i.e. if you seek to a position, frames with different timings are produced than when the position is reached during normal playback) will make backstepping silently jump to the wrong frame. Enabling/disabling filters during playback (like for example deinterlacing) will have similar bad effects.
Diffstat (limited to 'etc')
1 files changed, 1 insertions, 0 deletions
diff --git a/etc/input.conf b/etc/input.conf
index 8623a239d9..300f20c307 100644
--- a/etc/input.conf
+++ b/etc/input.conf
@@ -60,6 +60,7 @@ q {encode} quit
ESC quit
p cycle pause # toggle pause/playback mode
. frame_step # advance one frame and pause
+, frame_back_step # go back by one frame and pause
SPACE cycle pause
> playlist_next # skip to next file
ENTER playlist_next force # skip to next file or quit