[MPlayer-cvslog] r25641 - in trunk/libass: ass.h ass_library.c

Rich Felker dalias at aerifal.cx
Tue Jan 8 06:39:31 CET 2008


On Tue, Jan 08, 2008 at 05:38:03AM +0200, Uoti Urpala wrote:
> On Tue, 2008-01-08 at 03:03 +0300, Evgeniy Stepanov wrote:
> > On Tuesday 08 January 2008 02:38:33 Uoti Urpala wrote:
> > > Moving the fonts from per-library-instance to per-renderer might not be
> > > a good solution as it would likely duplicate them between tracks of the
> > > same file. Maybe there should be a per-file level between those?
> > >
> > > Another possibility could be to allow different fonts to accumulate but
> > > try to detect and remove multiple instances of the same font.
> > 
> > I'm thinking of clearing all fonts when the file is changed.
> > May be a good place for that is somewhere around mplayer.c:3653 ?
> 
> It'd probably be OK for current MPlayer use, but it could be suboptimal
> for more general library use. Having all fonts in one global pool which
> only supports cleaning everything at once doesn't work if you have
> multiple simultaneous instances which add fonts separately. However
> maybe the top-level library objects can be used for that (a separate
> library object for each thing that should have its own pool of fonts).
> Would there be problems using a separate library object per file? 

Any sort of 'context' object should always be one-per-concurrent-user.
Otherwise you subject yourself to the API/ABI issues, performance
issues, and impossible-to-debug nature of concurrency/threads.

Rich



More information about the MPlayer-cvslog mailing list