CodeShop

Code for all

C++ iPhone development with Bjam

September 28th, 2008

Just got myself an outdated iPhone and a 2nd hand MacBook!

I’ve been toying with these two goodies for the last day and they are some funky goodies to get your hands on. Of course the most fun is to write your own stuff for it.

Part of the challenge is to not use the XCode IDE provided by Apple, but instead use automated command-line tools. Basically I want to stay away from the IDE and the objective-c. We’re going to use the boost-build system (bjam) and use as much plain C++ as possible.

Compiling and linking of an iPhone application is working fine. The next part is to get the application to run on the iPhone Simulator and/or the actual iPhone. The difficult part here is to get all the code signing, provisioning, packaging and copying in place.

I’ll keep you posted. If you’re doing something similar, then drop me a comment.

Arjen

H264 Compressed Meta-Data

September 20th, 2008

We’ve written this nice Lighttpd plugin mod_h264_streaming which is being picked up by numerous sites. It enables progressive streaming and seeking for H264 encoded videos in Flash.

One of the issues raised is that when a user jumps forward in a long video the time it takes to restart the video at that position takes too long. The reason why this happens is that the Flash player doesn’t support seeking into a video which has not been buffered yet and so the plugin sends a newly patched video file. Unfortunately the meta-data can take up quite a bit of space (say 750KB for a 30 minute video), so when your bandwidth is 150KB/s, the metadata alone would take 5 seconds to download.

There are a few things we can do about this, and one is compressing the metadata. This is a perfectly viable option and supported by most tools (Apple Quicktime, mplayer, etc…). So ahead I went and added this feature to the mod_h264_streaming plugin. After successful testing and seeing the metadata shrink by 50% to 75% I was in a really good mood. This meant the seektime of a 30 minute video would go down from 5 seconds to about 2 seconds! A job well done.

Surprise!

The flash player doesn’t support compressed metadata. Time to talk to your local Adobe representative and issue a feature request!

Hungary

September 8th, 2008

Action Man says ‘Long live Apps Hungarian!’ – no arguing with him:

But saying ‘I need the ‘p’ prefix because

1
2
 
if (size == 0) and if (pSize == 0)

are different is wrong: best look @ your variable names …

(The picture came from Sutters blog).