
XMMS InfoPipe
=============

Written by Urpo Lankinen, 10 - 11 December 2000
Distributed under GNU GPL (see COPYING for details).


This plugin consists of two parts:

   - The XMMS plugin, written in C, that opens a named pipe to
     /tmp/xmms-info (or other configurable location). When read from
    there, it just returns plain text that has information about currently
    playing song.

   - Some random scripts that serve as an example of how to parse the
     data. The package includes mod_perl and PHP scripts for
     showing information on web pages, and a script to say out loud
     the name of the song being played.

This InfoPipe thing was my original idea, though I'm sure people have
thought of this before (I think this may be clever if you stretch the
term, but not *that* clever... =) I was surprised when I couldn't find
an XMMS plugin that would have provided this functionality.

For building information, see INSTALL.


Requirements
------------

 - Some sort of UNIX =)
 - XMMS 1.x and all build stuff on thereof (to use you just need the
   binaries, of course!)

In Debian GNU/Linux, you need the xmms-dev package (and everything
related to it) to build this.


Output description
------------------

"OK, enough hype. Time for the 'meat'." =)

The plugin creates a socket called /tmp/xmms-info_(username).(sessionid)
and, if possible, a symbolic link to it called /tmp/xmms-info.

In case you didn't know, sockets can be read from, as if they would be
files. The output has just textual information.

Here is what it looks like:


$ cat /tmp/xmms-info
XMMS protocol version: 2467
InfoPipe Plugin version: 1.2
Status: Playing
Tunes in playlist: 245
Currently playing: 95
uSecPosition: 33117
Position: 0:33
uSecTime: 300000
Time: 5:00
Title: Skyflight. (Annex: AmigaOS 3.9)
File: /usr/local/lib/music/mp3s/gripped/AmigaOS/skyflight.ogg

Description of the fields:
   - Protocol version: What XMMS reports as its version. This is
     mostly "Internal Use Only"; I don't know if this information
     can be used to figure out the version of XMMS.
   - Plugin version: The version you're using...
   - Status: Can be "Playing", "Paused" or "Stopped".
   - Playlist information. Current tune and total number of tunes.
   - Position and Time: Current tune playing position and total length
     of tune in minutes:seconds format.
   - uSecPosition and uSecTime: ditto, in milliseconds.
   - Title: The song title as reported by XMMS.
   - File: The filename of the song.

This format is hopefully easy enough to parse with even stupidest Web
development languages, and is pretty much trivial to parse with Perl
(then again, what *isn't* trivial to parse in Perl? =)
