osd: rewrite OSD rendering to use libass
commit083e6e3e1a9bf9ee470f59cfd1c775c8724c5ed9
authorUoti Urpala <uau@mplayer2.org>
Mon, 20 Aug 2012 20:39:31 +0000 (20 23:39 +0300)
committerUoti Urpala <uau@mplayer2.org>
Mon, 27 Aug 2012 21:19:41 +0000 (28 00:19 +0300)
treeb43a4221dedd0ba4c2f30fe98a69b003b9583ca1
parentbc33257a6436fcf53bc73f4d0dcadc4a46eabe9c
osd: rewrite OSD rendering to use libass

Render OSD contents with libass. Delete the old rendering code which
used freetype/fontconfig directly and did text layout manually.
Compiling without libass enabled is still possible, but now there is
no OSD support whatsoever in this case.

The "--no-ass" switch still exists, and enables a mode where text is
drawn unstyled in a manner similar to old rendering. However, most of
the switches controlling old subtitle rendering which do not work with
libass rendering (such as --subalign, --subfont-blur etc) now do not
work in this mode either. Some of them could be supported by setting
suitable libass style attributes or other means.

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 inefficient, mostly because the libass output
is converted into the strange mplayer OSD format to work with existing
VO drawing routines. This could be improved at a later point.

Also do some cleanup. 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 (proper fix would be
to move them to the option struct though).

Based on original patches by wm4, with multiple fixes and
modifications.
26 files changed:
Makefile
README
cfg-mplayer.h
command.c
configure
libmpcodecs/vf_ass.c
libmpcodecs/vf_vo.c
libmpdemux/demux_ty.c
libvo/vo_corevideo.m
libvo/vo_direct3d.c
libvo/vo_gl.c
libvo/vo_vdpau.c
mplayer.c
mplayer.h
sub/ass_mp.c
sub/font_load.c [deleted file]
sub/font_load.h [deleted file]
sub/font_load_ft.c [deleted file]
sub/osd_dummy.c [new file with mode: 0644]
sub/osd_font.h
sub/osd_libass.c [new file with mode: 0644]
sub/sub.c
sub/sub.h
sub/sub_cc.c
sub/subreader.c
sub/subreader.h