[MPlayer-dev-eng] [PATCH] Review please: support sub_pos in libass

Uoti Urpala uoti.urpala at pp1.inet.fi
Mon Dec 22 23:01:57 CET 2008


On Mon, 2008-12-22 at 21:48 +0100, Rafał Miłecki wrote:
> Hope this time I'll provide some useful patch :)
> 
> Currently it is almost not possible to control position of subtitles
> when using libass. OK, libass respects position from .ass file but

So this is primarily for rendering plain non-ass subtitle formats with
libass?

> This patch does:
> 1) Change default Alignment to 14 (0x1110) which is /invalid valign/
> and HALIGN_CENTER.
> 2) Respects sub_pos in case of invalid value of (Alignment & 0x1100)

At least the position value should be set in the style struct rather
than read from a global. Especially so because libass is used in other
projects and should not use MPlayer-specific globals.

One possibility would be to add an alignment type that reads the exact
position from another variable in the struct, and then allow replacing
the default style with another (would that be any harder than changing
just the alignment?).

The preferred interface could depend on how libass is used in other
projects; I'm not too familiar with those.




More information about the MPlayer-dev-eng mailing list