diff options
author | wm4 <wm4@nowhere> | 2014-10-03 22:32:16 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-03 23:10:18 +0200 |
commit | cc9973f4e0268bc17cf95ec39af194d0136e0c0d (patch) | |
tree | e0d65df5854f473ccc31ae13580ce64ec2b0d7db /player/core.h | |
parent | e64ce83182db230215ab547386b1ce310025423c (diff) | |
download | mpv-cc9973f4e0268bc17cf95ec39af194d0136e0c0d.tar.bz2 mpv-cc9973f4e0268bc17cf95ec39af194d0136e0c0d.tar.xz |
player: move some libass setup code to sub.c
Also recreate ASS_Library on every file played. This means we can move
the code out of main.c as well.
Recreating the ASS_Library object has no disadvantages, because it
literally stores only the message callback, the (per-file) font
attachment as byte arrays, and the set of style overrides. Hopefully
this thing can be removed from the libass API entirely at some point.
The only reason why the player core creates the ASS_Renderer, instead
of the subtitle renderer, is because we want to cache the loaded fonts
across ordered chapter transitions, so this probably still has to stay
around for now.
Diffstat (limited to 'player/core.h')
-rw-r--r-- | player/core.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/player/core.h b/player/core.h index bcd0116bd4..cf35df64b2 100644 --- a/player/core.h +++ b/player/core.h @@ -469,6 +469,8 @@ void uninit_sub(struct MPContext *mpctx, int order); void uninit_sub_all(struct MPContext *mpctx); void update_osd_msg(struct MPContext *mpctx); void update_subtitles(struct MPContext *mpctx); +void init_sub_renderer(struct MPContext *mpctx); +void uninit_sub_renderer(struct MPContext *mpctx); // timeline/tl_matroska.c void build_ordered_chapter_timeline(struct MPContext *mpctx); |