1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-27 09:32:40 +00:00
mpv/player
wm4 17ec073a15 player: handle seek delays differently
The code removed from handle_input_and_seek_coalesce() did two things:

1. If there's a queued seek, stop accepting non-seek commands, and delay
   them to the next playloop iteration.
2. If a seek is executing (i.e. the seek was unqueued, and now it's
   trying to decode and display the first video frame), stop accepting
   seek commands (and in fact all commands that were queued after the
   first seek command). This logic is disabled if seeking started longer
   than 300ms ago. (To avoid starvation.)

I'm not sure why 1. would be needed. It's still possible that a command
immediately executed after a seek command sees a "seeking in progress"
state, because it affects queued seeks only, and not seeks in progress.
Drop this code, since it can easily lead to input starvation, and I'm
not aware of any disadvantages.

The logic in 2. is good to make seeking behave much better, as it
guarantees that the video display is updated frequently. Keep the core
idea, but implement it differently. Now this logic is applied to seeks
only. Commands after the seek can execute freely, and like with 1., I
don't see a reason why they couldn't. However, in some cases, seeks are
supposed to be executed instantly, so queue_seek() needs an additional
parameter to signal the need for immediate update.

One nice thing is that commands like sub_seek automatically profit from
the seek delay logic. On the other hand, hitting chapter seek multiple
times still does not update the video on chapter boundaries (as it
should be).

Note that the main goal of this commit is actually simplification of the
input processing logic and to allow all commands to be executed
immediately.
2014-02-07 22:29:50 +01:00
..
lua lua: use core log level names 2014-01-16 23:06:41 +01:00
timeline stream: mp_msg conversions 2013-12-21 21:43:16 +01:00
audio.c Fix audio delay inversion 2014-01-06 18:40:31 +01:00
command.c player: handle seek delays differently 2014-02-07 22:29:50 +01:00
command.h lua: add playback-start event 2014-01-20 19:31:23 +01:00
configfiles.c player: load encoding-profiles.conf before the main config 2014-01-01 19:25:52 +01:00
core.h player: handle seek delays differently 2014-02-07 22:29:50 +01:00
dvdnav.c sub: uglify OSD code path with locking 2014-01-18 01:27:43 +01:00
loadfile.c player: handle seek delays differently 2014-02-07 22:29:50 +01:00
lua.c lua: allow ~ path convention for --lua 2014-01-21 21:23:42 +01:00
lua.h Rename mp_lua.c/h to lua.c/h 2013-12-17 01:15:48 +01:00
main.c w32: use safe DLL search paths everywhere 2014-01-27 10:04:29 +01:00
misc.c player: redo terminal OSD and status line handling 2014-01-13 20:08:13 +01:00
osd.c sub: uglify OSD code path with locking 2014-01-18 01:27:43 +01:00
playloop.c player: handle seek delays differently 2014-02-07 22:29:50 +01:00
screenshot.c sub: uglify OSD code path with locking 2014-01-18 01:27:43 +01:00
screenshot.h
sub.c sub: uglify OSD code path with locking 2014-01-18 01:27:43 +01:00
video.c player: handle seek delays differently 2014-02-07 22:29:50 +01:00