From within the MPD application, I would like to access a Linux Named
Pipe FIFO that has been created in a second application. The second
application would place a STOP command into the Name Pipe, when
appropriate. I would like to insert code in MPD to then monitor this
Named Pipe for the STOP command and act on the command as though it was
sent from an mpd client.
I believe that I understand the basic operation of command handling in
MPD, so that I have an idea of how I might accomplish this. But I don't
understand it fully and could use some guidance.
player_task() is the PlayerCommand handler. When a client command has
been received, the player_task runs to allow the command to be acted
on. When command is fully acted on , the PlayerCommand is set back to
NONE. The player_task then blocks and waits for receipt of next client
command, before unblocking and repeating the same command handling process.
If this is correct, I believe I would like to place the additional code
to monitor the Name Pipe, in the part of the MPD code that is waiting
for a client command. At that place in the code, I would read the
Named Pipe for STOP command and upon receipt, set PlayerCommand to STOP,
just a though it was received from an MPD client. *My problem is that I
can't find where in the MPD code it is waiting for the client command*.
Any advice on my understanding/approach, or where to look in the MPD
code would be much appreciated.
MPD version: mpd-0.20.9
This email has been checked for viruses by Avast antivirus software.
mpd-devel mailing list