[Swfdec] some questions about swfdec

Benjamin Otte otte at gnome.org
Wed Dec 19 05:12:15 PST 2007


On Dec 19, 2007 1:42 PM,  <salsaman at xs4all.nl> wrote:
> Hi there,
> I am salsaman, main developer of LiVES (http://lives.sf.net), videojack, etc.
>
> I am looking into swfdec with a view to making it accessible to more
> projects (for example feeding the output into videojack to allow streaming
> over a local lan video network; mixing the swfdec output with other video
> sources/effects to allow vjing/capturing the stream, etc).
>
Hey there,
This sounds like an interesting idea, though I think you still view
Flash as a video format. While that was true for maybe Flash 4, it is
more of a web application platform these days. And this might cause
issues which you need to live with. More of that below.

> first of all, has anybody managed to compile swfdec on a 64 bit system - I
> presume not, since it is dependant on liboil, which is 32 bit only. How
> hard would it be to make liboil and optional dependancy ?
>
I wonder from where you got that information. Considering that half of
the Swfdec people develop on AMD64 and Debian ships liboil on all
platforms[1], I'm pretty sure it works fine everywhere.

> second the design seems rather strange - you appear to be rendering
> directly to Cairo, rather than the more obvious and flexible route of
> rendering to a memory buffer, and then compositing the resulting buffer
> into cairo. Are you planning to continue with this methodology, or will it
> change in future releases ?
>
The idea is to render to something that exposes the hardware's
capabilities that are needed. Flash relies on the postscript rendering
model[2] which can be very well accelerated with current GPUs. A
memory buffer does not expose the GPU, so that seems like a very
suboptimal choice.
However, Cairo includes a software renderer that renders to memory
buffers and nothing is stopping you from using that software renderer.
In fact, the Swfdec testsuite already does that to compare Swfdec
output with reference images[3]. Another application that does that is
the Swfdec thumbnailer.

> Presumably one could also hide the cairo window, so that the content could
> be displayed by an external app.
>
You might want to read up on what Cairo is and does. There is
certainly not a single function to create windows with in Cairo. Also
Cairo does not require a Window to render to. It doesn't even require
X11.

Cheers,
Benjamin


[1]: http://packages.debian.org/search?keywords=liboil&searchon=names&suite=unstable&section=all
[2]: http://en.wikipedia.org/wiki/Display_PostScript
[3]: http://gitweb.freedesktop.org/?p=swfdec/swfdec.git;a=blob;f=test/image/image.c


More information about the Swfdec mailing list