diff options
author | wm4 <wm4@nowhere> | 2015-12-27 02:07:01 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-12-27 02:13:06 +0100 |
commit | d85753b79e4ce0fa7a5ddac5b2ed0cf65f7aecd8 (patch) | |
tree | 4c4844981e89c7ad056d0e52335b2d963e37d44b /sub/dec_sub.h | |
parent | 50c379e2d8a2cee0fcdbadbcbf5d0a0617fdafec (diff) | |
download | mpv-d85753b79e4ce0fa7a5ddac5b2ed0cf65f7aecd8.tar.bz2 mpv-d85753b79e4ce0fa7a5ddac5b2ed0cf65f7aecd8.tar.xz |
sub: refactor initialization
Just simplify by removing parts not needed anymore. This includes
merging dec_sub allocation and initialization (since things making
initialization complicated were removed), or format support queries (it
simply tries to create a decoder, and if that fails, tries the next
one).
Diffstat (limited to 'sub/dec_sub.h')
-rw-r--r-- | sub/dec_sub.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sub/dec_sub.h b/sub/dec_sub.h index e202438777..56db5bc519 100644 --- a/sub/dec_sub.h +++ b/sub/dec_sub.h @@ -22,16 +22,13 @@ enum sd_ctrl { SD_CTRL_SET_VIDEO_DEF_FPS, }; -struct dec_sub *sub_create(struct mpv_global *global); +struct dec_sub *sub_create(struct mpv_global *global, struct demuxer *demuxer, + struct sh_stream *sh); void sub_destroy(struct dec_sub *sub); void sub_lock(struct dec_sub *sub); void sub_unlock(struct dec_sub *sub); -void sub_init(struct dec_sub *sub, struct demuxer *demuxer, struct sh_stream *sh); - -bool sub_is_initialized(struct dec_sub *sub); - -bool sub_read_all_packets(struct dec_sub *sub, struct sh_stream *sh); +bool sub_read_all_packets(struct dec_sub *sub); bool sub_accepts_packet_in_advance(struct dec_sub *sub); void sub_decode(struct dec_sub *sub, struct demux_packet *packet); void sub_get_bitmaps(struct dec_sub *sub, struct mp_osd_res dim, double pts, |