summaryrefslogtreecommitdiffstats
path: root/demux/demux.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-02-28 19:14:23 +0100
committerwm4 <wm4@nowhere>2016-02-28 19:28:34 +0100
commit92ba63079617f6579c276dd3ec54197b56378913 (patch)
treefff93c447a045a03cbc51ac4a0bac3a360220054 /demux/demux.h
parentb638a413c37e8c892fcf40ca4ae29693f4942d0c (diff)
downloadmpv-92ba63079617f6579c276dd3ec54197b56378913.tar.bz2
mpv-92ba63079617f6579c276dd3ec54197b56378913.tar.xz
demux: remove relative seeking
Ever since a change in mplayer2 or so, relative seeks were translated to absolute seeks before sending them to the demuxer in most cases. The only exception in current mpv is DVD seeking. Remove the SEEK_ABSOLUTE flag; it's not the implied default. SEEK_FACTOR is kept, because it's sometimes slightly useful for seeking in things like transport streams. (And maybe mkv files without duration set?) DVD seeking is terrible because DVD and libdvdnav are terrible, but mostly because libdvdnav is terrible. libdvdnav does not expose seeking with seek tables. (Although I know xbmc/kodi use an undocumented API that is not declared in the headers by dladdr()ing it - I think the function is dvdnav_jump_to_sector_by_time().) With the current mpv policy if not giving a shit about DVD, just revert our half-working seek hacks and always use dvdnav_time_search(). Relative seeking might get stuck sometimes; in this case --hr-seek=always is recommended.
Diffstat (limited to 'demux/demux.h')
-rw-r--r--demux/demux.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/demux/demux.h b/demux/demux.h
index 05e645f728..e882e90da8 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -57,7 +57,6 @@ struct demux_ctrl_stream_ctrl {
int res;
};
-#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
@@ -179,9 +178,6 @@ 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;
// Enable fast track switching hacks. This requires from the demuxer:
// - seeking is somewhat reliable; packet contents must not change
// - packet position (demux_packet.pos) is set, not negative, unique, and