[MPlayer-dev-eng] [PATCH] SVG overlay

Uoti Urpala uoti.urpala at pp1.inet.fi
Mon Aug 21 01:26:39 CEST 2006


On Sun, 2006-08-20 at 23:49 +0200, Nicolas George wrote:
> Since animations features of SVG are not supported by libsvg-cairo nor any
> SVG rendering library I found, I use timing attributes in a dedicated
> namespace. I am abusing the http://www.mplayerhq.hu/DOCS/tech/svg-sub.html
> URL for this namespace; the page itself remains to be written.

So this format is something you made up just now, and which is not
currently used anywhere?

> Some work is still needed to make this patch perfect: handle negative
> strides without segfault, find why it does not work with mencoder (static
> parts are there, but not variable parts, I believe the timestamps are not
> what I expect), and of course documentation. And maybe some perl scripts,

Yes mencoder does not handle timestamps properly.

Some random comments about the patch after a very superficial look:

+    return(0);

Return is not a function, you don't need parentheses there.


+    unsigned *od, *od2; /* FIXME: Cairo documentation is not very accurate
+			   on the actual memory layout of its data, but
+			   unsigned is the type it internally use. */

+    od = (unsigned *)cairo_image_surface_get_data(s);

The cast is useless since that's the type of the variable it's being
assigned to. However whether it's really the right type seems
questionable - the cairo.h on my system has
unsigned char * cairo_image_surface_get_data(cairo_surface_t *surface);


+ * The MPlayer images must be BGR32.

Requiring conversion to RGB will hurt performance in most cases, as most
video codecs produce YUV and xv can display that without conversion.




More information about the MPlayer-dev-eng mailing list