Le 31/05/2011 15:21, David Baelde a écrit :
> Hi,
>
> Normally, the identifier should be removed from the server interface
> after you shutdown. We had a few bugs (and I identified one more
> recently, not committed iirc) where that specification wasn't met. In
> your case, you're saying that a playlist doesn't unregister from the
> server when shutting down? One the bug is spotted it's really easy to
> fix.
Yes it unregister but there is a small amount of time right after the
command (which returns "done!") that I suspect the process is still
unregistering it. I suspect that because when I am removing a playlist
then adding it another with the same ID *right after*, liquidsoap
creates the playlist with a trailing ".1". If I wait like 200ms before
adding again the playlist, it works like excepted.
So I can't rely on the "done!" return value, to be my test criteria....
Or maybe I am doing something wrong.
> By the way, it may be worth clarifying: shutdown does nothing except
> for outputs (active sources, really). But when you shutdown an output,
> it unregisters from the used sources, which should trigger the
> deallocation of all resources including the unregistering from the
> server.
I'm not really sure to understand but it might be linked to my problem.
I am creating the source like this.
(source_device contains "pulse" every time for now).
def create_link(uri) =
# The playlist source
param = string.split(separator="\|",uri)
source_device = list.nth(param,0)
stream_host = list.nth(param,1)
stream_port = list.nth(param,2)
stream_password = list.nth(param,3)
stream_id = list.nth(param,4)
s = input.alsa(device="#{source_device}")
# The output
# output = out(host="#{stream_host}", port=8000,
password="#{stream_password}", s)
output = out(id="#{stream_id}", host="#{stream_host}",
port=int_of_string("#{stream_port}"), password="#{stream_password}", s)
# We register both source and output
# in the list of sources
dyn_sources :=
list.append( [(uri,s),(uri,output)],
!dyn_sources )
"Done!"
end
The rest of the script is untouched. This is the standard
dynamic_playlist example.
It makes me think that there is no real sense to rename main functions
"create_link" and "destroy_link" like I did... as we speak about
playlists...
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users