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 /configure | |
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 'configure')
-rwxr-xr-x | configure | 53 |
1 files changed, 39 insertions, 14 deletions
@@ -361,6 +361,7 @@ Optional features: --disable-pthreads disable Posix threads support [autodetect] --disable-w32threads disable Win32 threads support [autodetect] --disable-libass disable subtitle rendering with libass [autodetect] + --disable-libass-osd disable OSD rendering with libass [autodetect] --enable-rpath enable runtime linker path for extra libs [disabled] --disable-libpostproc disable postprocess filter (vf_pp) [autodetect] @@ -657,6 +658,7 @@ _vstream=auto _pthreads=auto _w32threads=auto _ass=auto +_libass_osd=auto _rpath=no libpostproc=auto _asmalign_pot=auto @@ -991,6 +993,8 @@ for ac_option do --disable-w32threads) _w32threads=no ;; --enable-libass) _ass=yes ;; --disable-libass) _ass=no ;; + --enable-libass-osd) _libass_osd=yes ;; + --disable-libass-osd) _libass_osd=no ;; --enable-rpath) _rpath=yes ;; --disable-rpath) _rpath=no ;; --enable-libpostproc) libpostproc=yes ;; @@ -4542,6 +4546,39 @@ else noinputmodules="cddb $noinputmodules" fi + +echocheck "SSA/ASS support" +if test "$_ass" = auto ; then + if pkg_config_add libass ; then + _ass=yes + def_ass='#define CONFIG_ASS 1' + else + die "Unable to find development files for libass. Aborting. If you really mean to compile without libass support use --disable-libass." + fi +else + def_ass='#undef CONFIG_ASS' +fi +echores "$_ass" + + +echocheck "libass OSD support" +_old_osd=yes +if test "$_libass_osd" = auto ; then + _libass_osd=no + if test "$_ass" = yes ; then + _libass_osd=yes + _old_osd=no + _bitmap_font=no + # disable unneeded dependencies + _freetype=no + _fontconfig=no + # this should always be forced, because libass does bidi itself + _fribidi=no + fi +fi +echores "$_libass_osd" + + echocheck "bitmap font support" if test "$_bitmap_font" = yes ; then def_bitmap_font="#define CONFIG_BITMAP_FONT 1" @@ -4593,20 +4630,6 @@ fi echores "$_fontconfig" -echocheck "SSA/ASS support" -if test "$_ass" = auto ; then - if pkg_config_add libass ; then - _ass=yes - def_ass='#define CONFIG_ASS 1' - else - die "Unable to find development files for libass. Aborting. If you really mean to compile without libass support use --disable-libass." - fi -else - def_ass='#undef CONFIG_ASS' -fi -echores "$_ass" - - echocheck "fribidi with charsets" if test "$_fribidi" = auto ; then _fribidi=no @@ -5724,6 +5747,8 @@ JPEG = $_jpeg LADSPA = $_ladspa LIBA52 = $_liba52 LIBASS = $_ass +LIBASS_OSD = $_libass_osd +OLD_OSD = $_old_osd LIBBLURAY = $_bluray LIBBS2B = $_libbs2b LIBDCA = $_libdca |