diff options
author | wm4 <wm4@nowhere> | 2015-11-17 01:54:02 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-11-17 01:56:23 +0100 |
commit | 5a89150a4652d987f24d7d386d5cdc6d9109e66d (patch) | |
tree | fc6085143661672f537a604b6645f79e0dced3ad /player/core.h | |
parent | 85450d06a1b1a08fce277f7f14d5ee33b12f8eab (diff) | |
download | mpv-5a89150a4652d987f24d7d386d5cdc6d9109e66d.tar.bz2 mpv-5a89150a4652d987f24d7d386d5cdc6d9109e66d.tar.xz |
player: remove OSD subtitle render path
This was used with --no-sub-ass (aka --no-ass). This option (which is
not yet removed) strips all styling from the subtitles, and renders them
as plaintext only. For some reason, it originally seemed convenient to
reuse all the OSD text rendering code (osd_libass.c). While this was
indeed simple, it had a bad influence on the rest of the code. For
example, it had to decide whether to go through the OSD code path, or
the proper subtitle renderer in sd_ass.c.
Kill the OSD subtitle renderer. Reimplement --no-sub-ass and also
"secondary" subtitles in sd_ass.c. fill_plaintext() contains some rather
minor code duplication with osd_libass.c for setting up a dummy
ASS_Event and escaping the stripped text. Since sd_ass.c already has to
handle "normal" text subtitles, and has code for stripping ASS tags,
this remains all relatively simple.
Remove all the unnecessary crap from the rest of the code.
Diffstat (limited to 'player/core.h')
-rw-r--r-- | player/core.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/player/core.h b/player/core.h index a7b643864d..2f9d2828ac 100644 --- a/player/core.h +++ b/player/core.h @@ -475,7 +475,7 @@ void set_osd_bar(struct MPContext *mpctx, int type, bool set_osd_msg(struct MPContext *mpctx, int level, int time, const char* fmt, ...) PRINTF_ATTRIBUTE(4,5); void set_osd_function(struct MPContext *mpctx, int osd_function); -void set_osd_subtitle(struct MPContext *mpctx, const char *text); +void term_osd_set_subs(struct MPContext *mpctx, const char *text); void get_current_osd_sym(struct MPContext *mpctx, char *buf, size_t buf_size); void set_osd_bar_chapters(struct MPContext *mpctx, int type); @@ -523,8 +523,6 @@ void uninit_sub_all(struct MPContext *mpctx); void update_osd_msg(struct MPContext *mpctx); void update_subtitles(struct MPContext *mpctx); void uninit_sub_renderer(struct MPContext *mpctx); -void update_osd_sub_state(struct MPContext *mpctx, int order, - struct osd_sub_state *out_state); // video.c void reset_video_state(struct MPContext *mpctx); |