Tumbled Logic

Apr 13 2009

Evolution of the Species

I started a new project recently: a fork of Apple’s Darwin Streaming Server (the ugly step-brother of the QuickTime Streaming Server that ships with Mac OS X Server).

The thing about DSS is that Apple has pretty much given up on trying to expend any efforts in keeping it portable; they ‘welcome’ patches for portability (i.e., people attach them to Trac tickets, and they may or may not appear in the next release, which has no fixed timeframe), but by all accounts Apple just don’t have the resources to do it themselves.

This is a shame. Not everyone has money to burn on dedicated Xserves and Leopard Server, especially when Linux, BSD or Solaris servers are two-a-penny to rent.

My github repo contains two branches: upstream (which is the original, unadulterated source from Apple) and master, which is my patched up version. I did most of the grunt work in getting the core server built on Linux before I realised that people were actually submitting patches to Apple. Oh well.

I’ve taken a slightly different approach, though: beyond doing the bare minimum to get the thing up and running, I’ve started to revamp the build logic. DSS’s Builtit script is, frankly, a travesty masquerading as a build system, and there’s an awful lot of platform-specific stuff which could easily be feature-specific instead. Moreover, the whole thing installs to locations which are… less than ideal for most people, and it’s a pain in the rear for a package maintainer to deal with.

My master branch contains:

  • GNU autotools-driven build logic, with installation into sensible locations below ${prefix} on non-Apple platforms (e.g., configuration files live in ${sysconfdir}/dss/ rather than /etc/streaming). The autotools logic should produce useable thin binaries on Darwin and Mac OS X, installing to /Library/QuickTimeStreaming, though I’ll be adding a configure argument to allow installation to custom locations.

  • Updated Xcode project, with native targets converted from the old Jam targets. As the configure script will spit out a few new preprocessor definitions, the compiler flags in the Xcode project have been tweaked to suit.

  • Various patches so that the code actually compiles on anything that isn’t Mac OS X: not only did it assume a case-sensitive filesystem, but it also assumed the presence of certain BSDisms and some Mac OS X frameworks. Fortunately, these were relatively easy to work around. My branch builds (and runs) on both 32-bit x86 Linux and OpenSolaris. 64-bit builds will come soonish.

Although I’ve been running the Linux build 24/7 on my network here since I built it, there are lots of things missing—all but one of the dynamically-loaded plug-ins (the statically-linked ones are all present and correct, with the exception of QTSSDSAuthModule, which is Mac OS X-only); most of the command-line tools; the web admin interface. In other words, the streaming server itself, one of the plug-ins (QTSSRefMovieModule) and the PlaylistBroadcaster tool. This isn’t because I can’t make the rest work, incidentally, it’s just a matter of time.

Once I’ve got everything built and am happy with stability, I’ll start throwing some tarballs up, and quite possibly rules for building Debian and Solaris packages.

I do have some things I want to do to extend DSS, though in an ideal world I’ll end up putting these in a separate branch so that they can be built against the stock code as well as my fork. More about those as they happen.


blog comments powered by Disqus
Page 1 of 1