OKAY, my bad, sorry for the spam... I understand now ! a dummy source should exist, simply because it has to exists. So simply add:
output.dummy(blank()) I did that the first time, but I forgot "-t" argument on the command line I was not able to connect to the telnet interface... So I detucted "it doesn't work" .... grrrr :) Thank you again Romain. I'll keep the list informed because I can feel this project could be a useful tool. Le 12/05/2011 12:30, Martin Hamant a écrit : > output in a output, it makes no sense, sorry :S > > I should be something more like > > out = output.dummy(blank()) > > But really I am bit lost :D > > Le 12/05/2011 11:37, Martin Hamant a écrit : >> Hello Romain, >> >> Thank you for this detailed answer ! >> I read the documentation section you specified >> (http://savonet.sourceforge.net/doc-svn/dynamic_sources.html) >> I tried a dry test by copy/paste of the code, adding a dummy source >> parameter like this: >> >> out = output.icecast(%mp3, >> host="test", >> password="hackme", >> fallible=true, >> output.dummy(blank())) >> >> Gives the following error >> >> At line 19, char 15: >> this value has type >> source(_) (infered at line 6 char 21 - line 10 char 25) >> but it should be a subtype of >> (_)->_ >> >> What am I doing wrong ? >> >> >> Le 10/05/2011 17:05, Romain Beauxis a écrit : >>> 2011/5/10 Martin Hamant<[email protected]>: >>>> Hi everybody, >>> Hi Martin! >>> >>>> Here is the context of my questions: At our company SOUND4, we are >>>> designing professional broadcast sound cards (voice and FM >>>> processors). >>>> As our products are going to be driven by linux in a next future, I am >>>> looking for a simple method (ie: third party software, not packaged >>>> within our product) that would provide to our customer a way to add >>>> their own ice/shoutcast stream links from the computer which host the >>>> soundcard (the audio driver is alsa compliant). >>> That sounds great! >>> >>>> By now we are pointing >>>> our customer to edcast, as they are using windows hosts - problem - >>>> such >>>> a software doesn't really exist in this way under linux... there are a >>>> few GUI like darksnow/darkice but it doesn't really do the trick: we >>>> need the customer to be able to add a output link in a dynamic way >>>> (without interupting, mostly). My first question is: >>>> >>>> - is there a way to give to liquidsoap a list of outputs (ie: a file) >>>> that would be checked periodically, and when a new output "server" is >>>> discovered in this file, a new connection is initiated to it. >>> Yes! In the recent hg trunk, we have a support for dynamically >>> creating/destroying new sources and output. It is supported by the >>> scripting language so you may be able to fit it to your own needs. In >>> your case, it could be: >>> * A regular tasks started using add_timeout that periodically checks >>> your file and behaves according to your convention >>> However, you may also implement it as a push: >>> * When the client clics on a button, a telnet/server command is sent >>> to liquidsoap to create/destroy an output. >>> >>> There is some documentation online about this functionality there: >>> http://savonet.sourceforge.net/doc-svn/dynamic_sources.html >>> >>>> - second, is there a way to get the network status of a given link >>>> (on >>>> air time, last reconnection, transfer rate, used codec, server name). >>> * On air: yes using on_metadata be notified of any new metadata on >>> the stream. >>> * Is connected/Last reconnection: yes using the >>> on_{connect,disconnect} from output.icecast (or shoutcast) operators >>> * Transfer rate: not for now I think >>> * Used coded: if you mean it for an output, then the best is probably >>> to record that information when you create the output. >>> * Server name: same answer as above :) >>> >>>> You'll understand, the need is a simple, provide to the user a "add a >>>> shoutcast server" and "monitor the link" thing. >>>> >>>> I can feel liquidsoap could do that easily but I need starting tips. >>>> Then, I could do a simple interface to control all of that with some >>>> py/glade working (with time, because I am pretty new to python and >>>> object programming and i'll need to learn it). >>> Well all of it sounds highly possible. Concerning the interface >>> between liquidsoap and your application, you have 3 choices: >>> * Telnet server >>> * Unix socket >>> * HTTP server >>> >>> The telnet and http server require to open some network port and to >>> make sure they are protected from the evil global internet while the >>> Unix socket can be accessed locally and protected as done for regular >>> files. >>> The telnet/unix socket API was not initially meant for machine reading >>> but is not too hard to parse and should not change (we care about >>> backward compatibility). On the other hand, the HTTP server interface >>> has the advantage of being quite standard to implement in many >>> programming languages. >>> You may register your own telnet/server commands as well as HTTP >>> handles. With a recent hg, you can also export any language variable >>> to the JSON format, which makes it easier to parse in your >>> application.. >>> >>> A couple of references: >>> * http://savonet.sourceforge.net/doc-svn/server.html : Interaction >>> with telnet/unix socket >>> * http://savonet.sourceforge.net/doc-svn/harbor_http.html : >>> interaction with the HTTP server >>> * http://savonet.sourceforge.net/doc-svn/icy_metadata.html : you may >>> want to allow your user to manually update the metadatas of the output >>> stream. This can be one way to do it directly at the icecast/shoutcast >>> level. Otherwise, you may use insert_metadata. >>> >>> >>> Romain ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
