diff options
author | wm4 <wm4@nowhere> | 2013-11-23 21:37:15 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-23 21:37:15 +0100 |
commit | 639e672bd153e06cfc01ced6c2a48b45870e8f31 (patch) | |
tree | 7b683231216221252860c9b686f744ad7354fa2f /sub/dec_sub.h | |
parent | 3486302514db31b8086f46226d9b46d53810d1e7 (diff) | |
download | mpv-639e672bd153e06cfc01ced6c2a48b45870e8f31.tar.bz2 mpv-639e672bd153e06cfc01ced6c2a48b45870e8f31.tar.xz |
player: rearrange how subtitle context and stream headers are used
Use sh_stream over sh_sub. Use dec_sub (and mpctx->d_sub) instead of the
stream header. This aligns the subtitle code with the recent audio and
video refactoring.
sh_sub still has the decoder context, though. This is because we want to
avoid reinit when switching segments with ordered chapters. (Reinit is
fast, except for creating the ASS_Renderer, which in turn triggers
fontconfig.) Not sure how much this matters, though, because the initial
segment switch will lazily initialize the decoder anyway.
Diffstat (limited to 'sub/dec_sub.h')
-rw-r--r-- | sub/dec_sub.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sub/dec_sub.h b/sub/dec_sub.h index b269326cac..9ff2b366bd 100644 --- a/sub/dec_sub.h +++ b/sub/dec_sub.h @@ -6,7 +6,7 @@ #include "sub/sub.h" -struct sh_sub; +struct sh_stream; struct ass_track; struct MPOpts; struct demux_packet; @@ -29,11 +29,11 @@ void sub_set_video_fps(struct dec_sub *sub, double fps); void sub_set_extradata(struct dec_sub *sub, void *data, int data_len); void sub_set_ass_renderer(struct dec_sub *sub, struct ass_library *ass_library, struct ass_renderer *ass_renderer); -void sub_init_from_sh(struct dec_sub *sub, struct sh_sub *sh); +void sub_init_from_sh(struct dec_sub *sub, struct sh_stream *sh); bool sub_is_initialized(struct dec_sub *sub); -bool sub_read_all_packets(struct dec_sub *sub, struct sh_sub *sh); +bool sub_read_all_packets(struct dec_sub *sub, struct sh_stream *sh); bool sub_accept_packets_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, |