diff options
author | wm4 <wm4@nowhere> | 2013-04-14 19:19:35 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-04-20 23:28:24 +0200 |
commit | 654c34f77166d24914d3ff0a2923c128d846430d (patch) | |
tree | 8b0cde907cfe3e55a0ecbe86256703582d671d21 /demux/stheader.h | |
parent | 06eee1b6751c43189efd994fa296c9753a89b89c (diff) | |
download | mpv-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.h | 1 |
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); |