On Mon, Feb 20, 2012 at 1:26 AM, David Baelde <[email protected]>wrote:

>
> To clarify, an icecast-compatible source client can send directly to
> an input.harbor() in liquidsoap. Moreover, an icecast-compatible
> listener client can connect directly to an output.harbor() in
> liquidsoap.


OK that's handy. Might be a good recipe to post :-)
So this works for simple transcoding:

s = mksafe(input.http("http://whatever.com/aac",autostart=true))
output.harbor(%mp3,port=8000,fallible=false,mount="mp3",s)

Then tune your listener to http://myserver:8000/mp3
mksafe() lets me connect the receiver and I don't have to press play if
case the input dies.

I'm not really getting the callbacks however. I try:

s = mksafe(input.http("http://whatever.com/aac",autostart=false))

def on_connect() =
  log("connect to stream...")
#  source.init([s])
end

def on_disconnect() =
  log("disconnect from stream...")
#  source.shutdown(s)
end

output.harbor(%mp3,on_connect=on_connect,on_disconnect=on_disconnect,port=8000,fallible=false,mount="mp3",s)


And I get:

At line 18, char 41:
  this value has type
    ()->_ (infered at line 8 char 1 - line 11 char 3)
  but it should be a subtype of
    (headers:_,...)->_

And are source.init() and shutdown the right way to stop/start the input
http stream?





>
> > single() does too much error checking on the file so if I do:
> > mkfifo /tmp/shairtunes.pcm
> > then run liquidsoap with:
> > s = single("/tmp/test.pcm")
>
> In fact I now see what's wrong with this approach. Liquidsoap first
> reads the data for checking it, but then the data is gone when time
> comes to play it for real. Therefore the request model really can't
> work with pipes. Still, we should be able to do more than what we
> currently have, avoiding dd, allowing the decoding of other formats
> than PCM if a mime-type is passed, etc.
>

That would be a nice addition. At this point it's good enough because
shairtunes needs debugging

>
> Cheers,
> --
> David
>
>
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to