Older blog entries for company (starting at number 68)

Done

Done, 3 months of silence. It’s feeling weird to get a lot of press after being able to play Youtube and then not getting anything else done for a lot of time. But as noted in a previous blog post, I wanted to clean up the codebase. That is done now. Swfdec 0.5.0 “Meet Plan Party” is out. It should be equivalent in functionality to the last 0.4 release, but if you find any regressions, please file a bug, as I’m sure we’ve missed something.

What improvements does it offer the user? Some Flash files are less broken than they used to be, but in general, there’s not much changes. There is definitely no new Flash sites I can advertise as working.

What has changed is development. The code got way simpler and it’s much easier now to implement a missing feature or fix a broken one. Apparently other people think the same now, as there’s a whole lot of people interested in hacking Swfdec and providing patches. The Swfdec IRC channel grows all the time, too. Thanks guys.

So I guess now that the foundations are up to speed, we can get to implementing lots of new features - at least until we find more stuff that is broken. What I’m after in getting working next is Google Video, better support for Youtube (in particular making the embedded player work), and I want support for the Flash 8 bling features. We’ll see how far we get.

One thing I’d like to see fixed is the low-hanging fruits. There’s a lot of requested features in Swfdec that need to be implemented and it’s not hard to do, but it requires dedicating time to it. In no particular order:

  • The command-line player needs to be made a serious application so we can install it. It needs a menu, a .desktop file, etc - all the stuff a good viewer application should have. Currently the only way of quitting it is Ctrl-C in the
    command line running it.
  • Swfdec needs gettext support.
  • The Mozilla plugin needs preferences. People want to be able to define (ideally on a per-site basis) if Flash should be played or not and if audio should be used.
  • There should be an Epiphany plugin integrating Swfdec more closely.
  • Someone needs to write a Konqueror and Webkit plugin. I didn’t find anyone at aKademy willing to do that.
  • Swfdec needs a thumbnailer.

Of course I’d also love if someone actually started writing real applications using Swfdec so I’d have a clue if the Swfdec API is sane or what is missing. (Hint: I would really love a GUI to do my tests in.) And of course the Swfdec library itself requires lots of work to. So, anyone interested? The Swfdec API is fully documented and I intend to keep it that way even when I need to expose a lot more API to make your application work.

And one last thing: If you have cool Flash files and think we should know about them so we can make them work in Swfdec, send me a link to the files. Making cool Flash files work is a lot more fun than working on boring ones. And we’ll certainly debug them more thoroughly.

PS: This post got delayed to you by Guadec and FlyBE.

Syndicated 2007-07-15 15:54:04 from Swfblag

Arrival times

80 vs 30, and it’s better structured. There’s things that KDE does better than Gnome.

Syndicated 2007-07-12 13:55:09 from Swfblag

British Airways

The interesting thing about first impressions is that you only get one chance. British Airways royally screwed theirs. I wouldn’t have minded if there’s a problem or even two. But apart from not losing my baggage (other people I met did lose theirs) they managed to mess up pretty much everything. The thing I can blame them least for is British authorities treating me like a suspected criminal whenever I’m about to board an aircraft. Although I do somewhat blame them that they chose Heathrow as their hub. It’s certainly nicer in Frankfurt or Amsterdam.

No, the things I’m blaming them for is that they canceled my flight and didn’t provide an alternative. Well, they did inform me a day in advance via email and suggested I call their hotline. But waiting half an hour on a telephone listening to the same 2-minute loop is not really an option unless you’re lucky enough (as I was) to get someone to borrow you their local landline phone. But it was a really awkward situation not knowing if I’d get back home any time soon. It wasn’t even a problem after I had reached their hotline - I just got on the next flight 3 hours later.
And I do blame BA for every single flight I was on being delayed, on average an hour and a half. I can probably live with some of my flights being a bit delayed, but all of them? And three out of four for more than an hour? And to make matters worse, they didn’t even tell me. I kept sitting in front of the checkin thinking the aircraft would start any minute, but nothing happened. For hours.

