summaryrefslogtreecommitdiffstats
path: root/demux/demux.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-01-29 13:51:47 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-01-30 03:10:27 -0800
commiteaced0ebb03a078394ed01bcbe641b5b7a4312aa (patch)
tree265322debf482f8f8e3416718c0d77b176882dd9 /demux/demux.h
parent1d5991ef306f5a0306f79ba99ae5a919357b18ff (diff)
downloadmpv-eaced0ebb03a078394ed01bcbe641b5b7a4312aa.tar.bz2
mpv-eaced0ebb03a078394ed01bcbe641b5b7a4312aa.tar.xz
demux: add a per stream wakeup callback
This is supposed to help making data flow easier and wakeup handling more efficient. Once that change is done, reading a packet on any stream won't have to wakeup and poll all decoders (which helps reducing the mess even if all decoders are on the same thread). This also improves the accuracy of wakeups by tracking better whether a wakeup is needed.
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 be6c336a95..b3088db8c4 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -255,6 +255,8 @@ struct demux_packet *demux_read_packet(struct sh_stream *sh);
int demux_read_packet_async(struct sh_stream *sh, struct demux_packet **out_pkt);
bool demux_stream_is_selected(struct sh_stream *stream);
bool demux_has_packet(struct sh_stream *sh);
+void demux_set_stream_wakeup_cb(struct sh_stream *sh,
+ void (*cb)(void *ctx), void *ctx);
struct demux_packet *demux_read_any_packet(struct demuxer *demuxer);
struct sh_stream *demux_get_stream(struct demuxer *demuxer, int index);