diff options
author | wm4 <wm4@nowhere> | 2015-01-19 20:45:31 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-19 21:26:48 +0100 |
commit | 966f0a41a4182cf4027a5d49b248a26ff49368f3 (patch) | |
tree | c1c004fdb38ff443b16b44a3f505ddbd81b55f1e /demux/demux.h | |
parent | e972ff4857d6b7f6cd8240e199185fca39d5ea47 (diff) | |
download | mpv-966f0a41a4182cf4027a5d49b248a26ff49368f3.tar.bz2 mpv-966f0a41a4182cf4027a5d49b248a26ff49368f3.tar.xz |
demux_disc: pass seek flags to stream layer
Pass through the seek flags to the stream layer. The STREAM_CTRL
semantics become a bit awkward, but that's still the least awkward
part about optical disc media.
Make demux_disc.c request relative seeks. Now the player will use
relative seeks if the user sends relative seek commands, and the
demuxer announces it wants these by setting rel_seeks to true. This
change probably changes seek behavior for dvd, dvdnav, bluray, cdda,
and possibly makes seeking useless if the demuxer-cache is set to
a high value.
Will be used in the next commit. (Split to make reverting the next
commit easier.)
Diffstat (limited to 'demux/demux.h')
-rw-r--r-- | demux/demux.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/demux/demux.h b/demux/demux.h index ca96d60732..b53a30c805 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -71,11 +71,12 @@ struct demux_ctrl_stream_ctrl { int res; }; -#define SEEK_ABSOLUTE (1 << 0) -#define SEEK_FACTOR (1 << 1) -#define SEEK_FORWARD (1 << 2) -#define SEEK_BACKWARD (1 << 3) -#define SEEK_SUBPREROLL (1 << 4) +#define SEEK_ABSOLUTE (1 << 0) // argument is a timestamp +#define SEEK_FACTOR (1 << 1) // argument is in range [0,1] +#define SEEK_FORWARD (1 << 2) // prefer later time if not exact +#define SEEK_BACKWARD (1 << 3) // prefer earlier time if not exact +#define SEEK_SUBPREROLL (1 << 4) // try to get more subtitle packets +#define SEEK_HR (1 << 5) // hr-seek (this is a weak hint only) // Strictness of the demuxer open format check. // demux.c will try by default: NORMAL, UNSAFE (in this order) @@ -188,6 +189,9 @@ typedef struct demuxer { double start_time; // File format allows PTS resets (even if the current file is without) bool ts_resets_possible; + // Send relative seek requests, instead of SEEK_ABSOLUTE or SEEK_FACTOR. + // This is only done if the user explicitly uses a relative seek. + bool rel_seeks; // Bitmask of DEMUX_EVENT_* int events; |