summaryrefslogtreecommitdiffstats
path: root/demux/demux.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-02-29 20:06:40 +0100
committerwm4 <wm4@nowhere>2020-02-29 21:49:00 +0100
commitc79619f11065bd630b05c191745bf54becd4c3b9 (patch)
tree955f13e3ba9a9e18878aacbac113422942f995eb /demux/demux.h
parent8fc2bc142211188344ebd73943133b9cb17d4431 (diff)
downloadmpv-c79619f11065bd630b05c191745bf54becd4c3b9.tar.bz2
mpv-c79619f11065bd630b05c191745bf54becd4c3b9.tar.xz
demux: add a way to block reading after seeks
Preparation for a future commit. The demuxer queues might be read from other threads than the one to issue the seek, and passing SEEK_BLOCK with such a seek will provide a convenient way to synchronize this.
Diffstat (limited to 'demux/demux.h')
-rw-r--r--demux/demux.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/demux/demux.h b/demux/demux.h
index 263b584ad3..f49e6e2a2f 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -63,6 +63,8 @@ struct demux_reader_state {
#define SEEK_SATAN (1 << 4) // enable backward demuxing
#define SEEK_HR (1 << 5) // hr-seek (this is a weak hint only)
#define SEEK_FORCE (1 << 6) // ignore unseekable flag
+#define SEEK_BLOCK (1 << 7) // upon successfully queued seek, block readers
+ // (simplifies syncing multiple reader threads)
// Strictness of the demuxer open format check.
// demux.c will try by default: NORMAL, UNSAFE (in this order)