[Swfdec] some questions about swfdec

salsaman at xs4all.nl salsaman at xs4all.nl
Wed Dec 19 04:42:25 PST 2007


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).

I have a couple of questions:

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 ?

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 ?

third, if one wanted to pull the current image state from cairo, what
would be the best way to do this ? I am guessing that in
swfdec_player_render(), the following would fill out a memory buffer with
the current contents:

  for (walk = priv->roots; walk; walk = walk->next) {
    swfdec_movie_render (walk->data, cr, &trans, &real);
  }
  SWFDEC_INFO ("=== %p: END RENDER ===", player);
  cairo_restore (cr);


   // new stuff
  cairo_surface_t surf=cairo_get_target(cr);
  memcpy(imgbuf,cairo_image_surface_get_data(surf),bufsize);


Presumably one could also hide the cairo window, so that the content could
be displayed by an external app.

is there a better way of doing it ?


Regards,
salsaman,
http://lives.sf.net




More information about the Swfdec mailing list