So here is what I’m looking for that BA didn’t deliver:

  • Don’t mess up all the time. Keep yourself better organized, you don’t have to have delays and lose luggage all the time.
  • If something doesn’t work out as planned, keep me informed. And inform me as soon as possible. Tell me as soon as you know about the delay of your flight. This makes me feel like you care about me.
  • If something gets seriously messed up, again tell me why. And provide me with options. If you can book me on a flight some hours later, just do it. Send me a mail stating “your flight was canceled, we put you on the next flight, because we thought that would be at your interest. If it is not, please call/mail us at xxx.” And if you provide contact information, don’t let it be a hotline where I have to wait 30 minutes on hold.
  • Treat people better when something was messed up. It makes them remember you positively even though theior experience was worse. So if someone has to wait 10 hours for their connecting flight because you cancelled it, how about giving them access to your lounge?

Two things I think I should note that round things up: BA had 4 counters opened at Glasgow for the 3 aircrafts starting soon. Two for fast baggage drop after quick check in that I couldn’t use because of the cancelling (someone fix that), one for people not eligible for quick check in, and on for In-Scotland flights with a guy twiddling thumbs, because there were no such flights. It might not matter for British people if they have to wait for 90 minutes in a queue because there’s some guy twiddling thumbs, but I was a bit pissed.
And the second thing was the guy from LA who told me that his flight from Heathrow got canceled and he only got a flight a day later. But BA didn’t want to change his flight from LA to Heathrow to a day later without a lot of convincing from him. He coined the term “BA: big enough not to care”.

Syndicated 2007-07-11 08:38:35 from Swfblag

new macbook

So my cute little iBook decided to die last week. Since the conference season is about to come in full swing, I needed a laptop, and I needed it now. Long story short: no one in the 12″ 1000 Euro segment comes even close to Apple. I really looked, because I’m only a fan of hot pants when I don’t have them. (Yes, that was a bad pun on the Macbook getting hot.) But even the Toshiba U200 is not a real contender. Anyway, I installed Ubuntu Gutsy on my shiny new 2nd generation Macbook in the hope it’d just work and here’s the good, the bad and the ugly about it:

The good
All hardware is supported and supported pretty well. Everything has a featureful driver. There’s also a lot of people caring about this machine. I can find blog or forum posts about almost every issue. Try to find out anything about that Toshiba machine and you’re lost. A big thank you for the work done by the Ubuntu laptop testing team in helping me decide and know potential problems in advance.

The bad
This is the stuff I managed to fix that didn’t work out of the box. First thing of note is the driver for the Intel graphic card. Compiz refuses to work (I blame Gutsy) and it still needs the 915resolution utility to correctly identify the correct resolution. This somehow shattered my dream of flawless Intel drivers. ;) And the Ubuntu installation doesn’t install the DRI GL libraries. Shouldn’t that be done by default? The second thing that didn’t work out of the box was wireless. I had to build a current Madwifi snapshot to make it work. But after doing so, it haven’t had any issues. The third issue is the touchpad. The Apple touchpad is one of the best inventions since sliced bread. Unfortunately, I only knew that because I used in in OS X for 20 minutes. The default configuration on X is bad, since it disables all the awesome features. Fortunately, there’s the synclient tool to reenable them. The driver could also need some tweaks here and there (in particular for detecting scrolling). But after that, multi-finger operations are just too good to not get used to immediately.

The ugly
This is the stuff I couldn’t make work. Luckily it’s all software issues, so I have hopes. Number one: Suspend doesn’t work. Boy, is a notebook without suspend useless. Especially because startup still takes ages (go blizzard, go hughsie!). It just doesn’t resume anymore. And hibernate doesn’t work either. It just shows a blinking cursor forever. The brightness controls don’t work either and I was too lazy to install desrt’s hack. I’d prefer to have it fixed properly. And last but not least, the volume controls for the sound card get totally mixed up. This seems to be a problem with the drivers, since even alsamixer labels the sliders wrong.

Short summary: Ubuntu on a Macbook is still an experience and quite a bit away from “just works”. Looks like I need to play “find the sweet kernel” with it for a while. Other than that, it’s awesome.

Syndicated 2007-06-27 08:25:25 from Swfblag

