Hi Martin,

The short answer is that it's a bug in liquidsoap. Now for the longer
one with some background and notes for devs..

What you see with the "queue" command is actually made of two parts,
the "primary" and "secondary" queues. The primary queue contains
requests that are currently playing and requests that are being
prepared in advanced. Most request-based sources use this primary
queue to make sure they have something ready when the current track
ends. It behaves according to settings such as "length",
"default_duration" and "conservative", and usually stores at most one
track in advance and only near the end of the currently playing
request. The secondary queue is the extra editable queue that is
specific to source.equeue(). You can get more precise info about the
queue using commands "primary_queue", "secondary_queue" and
"pending_length".

In older versions of liquidsoap, you could not edit at all the primary
queue: it was a commitment that something would be ready. Then we've
added an expiration mechanism for removing stuff from the primary
queue, after discussions with Jonas who was working on the
airtime-liquidsoap integration. This mechanism is only used in the
"remove" command of request.queue(), but not in request.equeue(). This
is a bug that I'll fix real soon.

The next question you might ask is if we can insert or exchange
requests in the primary queue. It's not impossible, but tricky.
Removing requests is already more complex than it seems, because the
primary queue is still a commitment that enough data is ready to be
played. It is asynchronous: we mark the request as expired, so that
the primary queue manager tries to refill the queue with something
else, at which point the expired stuff will actually be removed; but
if this doesn't happen quickly enough an expired request might be
played.

Another question is why we keep source.queue() and source.equeue()
separate. It's probably a bad idea...

I'll keep you posted about the fix.

Cheers,
-- 
David

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to