diff options
author | wm4 <wm4@mplayer2.org> | 2012-03-22 06:26:37 +0100 |
---|---|---|
committer | wm4 <wm4@mplayer2.org> | 2012-07-28 23:36:07 +0200 |
commit | 74e7a1e937c10d9f4d8ce9b0ba4edee52044a757 (patch) | |
tree | c421c5b79b36ad4e29b3141b4b5753107b77a343 /libmpcodecs | |
parent | 7a06095dc3e5a3590f489aad3619dc6023a5b0f5 (diff) | |
download | mpv-74e7a1e937c10d9f4d8ce9b0ba4edee52044a757.tar.bz2 mpv-74e7a1e937c10d9f4d8ce9b0ba4edee52044a757.tar.xz |
osd: use libass for OSD rendering
The OSD will now be rendered with libass. The old rendering code, which
used freetype/fontconfig and did text layout manually, is disabled. To
re-enable the old code, use the --disable-libass-osd configure switch.
Some switches do nothing with the new code enabled, such as -subalign,
-sub-bg-alpha, -sub-bg-color, and many more. (The reason is mostly that
the code for rendering unstyled subtitles with libass doesn't make any
attempts to support them. Some of them could be supported in theory.)
Teletext rendering is not implemented in the new OSD rendering code. I
don't have any teletext sources for testing, and since teletext is
being phased out world-wide, the need for this is questionable.
Note that rendering is extremely inefficient, mostly because the libass
output is blended with the extremely strange mplayer OSD format. This
could be improved at a later point.
Remove most OSD rendering from vo_aa.c, because that was extremely
hacky, can't be made work with osd_libass, and didn't work anyway in
my tests.
Internally, some cleanup is done. Subtitle and OSD related variable
declarations were literally all over the place. Move them to sub.h and
sub.c, which were hoarding most of these declarations already. Make the
player core in mplayer.c free of concerns like bitmap font loading.
The old OSD rendering code has been moved to osd_ft.c. The font_load.c
and font_load_ft.c are only needed and compiled if the old OSD
rendering code is configured.
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/vf_ass.c | 2 | ||||
-rw-r--r-- | libmpcodecs/vf_vo.c | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/libmpcodecs/vf_ass.c b/libmpcodecs/vf_ass.c index 4dcddb1d08..0d14dff446 100644 --- a/libmpcodecs/vf_ass.c +++ b/libmpcodecs/vf_ass.c @@ -72,8 +72,6 @@ static const struct vf_priv_s { } *line_limits; } vf_priv_dflt; -extern float sub_delay; - static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) diff --git a/libmpcodecs/vf_vo.c b/libmpcodecs/vf_vo.c index a6bd165dee..e23eca4b71 100644 --- a/libmpcodecs/vf_vo.c +++ b/libmpcodecs/vf_vo.c @@ -33,8 +33,6 @@ #include "sub/ass_mp.h" #include "sub/sub.h" -extern float sub_delay; - struct vf_priv_s { struct vo *vo; #ifdef CONFIG_ASS |