I think that is interesting but maybe in the long term.
Anyway thanks for the help, i could manage to make a simple on demand player
(with the same source always) like this:
It accepts a telnet and streams with the name that the telnet command sent.
In a actual application probably one would get the source as the argument or
something like that.
-------------------------------------------------------------------------------------------------------------------------------------------------
#!/usr/local/bin/liquidsoap
set("server.telnet",true)
set("init.force_start", true)
def playOnDemand(name)
s=mksafe(playlist.safe(mode="normal","/home/fabio/Desktop/musicas/so0.pls"))
output.harbor(mount=name^".ogg",buffer=1024,burst=1024,port=8000,%vorbis(mono),s)
"ok!"
end
server.register(namespace="tests",usage="playOnDemand",description="","pod",playOnDemand);
--------------------------------------------------------------------------------------------------------------------------------------------------
Thanks for the help it was a nice experimentation
Em 24 de outubro de 2011 11:44, Romain Beauxis <[email protected]>escreveu:
> 2011/10/24 Fábio Costa <[email protected]>:
> >> One output.harbor can encode for multiple listeners. However, once
> >> created, it runs like a normal icecast source, that is listeners who
> >> connect to it get the stream at the point that it is currently being
> >> encoded and not from the beginning..
> >
> > In a on_demand server the odds of a listener wanting to listening to the
> > same song,at the same time of another listener is practically zero.
> >
> > About the encoded streams i guess that as a user it would be nice, even
> if
> > the stream is not fully operational.
> > Maybe something like these classes:
> > AbstractBasicSource(Can't be used for transition operations but can be
> used
> > for rotate,switch etc without a transition effect)
> > |_EncodedSource
> > |_Source(The source as we have today, it can get transitions functions
> and
> > etc,will be encoded to be listened)
> >
> > But then again, LS is used for powerful stream management, and if one
> > already have the encoded streams end etc maybe creating a socket
> application
> > would be enough and the already encoded streams wouldn't be really used
> to
> > justify it creation.
>
> Liquidsoap provides a lot of useful stuff that do not require raw PCM
> data, such as scheduling, track insensitive switches, request
> resolving, various encoded outputs etc..
>
> The idea of having a raw source object is indeed tempting to begin
> implementing encoded streams. We could have operators designed to work
> with encoded stream, for instance output.icecast.raw,
> source.queue.raw, decode.raw (of type encoded -> stream) etc..
>
> However, such a change requires adding a new type to the language
> etc.., which is more in David's skills than mine. Also, we'd have to
> think about the bigger picture, for instance with regards to adding
> object-oriented programming, which has also been discussed: a source
> variable could also have something like a "get_encoded" method, which
> pulls out encoded data, and "get_pcm" which pulls out PCM data..
>
> Romain
>
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users