Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Auto-DAC Automotive Media Player

by shotgunefx (Parson)
on Nov 26, 2006 at 22:23 UTC ( [id://586164] : CUFP . print w/replies, xml ) Need Help??

I realize this is not typical CUFP, as there is no code yet, but thought some of you might find it interesting none the less.

It's the media player I've written for my Car PC. It's Perl obviously, using SDL and XMMS. It's skinable, using HTML and all buttons that can change are created using animated GIFs. Most buttons have context to keep the touchscreen interface simple and intuitive. For instance, the REW/FWD buttons do double duty. A short press advances, rewinds the playlist, but a long press let's you scan around the playlist.

The Play/Pause button actually performs Play/Pause/Stop/Queue depending on the context. It's much more intuitive than it sounds.

Why no code? Well it's been a very need-driven development. Lot's of lava flow. At some point in the next few months I'm going to try and refactor it into an application framework. How far I want to take it, I don't know. I really wish there were widgets in SDL. Once that happens, I'll be releasing at the very least, the modules if not the source for the player. As far as the scope of such a project, I don't know. I'd like some basic widgets, but a full blown windowing API is probably beyond my desire and time to develop and maintain.

Logo Image

Scaled down screenshot.

There are two vids so far, the touchscreen is moving so much because it's not mounted in the car. Rather sloppily onto a monitor stand for ease of development (ie: It's cold out). The broken hand isn't helping dev time :(

Videos Video 1

Video 2 (playlist que)

Anyway, comments, good or bad are welcome.

"To be civilized is to deny one's nature."

Replies are listed 'Best First'.
Re: Auto-DAC Automotive Media Player
by cosimo (Hermit) on Nov 28, 2006 at 10:20 UTC
    These days, I was thinking to stick a cool thing like that in my house, with a 7" touch screen. Please post your code! Perl + SDL: Cool!
      Thanks, Once I get some time to clean it up, at least, most of it will be released. Right now I'm working on several issues, the main being SDL::TTFont->width() leaks like a sieve. I've worked around it be measuring the width of every character for each font/size combo and saving it in a hash, not pretty, but it works til I figure out the real source, the perl XS side or the SDL side.

      The application loop is pretty simple. Each button is loading into a hash of widgets, the name of the button matches the name attribute in the skin. Each button has subs that are called by the event handler. MOUSE_DOWN, MOUSE_UP, WHILE_PRESSED, OFF_RELEASE, DRAW_HANDLER

      All buttons that are active have more than one frame (animated Gifs, but could be a series of BMPs with some tweaking of the skin code), the value of the widget is an index into the frames.

      Currently, widgets can't overlap and seeing this is designed mainly for a touchscreen interface, I don't see a need for that to change. Though I'll probably add the concept of layers so I can pop an onscreen keyboard on there.

      "To be civilized is to deny one's nature."
Re: Auto-DAC Automotive Media Player
by keymon (Beadle) on Nov 29, 2006 at 15:28 UTC
    Tres cool!

    Can you post more about the hardware too?

      • Dell Inspirion 8600 with the small docking station.
      • A PAC Turbo linedriver to drive the amp from the pc, no headunit
      • Runs Debian etch
      • Shift Mouse(Custom, my favorite mod, how it should work OEM)
      • Holux GR-213 GPS
      • Philips based PCMCIA video cap card (for my car cams)
      • Lilliput 8" TS (daylight visibility is still an issue, but I think I've got a workround)
      • TS has 3M Privacy film which does a great job of hiding it from theives when you're driving about.
      • Security VCR in trunk (serial controlled)
      • Keyboard in armrest (Still fabing the swivel and hinges)
      • Infrared Illuminators (half done)
      • RGB Lighting system)
      • Cameras mounted front and rear (rear on servo)
      • OpenECU 1.3 cable (real time tuning and diagnostics) 200 samples a sec vs 5 using OBDII
      • Pic 16F877A based sample board to read the cluster lights and other stuff not avaible from the ecu

      Half done or coming soon:
      Digital Dashboard (hence the need for two heads under X)
      Sirius (PC controlled)
      Digital HVAC control
      Servo Controlled Driving lamps

      A ton of other stuff I'm forgetting. Too many projects LOL
      updateLink fixed

      "To be civilized is to deny one's nature."