diff options
author | wm4 <wm4@nowhere> | 2013-06-04 00:29:29 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-06-04 00:29:44 +0200 |
commit | 92ae48db0f91fbfcfbb1722fa81c922808f62d5a (patch) | |
tree | e32fe21b5f8c11ada7788768a76e2d9f7d061c66 /demux/demux.h | |
parent | daf8ed831b4ae63cf0931cc3d6727956137f865f (diff) | |
parent | c1ac97b99b3e80bbf84ed540178dd6689ead0b87 (diff) | |
download | mpv-92ae48db0f91fbfcfbb1722fa81c922808f62d5a.tar.bz2 mpv-92ae48db0f91fbfcfbb1722fa81c922808f62d5a.tar.xz |
Merge branch 'sub_mess'
This branch heavily refactors the subtitle code (both loading and
rendering), and adds support for a few new formats through FFmpeg.
We don't remove any of the old code yet. There are still some subtleties
related to subreader.c to be resolved: code page detection & conversion,
timing post-processing, UTF-16 subtitle support, support for the -subfps
option. Also, SRT reading and loading ASS via libass should be turned
into proper demuxers. (SRT is needed because Libav's is gravely broken,
and we want ASS loading via libass to cover full libass format support.
Both should be demuxers which are probed _before_ libavformat, so that
all subtitles can be loaded through the demuxer infrastructure, and
libavformat subtitles don't need to be treated in a special way.)
Diffstat (limited to 'demux/demux.h')
-rw-r--r-- | demux/demux.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/demux/demux.h b/demux/demux.h index 886252fa85..9ec6d0c6f0 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -77,6 +77,7 @@ enum demuxer_type { DEMUXER_TYPE_END, DEMUXER_TYPE_PLAYLIST, + DEMUXER_TYPE_SUB, }; enum timestamp_type { @@ -304,9 +305,9 @@ static inline void *realloc_struct(void *ptr, size_t nmemb, size_t size) return realloc(ptr, nmemb * size); } -struct demuxer *new_demuxer(struct MPOpts *opts, struct stream *stream, - int type, int a_id, int v_id, int s_id, - char *filename); +demuxer_t *new_sub_pseudo_demuxer(struct MPOpts *opts); + + void free_demuxer(struct demuxer *demuxer); void demuxer_add_packet(demuxer_t *demuxer, struct sh_stream *stream, @@ -343,7 +344,7 @@ void ds_free_packs(struct demux_stream *ds); int ds_get_packet(struct demux_stream *ds, unsigned char **start); int ds_get_packet_pts(struct demux_stream *ds, unsigned char **start, double *pts); -int ds_get_packet_sub(struct demux_stream *ds, unsigned char **start); +struct demux_packet *ds_get_packet_sub(demux_stream_t *ds); struct demux_packet *ds_get_packet2(struct demux_stream *ds, bool repeat_last); double ds_get_next_pts(struct demux_stream *ds); int ds_parse(struct demux_stream *sh, uint8_t **buffer, int *len, double pts, |