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 /cfg-mplayer.h | |
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 'cfg-mplayer.h')
-rw-r--r-- | cfg-mplayer.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/cfg-mplayer.h b/cfg-mplayer.h index 3aacdd274f..ae27169c5f 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -680,14 +680,12 @@ const m_option_t common_opts[] = { {"spualign", &spu_alignment, CONF_TYPE_INT, CONF_RANGE, -1, 2, NULL}, {"spuaa", &spu_aamode, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL}, {"spugauss", &spu_gaussvar, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 3.0, NULL}, -#ifdef CONFIG_FREETYPE {"subfont-encoding", &subtitle_font_encoding, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"subfont-text-scale", &text_font_scale_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL}, {"subfont-osd-scale", &osd_font_scale_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL}, {"subfont-blur", &subtitle_font_radius, CONF_TYPE_FLOAT, CONF_RANGE, 0, 8, NULL}, {"subfont-outline", &subtitle_font_thickness, CONF_TYPE_FLOAT, CONF_RANGE, 0, 8, NULL}, {"subfont-autoscale", &subtitle_autoscale, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL}, -#endif OPT_START_CONDITIONAL(CONFIG_ASS, "libass"), OPT_MAKE_FLAGS("ass", ass_enabled, 0), OPT_FLOATRANGE("ass-font-scale", ass_font_scale, 0, 0, 100), |