Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Alternatives to SDL

by Joost (Canon)
on Feb 06, 2007 at 21:07 UTC ( #598639=note: print w/replies, xml ) Need Help??


in reply to Alternatives to SDL

If you just want to play songs one after the other, you might be better off using a stand alone command line player like mplayer it plays very nearly everything if you've got the right codecs.

Another option is gstreamer, which is the gnome media playing framework. It has a perl API and should also play a lot of different formats, but you might have to work your way through a lot of non-perl documentation to get it to work.

update: as for imaging, if you're going with GStreamer, GTK2 will probably integrate nicely and it has the nice TK2::Canvas Gnome::Canvas interface that will let you do nice looking structured drawing.

Replies are listed 'Best First'.
Re^2: Alternatives to SDL
by zentara (Archbishop) on Feb 06, 2007 at 21:15 UTC
    I would probably go with Tk::Zinc myself, for the simple reason that it has scalable text, i.e. you can make the text objects zoom to size with the other items. The Tk canvas and Gnome2::Canvas can't do that, you need to switch fonts. Zinc also supports alpha layers so you can make cool buttons and effects.

    I'm not really a human, but I play one on earth. Cogito ergo sum a bum
      Scaling text isn't that big of a deal as I wasn't doing it anyway, but alpha layers, I was playing with a bit, though that in itself can be quirky in SDL. All things being equal, I'd rather have more options rather than less.

      But either way, it's not a deal breaker/maker as I'm trying not to make it too busy and KISS as it's for the car. The big thing is if I can get enough control over the events for handling the touch inputs the way I want.

      Thanks for the suggestion, I'll look into them both.

      -Lee
      "To be civilized is to deny one's nature."
      Looked into Zinc a bit, while I think especially with the animation issues, it might not be ideal, it's pretty damn sweet. Considering the UI is pretty close to vector to begin with, it's tempting.

      -Lee
      "To be civilized is to deny one's nature."
Re^2: Alternatives to SDL
by shotgunefx (Parson) on Feb 06, 2007 at 21:25 UTC
    CMD is out. It's a touchscreen interface for my car (eventually a digital dash as well, but these issues have been holding that at a standstill).

    Non-perl docs is not a big issue, much of SDL isn't documentated and had to spend a good deal of time in the C docs for it anwyay.

    Most of what I'm doing on screen is just blitting sprites (and managing the animation frames), and some TTF text. I had some OpenGL aspirations, but at this point, that's on the far horizon.

    -Lee
    "To be civilized is to deny one's nature."
      CMD is out. It's a touchscreen interface for my car
      What I meant was, you could fairly easily control a command line player from perl using whatever GUI you want*. Unless you need very tight control, you don't have to run the audio stream through the perl process.

      * for example, mplayer has single-key commands for almost every action. it's probably not very hard to wire that to a perl program.

        Gotcha, still out though. Yes, I want it fairly tight, one of the reason I dumped XMMS. In all fairness, it worked quite well for the most part, but occasionally it would lag too much which would make the interface sluggish and a bit unintuitive. For instance, anything that modified the playlist would take forever, (sometimes more than a minute).

        I suppose I could just use it to play and manage the playlist myself, but detecting song changes was hacky. I figured if I could just use SDL and SDL::Mixer, I could have a fairly portable solution. :\

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://598639]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2021-12-04 02:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (30 votes). Check out past polls.

    Notices?