summaryrefslogtreecommitdiffstats
path: root/demux/stheader.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-14 19:19:35 +0200
committerwm4 <wm4@nowhere>2013-04-20 23:28:24 +0200
commit654c34f77166d24914d3ff0a2923c128d846430d (patch)
tree8b0cde907cfe3e55a0ecbe86256703582d671d21 /demux/stheader.h
parent06eee1b6751c43189efd994fa296c9753a89b89c (diff)
downloadmpv-654c34f77166d24914d3ff0a2923c128d846430d.tar.bz2
mpv-654c34f77166d24914d3ff0a2923c128d846430d.tar.xz
demux: add functions to simplify demuxers
Some preparations to simplify demux_mkv and demux_lavf. struct demux_stream manages state for each stream type that is being demuxed (audio/video/sub). demux_stream is rather annoying, especially the id and sh members, which are often used by the demuxers to determine current stream and so on. Demuxers don't really have to access this, except for testing whether a stream is selected and to add packets. Add a new_sh_stream(), which allows creating streams without having the caller specify any kind of stream ID. Demuxers should just use sh_stream pointers, instead of multiple kinds of IDs and indexes.
Diffstat (limited to 'demux/stheader.h')
-rw-r--r--demux/stheader.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/demux/stheader.h b/demux/stheader.h
index 8d1822c99f..03fdf4d2ea 100644
--- a/demux/stheader.h
+++ b/demux/stheader.h
@@ -190,6 +190,7 @@ struct sh_video *new_sh_video_vid(struct demuxer *demuxer, int id, int vid);
struct sh_sub *new_sh_sub_sid(struct demuxer *demuxer, int id, int sid);
struct sh_sub *new_sh_sub_sid_lang(struct demuxer *demuxer, int id, int sid,
const char *lang);
+struct sh_stream *new_sh_stream(struct demuxer *demuxer, enum stream_type type);
const char *sh_sub_type2str(int type);