The Playback Machine

stephen on 2005-02-28T05:43:34

In a previous entry, I talked about the Playback Machine, a "television station in a box" system I've put together to animate the convention TV feed for BayCon. Well, after about two years of on-and-off work, it's finally ready-- or at least working reliably.

Of course, it has only a subset of the features I originally envisioned for it-- but that's mostly because those features proved a poor match. It's enough of a challenge getting the basic features working.

And the basic features are:

  1. Being able to schedule a movie for a particular time and have the system play it back at that time.
  2. Playing short movies and slides whenever nothing else is playing.
  3. Stability-- we need to play content nonstop for three days.


Simple enough stuff, it seems, but to do this I've needed to write a Perl interface to Xine, a simple X fullscreen interface, and integrate Imlib2 and POE with both of those. I've needed to write an object system that automatically calculates the appropriate amounts of time to play different types of fill content. Not a lot of ground-breaking CS research here, but some exacting busy-work if nothing else.

My current roadblock: playing music alongside slides. I display the slides using X and Imlib2 and control all scheduling with POE. My original plan was to use SDL to play background music, but something about my POE functions do not sit well with SDL. I'm suspecting that POE's and SDL's select() or alarm() calls are interfering somehow, but can't confirm this.

My current solution is to fork off a subprocess that plays the music using SDL. Irritating, though, since in having a subprocess I'm at an increased risk of the music keeping playing when a movie is going on.

Wish me luck...

Update: Eventually, I wound up using Xine itself as a music player. I essentially restart Xine with a null video driver and play only audio. It has the advantage of not requiring any additional packages. Playing Xine also seems slightly more reliable.