[MPlayer-dev-eng] Re: New remove-logo filter

Martin Atkins mart at degeneration.co.uk
Sun Feb 27 15:21:02 CET 2005


Yartrebo wrote:
> Is there any reason why I cannot support several formats? I could keep
> the tga loader and add in a pgm and bmp loader, and everyone would be
> happy. The loader to be used would be determined by the magic number
> (first 4 characters) of the file.

When you start doing that, it's time to create a common image loader API 
that can be called by all filters. Having a single filter implement 
multiple loaders within itself would just be wrong.

 From discussion I read earlier but can't find now, it seems that 
mplayer already has the makings of such a thing but it depends on one of 
the optional libraries.

For the common image loader API I think it'd be necessary to allow 
callers to specify limitations on what kinds of files they can support. 
For example, deblendlogo could only support image formats that support 
an alpha channel, so supplying a PPM file to it would be pointless.

I imagine that with none of the optional image libraries compiled in, 
the image loader API would essentially just end up being a PPM/PGM loader.




More information about the MPlayer-dev-eng mailing list