XMMS InfoPipe Patch Treasure Trove

Here we have various patches for XMMS InfoPipe.

Since I'm not really maintaining XMMS InfoPipe anymore, here are just some of the hacks people have sent me over time. These were just found lying around in a forgotten directory on email server... so here they are now. =)

I'll probably add more of these if I find them.

Some of these are undoubtedly already in XMMS InfoPipe dist itself, but hey...

Da Fox's infopipe.c

This will replace infopipe.c, and hopefully fix my infamous "damn, this guy didn't know damn about Unix or concurrent programming" style implementation once and for all. =) This is a drop-in replacement for infopipe.c. See also related thread. Regarding the usage, the author writes:

The new protocol however does operate in a slightly different fashion then the old one. There are now 2 pipes needed, one the 'original' xmms-info pipe, and a second which the application which is to request data should create it self. The application then write()s a string consisting of a command type and the full path to it's own pipe to the xmms-info pipe. For example aMSN would write "0:/tmp/amsn-pipe" to "/tmp/xmms-info". Upon receiving this command string (and this now happens in a true blocking manner, although a bit hacky: it used a blocking read() call on the xmms-info pipe which xmms-infopipe has itself open for writing) the command is parsed, and a second thread as started to handle this request. This new thread uses a blocking write() to write to requested data to the other pipe, then ends itself.

I don't know if this short explanation is very helpful in clarifying what I mean, so I'll just give a short example of the intended use:

dafox@shogoki /tmp $ mknod myfifo p         # creates a fifo named myfifo
dafox@shogoki /tmp $ echo 0:/tmp/myfifo > xmms-info         #writes the command
dafox@shogoki /tmp $ cat /tmp/myfifo         #myfifo is filled by xmms-infopipe, read it
XMMS protocol version: 2467
InfoPipe Plugin version: 1.3
...

[Up] [Main] [Weyfour WWWWolf]

Last Modified: $Date: 2006-09-30 19:47:43 +0300 (la, 30 syys   2006) $