|
|
Why Pipes?
When I first wrote this plugin, I didn't know about other programs that I could've used to control XMMS with shell scripts, such as xmmsctrl or xmms-shell. However, I've kept xmmspipe alive because pipes may be preferable in some situations:
- The pipe automatically inherits the security features of the underlying filesystem (e.g. you could change its permissions so that only users of a particular group can control XMMS).
- In many programming languages, writing to a pipe is easier than executing programs, making it easier to build programs to control XMMS.
- The plugin can call internal XMMS functions which means it can have more functionality than programs relying on the xmms_remote_* functions alone. For example, XMMSPipe can load/save playlists.
Sometimes I think XMMS itself should just be an MP3-playing daemon that interfaces with the outside world exclusively through pipes (one for input, at least one for output). This would allow a lot more flexibility, e.g. the GUI could be arbitrary and playlists could be managed by an external program. (It would work in the same way gkrellm works with files in /proc.) Also, the code would be simpler because it only has to worry about reading various audio formats and playing them. It wouldn't have to deal with window managers, X, etc.
A quote from Doug McIlroy:
This is the Unix philosophy. Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface.
and one from Rob Pike:
There has been much talk about component architectures, but only one true success: Unix pipes.
Applications
I use this plugin to control XMMS with my Creative RM900 remote control. (There's also a standalone plugin for this, but it's not suitable for me because I use the remote control with several different programs.) I've heard it's being used for a few other tasks, such as binding XMMS functions to certain keys on a Logitech keyboard, to control XMMS via the web, and run a DJ system.
Output Pipes
Thanks to Jeremy Schaeffer, since version 0.5.0 xmmspipe has output pipes, allowing new applications.
For example, included is a demo program called "fade", that shows how to use the plugin to fade the current song and advance to the next one. It requires the output pipe to be be enabled (via the Config window).
The Infopipe plugin hsa related features.
Notes
XMMS is obsolete, thus I intend to restrict future work on this plugin to bugfixes and other minor changes.
One of my favourite XMMS skins is Chris Carey's YummiYogurt skin.
Sign in to add a comment
