Unix Programming - non-blocking pipe or pipe-on-demand

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > March 2007 > non-blocking pipe or pipe-on-demand





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author non-blocking pipe or pipe-on-demand
CptDondo

2007-03-21, 1:25 pm

I've been trying to figure out a way to pipe internet radio to my MythTV
application.

In a nutshell, I have an internet source that streams mp3 radio. I can
play it with mplayer.

I would like to tell mplayer to output to a pipe, so that MythTV can
then play it as an mp3 thorugh one of its standard players and via its
standard menuing system. (I know I can play it via whatever player -
but I really want it to play as a standard Myth source, and use the Myth
visualizations.)

The problem is that pipes block. I don't think that there is a way to
create a pipe where the sender can send even if the other end is not
connected.

So....

Is there some neat way to either a) have all the digital bits get sent
to the bitbucket in the sky if the other end of the pipe is not
connected, or b) set up a pipe-on-demand where a daemon opens the pipe,
and when the connection is made, it invokes whatever streaming program I
want?

I suspect b) is doable - a shell/perl/whatever wrapper around mplayer -
but a) would be cleaner.

--Yan
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com