mkv: added new seek-implementation

Multimedia / VLC - Filip Roséen [videolabs.io] - 9 May 2016 08:09 UTC

since we require two different ways of seeking depending on DEMUX_SET_POSITION and DEMUX_SET_TIME has been recieved with precise seeking or not, we now have two different seek functions within matroska_segment_c.

The theory is quite simple:

- matroska_segment_c::FastSeek is for future use

- matroska_segment_c::Seek will find the lowest correct seekpoint for all our tracks combined, but set track.i_skip_until_fpos to the first block that needs to be decoded for a certain track.

This means that decoding will start at the right location for every track, without us having to worry about decoding too much data for tracks that does not require such.

353986b mkv: added new seek-implementation
modules/demux/mkv/matroska_segment.cpp | 53 ++++++++++++++++++++++++++++++--
modules/demux/mkv/matroska_segment.hpp | 5 +--
modules/demux/mkv/virtual_segment.cpp | 15 ++++++++-
3 files changed, 68 insertions(+), 5 deletions(-)

Upstream: git.videolan.org


  • Share