Hi all !
So I now have a working like s4shout GUI for liquidsoap. Features are:
- add/remove a server (server, port, password) in the link list.
- start / stop for the selected link.
- link status are updating every x second
- if liquidsoap crashes (or the computer is rebooted), at launch time,
s4shout reads its XML config file and populate the link list from scratch.
. I know have to face following problem:
* When s4shout adds a "link", it sends to liquidsoap (by a telnet socket):
dynamic_playlist.start pulse|server|port|password|XXXXXX
where XXXXXX is a UUID representing the "link" unique ID. Then in the
.liq script I am using:
output = out(id="#{stream_id}", host="#{stream_host}",
port=int_of_string("#{stream_port}"), password="#{stream_password}", s)
Note that I have also added start=false in the output properties, so
liquidsoap doesn't try to start a connection by himself.
What I don't understand is if the connection fail, liquidsoap retry
every 3s ... but I haven't specified any "restart" properties and it
seems to be "false" by default ?
While liquidsoap is in this "retry every 3s" loop, the status of the
link is still "on", which is logical assuming "retrying" being kind of
"started"... So the question is again: what's the best practice ? Do
you think I have to handle re-connection from s4shout ? in which way ?
Thanks !
Le 20/05/2011 12:32, Martin Hamant a écrit :
> Hi All !
>
> I wrote a starting small minimal client interface in python /
> gtkbuilder that will permit to control liquidsoap, and in particular
> to link a local soundcard source to a shout/icecast server. this week
> I focused on the interface: it has one "add" button that pop a "server
> info" dialog (host,port,password) , then adding it to a listview.
> Additionally I wrote XML functions that permit to store each link info
> to a local file (ie: password ?)... see below.
> I am asking myself what would be the best practice next ? :)
>
> * to consider the local XML file as a "backup" file. If liquidsoap
> crash, all links info are still available. Maybe implement something
> that compare local and remote config data ? How to sync local client
> and remote data ?
> * s4shout connects to liquidsoap at launch time and retrieve current
> links status. (but how to retrieve server name, password and metadata
> for a given link from the telnet interface ? ).
> * s4shout display current active and inactive links, with name and
> port in the listview.
> * Adding a link from s4shout: adds the link to the local XML file ? On
> "connect" event, send the "add" command (type
> "soundcard_source|host|port|password") to liquidsoap for this link.
> for metadata, s4shout could send it afterward using a liquidsoap
> dynamic function for the link.
> * Remove a link from s4shout... first removing it from liquidsoap ?
> (how to recognize it in liquidsoap thru telnet ?) the remove XML entry.
> etc etc
>
> Seems a lot of work's coming, don't you think :) ?
>
> Martin
>
>
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users