Skip to content

Draft: core: add Previous Frame

Thomas Guillem requested to merge tguillem/vlc:prev-frame into master

As requested by @jbk during the tech meeting in FODSEM, here is the simple and "I don't care if you burn CPU and IO" approach 🔥🔥🔥.

When the previous-frame is requested, the input seek back and tell the vout to discard all pictures (except the previous one) until it reach the current displayed one. In that case, it will then display the picture just before. In case of failure (the first picture is after the displayed one), it will send a callback to the input that will try to seek again.

See the new debug log when using Previous Frame:

[00005605af07a420] main input debug: 'previous-frame' took 1 seek requests and 24649 us

Here is a small benchmark when playing only local files:

  • 4K60fps.mp4: between 50ms and 400ms
  • 720p.mp4: 30ms
  • 4K60fps.mkv: between 200ms and 1second !

The request duration is totally depending on the input type.

TODO:

  • Fix the video blocked after more than 2 previous frame request and a resume (not systematic).
  • Implement seek strategy using POSITION (if TIME is not available)

Merge request reports