gnash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash] plugin update


From: Nicolas Cannasse
Subject: Re: [Gnash] plugin update
Date: Fri, 10 Feb 2006 12:51:12 +0100
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]