[Swfdec] as branch progress report
otte at gnome.org
Wed Jun 20 01:59:40 PDT 2007
On 6/18/07, Benjamin Otte <otte at gnome.org> wrote:
> There is a way to test visual output. See test/image/README. You
> provide an SWF file and a reference image and it checks that they
> match. I've been testing the jpeg decoder that way. It's a bit harder
> to do since one needs to manually grab the image in the GIMP and then
> save it. So I tend to ignore it (oops).
Since I got annoyed by how hard and unscriptable this is, I wrote a
small bit of code to automate screenshooting of the Adobe 9 debug
player. I've attached it, you'll need gtk and libwnck to compile it.
It's a bit rough, but it allows you to run scripts like this:
for file in *.swf; do ./sshot $file; done
For this to work, your SWF files need to produce a static image in <
0.5 seconds (this is how lang sshot.c waits).
You might need to adapt the script for your own needs, since I've
hardcoded the path to the debug player binary. The code should be
short enough to be self-explanatory, but if there's questions, go
ahead and ask.
I checked and it even works if you run the tests in a different X
server (so it really can run in the background).
I'm using vncserver for this, but any other X server should work. Just
make sure a proper window manager runs on it. In my testing terminal,
and then continue with scripts like the above. Note: you need a window
manager for this to work, so you really wanna launch metacity on :1.
Otherwise it just hangs.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2556 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/swfdec/attachments/20070620/b0560a13/attachment.c
More information about the Swfdec