What have I been furiously hacking on the last few nights? Gnash, the GNU Flash player. Specifically, I’ve been doing a lot of hacking on support for Win32. More specifically, I’ve been working on npgnash, the plugin that embeds Gnash inside Firefox using the Mozilla NPAPI.
I’m not going to get into the ugly details of what I went through to get as far as I have, but I’ll summarize it as: a hell of a lot harder than it ought to have been. I’ll save my rant for why C++ sucks, so badly, for another day. What you really want to see are screenshots, I know!
First, here’s the entry for npgnash from Firefox’s about:plugins page:
Okay, big deal, so I can load a DLL. Here’s npgnash playing gravity.swf from the Gnash testsuite, right in the browser:
Who doesn’t love a big bouncing smiley-face animating across their browser, right? But, the true test is playing my favorite YouTube video … to test with, at least:
Yup, that’s no joke … it’s a screenshot of npgnash playing a YouTube video inside Firefox 220.127.116.11 on my WinXP machine. It’s using the Anti-Grain Geometry (AGG) rendering engine, along with SDL/ffmpeg for audio … and they both work, albeit not very well, yet. Still, not bad for three or four days of hacking, right?
Despite all this progress and these screenshots, it’s still not ready for general-purpose use, yet. The underlying Gnash code is still isn’t fully re-entrant/thread-safe and the cleanup code isn’t fully baked so I can’t even load one SWF after another without it crashing. I also haven’t implemented any mouse/keyboard support, so you can’t actually use any of the player buttons you see in the YouTube video, etc., yet.
Still, it’s a great start and hopefully by the time the 0.8.3 release is ready in a few months, there will be a lot more forward progress.