Guadec accomodation

Dear interweb, I was gonna share a room with Mathias Hasselmann at the Etap hotel for Guadec. However, I’m gonna stay from 14th to 22nd and he’s gonna leave at the 19th already, which leaves us 3 days with a room that’s half-empty. Do you know people that have a similar problem, so we could get rid of two half-empty rooms? If so, please mail me or contact me on IRC.

Syndicated 2007-06-22 13:09:14 from Swfblag

How to do tests

Since quite some people have asked how to do tests for Swfdec, here’s a short Howto. You need:

  • Ming for creating the test files. You probably want a 0.4.0 beta, and not the packages found in distros.
  • A Flash debug player. I use the Windows debug player via wine.

You need to configure the debug player to provide debug output. Create the file ~/.wine/dosdevices/c:/windows/profiles/$USERNAME/mm.cfg and have its contents be (you might need Windows-style CRLF line feeds, not sure):

ErrorReportingEnable=1
TraceOutputFileEnable=1

Now for every Flash file you run with the debug player, a text file will be created that contains trace output and other interesting warnings. It will be at
~/.wine/dosdevices/c:/windows/profiles/$USERNAME/Application Data/Macromedia/Flash Player/Logs/flashlog.txt. I have softlinked that file to flash.log.

Now we need to write a test. Have a look at the test/trace/ subdirectory and the included *.as and *.c files to learn about those tests. The directory also contains a README file, that might give some hints. I’ll focus on the as files here. So let’s assume, we really want to know if NaN == NaN, we’ll write a small test file nan.as:

// makeswf -v 7 -s 200x150 -r 1 -o nan.swf nan.as

// Add a nice description here, so we have an idea what this test is about when it fails.
trace ("Check if NaN == NaN");
trace (NaN == NaN);

// This quits Adobe's Flash player, so we don't have to close it automatically.
loadMovie ("FSCommand:quit", "");

Now compile and run it:

makeswf -v 7 -s 200x150 -r 1 -o nan.swf nan.as && 
wine sa_flashplayer_9_debug.exe nan.swf && 
cp flash.log nan.swf.trace && 
perl -pi -e 's/\r\n$/\n/;' nan.swf.trace;

As you can see, the debug output was copied to the right filename and line feeds were adapted already. Now just copy the files into Swfdec’s test/trace directory and see if Swfdec handles it correctly by running ./trace nan.swf. If it doesn’t, it’ll print the diff between the trace file and the output of Swfdec. And you can go looking at the code to determine who’s at fault. Or write the next test. :)

Syndicated 2007-06-10 19:54:04 from Swfblag

Dear Google

Dear Google, why do you think I’m too stupid to watch movies and need a GoogleVideoPlayer.exe? You seem to be able to hand me the file just fine when running on Linux.

Or have you guys recently realized that Linux users are smarter?

Syndicated 2007-06-09 19:49:18 from Swfblag

What’s up?

Lots of people keep asking this, so here is the authoritative answer to the question “What’s been happening to Swfdec in the last months?”

The bad news is that there haven’t been many new features. At least nothing that would be very visible. The good news is that this is about to change soon. I’ve been spending most of my time understanding the inner workings of Flash’s script engine and reimplementing it in a brand-new script engine for Swfdec. I’ve thrown away about 70% of the glue code to make objects scriptable. Making scriptable objects is now extremely easy. This should speed up coding immensely, both for me and for new contributors.

The biggest issue so far when making Flash files work has been finding subtle bugs. Swfdec is very good at complaining about missing features to stderr (see my last blog), but other things are more subtle. For example: is NaN == NaN? Sure, if you tested it, you know the answer, but if you just coded it, you’ll probably get it wrong. And finding such a problem inside huge 16.000 lines of code (that’s the size of the Google Video Flash plugin) is very hard. So I’ve been looking for ways to find these issues earlier. I hope it works out.

I’ve also developed a habit of writing a test when I’m not sure about a feature, which has helped a great deal. The testsuite has increased from 90 tests to almost 200 tests and there’s another 150-200 tests lying around waiting to be cleaned up and committed.

