Rob Savoye wrote:
I've made a few more changes to the plugin, although they're only of use
to other developers. I implemented processing the arguments passed in
when the new data stream is created by Firefox, and add a special one.
If you pass "debug=waitforgdb", firefox will print out the PID of the
thread, and block waiting for you to attach GDB. This is the easiest way
I've found to debug the plugin itself, because by this time the plugin
is loaded, and all issues with shared libraries go away. I was getting
tired of having to just printf things...
Anyway, this one still draws the boring OpenGL triangle and square by
default. For the brave at heart, you can go to plugin.cpp:561 and flip
the #ifdef to watch the plugin launch, and then play the movie. (sort
of...) At this time I'm still getting weird issues with OpenGL and
threading, but that's the next focus of debugging...
With the plugin set to download all the flash movies to /tmp that it
comes across, I think mortgage company ads have the highest amount,
followed by realtors.
- rob -
The problem with OpenGL is that it doesn't support multithreading. You
need then to use some kind of system-wide lock when doing OGL
operations. You can have several independant OGL context (at least on
Windows by using wglMakeCurrent) but only one selected at a time.
When writing a Firefox plugin I got some problems with
OpenGL as well, while everything was working nicely with DirectX. Two
things in particular :
- initializing an OpenGL context in the the same thread that Firefox was
making everything hangs. I needed then to have a separate thread and
communicate through messages
- changing the PixelFormat for OpenGL (using SetPixelFormat, on Windows)
was making a small but perceptive lag that was degrading user experience.
Back then, it was a crossplatform 3D engine that was able to display
animated SWF on textures, but the plugins for Firefox and IE were only
developed for Windows.
I haven't look at the Gnash graphics renderer yet, but if it's not the
case, you should consider rendering the whole SWF scene into a memory
pointer and only at presentation time display the buffer using either
OGL, DirectX or whatever the plugin is providing. The "plugin" should
also be able to give the renderer a pointer to render to (with width,
height and stride informations) for small devices.
Nicolas
_______________________________________________
Gnash mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash