2009-03-20
As a fan of podcasts, I use Thomas Perl's wonderful gpodder to download and keep track of my podcast subscriptions. In the spirit of UNIX, gpodder does one thing and it does it very well. Unfortunately, for me, gpodder does not actually play the podcasts that it downloads. That responsibility is handled by a user selected application in gpodder's preferences.
The machine that I actually run gpodder on is a headless unit that is connected to my home entertainment system and I need to access the machine through SSH with X11 forwarding. This causes a problem for some graphical audio playing software and results is very glitchy playback. The solution to the problem is to use a command line audio player like mplayer. (Un)fortunately mplayer is borked on the media machine so I had to write my own audio player.
[cue the trumpets]
May I present to you, SAP a Simple Audio Player written in Vala utilizing gstreamer and ncurses. What does it look like?

beautiful!
One of the issues with using ncurses in a gobject environment is the necessity of two mainloops; one for gobjects and one for the ncurses interface. The solution for me was to create a gobject class for the ncurses interface and run the ncurses mainloop as a thread. This allowed for user input collected by ncurses to be passed to other gobjects by signals.
The machine that I actually run gpodder on is a headless unit that is connected to my home entertainment system and I need to access the machine through SSH with X11 forwarding. This causes a problem for some graphical audio playing software and results is very glitchy playback. The solution to the problem is to use a command line audio player like mplayer. (Un)fortunately mplayer is borked on the media machine so I had to write my own audio player.
[cue the trumpets]
May I present to you, SAP a Simple Audio Player written in Vala utilizing gstreamer and ncurses. What does it look like?

beautiful!
One of the issues with using ncurses in a gobject environment is the necessity of two mainloops; one for gobjects and one for the ncurses interface. The solution for me was to create a gobject class for the ncurses interface and run the ncurses mainloop as a thread. This allowed for user input collected by ncurses to be passed to other gobjects by signals.
Comments