So, in short, for the user, nothing new to show. For developers, lots of exciting new stuff has landed. If you are a developer, today is a good day to start. Grab the code, head into #swfdec and start hacking. The hard work behind the scenes is done, now it’s time for features.

Syndicated 2007-06-07 08:05:36 from Swfblag

What's up?

Lots of people keep asking this, so here is the authoritative answer to the question "What's been happening to Swfdec in the last months?"

The bad news is that there haven't been many new features. At least nothing that would be very visible. The good news is that this is about to change soon. I've been spending most of my time understanding the inner workings of Flash's script engine and reimplementing it in a brand-new script engine for Swfdec. I've thrown away about 70% of the glue code to make objects scriptable. Making scriptable objects is now extremely easy. This should speed up coding immensely, both for me and for new contributors.

The biggest issue so far when making Flash files work has been finding subtle bugs. Swfdec is very good at complaining about missing features to stderr (see my last blog), but other things are more subtle. For example: is NaN == NaN? Sure, if you tested it, you know the answer, but if you just coded it, you'll probably get it wrong. And finding such a problem inside huge 16.000 lines of code (that's the size of the Google Video Flash plugin) is very hard. So I've been looking for ways to find these issues earlier. I hope it works out.

I've also developed a habit of writing a test when I'm not sure about a feature, which has helped a great deal. The testsuite has increased from 90 tests to almost 200 tests and there's another 150-200 tests lying around waiting to be cleaned up and committed.

So, in short, for the user, nothing new to show. For developers, lots of exciting new stuff has landed. If you are a developer, today is a good day to start. Grab the code, head into #swfdec and start hacking. The hard work behind the scenes is done, now it's time for features.

Syndicated 2007-06-07 07:05:36 from Swfblag

How to make SWF files work

So someone recently asked me how to hack on Swfdec. And since that might be interesting to others, I thought I'd blog about it. One thing to note: All the action these days is in the "as" branch, which will become Swfdec 0.5 in the near future.

So the first thing I do is download the file I want to make work. Surprisingly, the Swfdec Mozilla plugin allows downloading Flash files from its properties dialog, which you can get to by right-clicking on the playing file.

Now I play the file with the little application (in Swfdec's git checkout) player/swfplay inside a terminal. It will spew out debugging information. A lot of this debugging information will be about missing features. So I start at the top and implement all those missing features, most of the time by writing accompanying tests. (How to easily write good tests is a post as big as this, so I'll leave that out for now. Poke me to write it if you care.)

Here's a few of the more common messages and what to do about it:

SWFDEC: ERROR: swfdec_script.c(198): validate_action: no function for  36 0x24 CloneSprite in v6
This means a bytecode isn't implemented yet. The bytecode interpreter is in libswfdec/swfdec_as_interpret.c - just add the function there that does the right thing.
SWFDEC: ERROR: swfdec_as_interpret.c(678): swfdec_action_call_method: no function named createEmptyMovieClip
An Actionscript function isn't implemented. First I figure out what object it belongs to and what it does by looking at Brajeshwar's excellent Actionscript reference. Then I implement it. Note that a lot of function have really weird effects if called with unexpected parameters. So it really helps to write tests here.
SWFDEC: WARN : swfdec_as_interpret.c(1316): swfdec_action_new_object: Sound is not a constructor
It looks like an object isn't implemented at all. So I do the same thing as above. I implement it, then run player/swfplay to see which functions on the object are used and implement those.

If I managed to implement all the functions that needed to be implemented and it still doesn't work, then the hard work starts. That's where I launch player/swfdebug and step through the code looking if what it does is sane. Swfdebug is a nice little tools for debugging Flash files that unfortunately is a little crashy and accumulates features as I need them. There's also some tools in the test/ directory that help understanding particular Flash files, in particular test/dump that dumps information about the static content of a file (run with -v for maximum output) or test/swfdec-extract that can extract contents of Flash files to png or svg and I think it even extracts audio these days.

And when I'm finally done doing all this, I have one more file to play with. And most of the time I also know 3 more places that need serious refactoring...

Syndicated 2007-06-02 08:40:58 from Swfblag

59 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!