[Icecast] Prefered way to check if mountpoint is in use
phschafft at de.loewenfelsen.net
Fri Dec 10 00:27:20 UTC 2021
On Thu, 2021-12-09 at 23:39 +0100, tyctor wrote:
> hi icecast masters
> i have question what is prefered way to check if icecast mount point
> is in use. what i want to achieve is to start source ezstream as soon
> as mount point is free.
> probably i have two choices:
> - check icecast status and parse response
Parsing the status page is *always* *wrong*. If you you would want to
access status data just use the API.
> - connect directly to omunt point with PUT request and check if
> icecast response is "Mountpoint in use"
This is the 'correct' way. There is no point in checking first beside
creating an extra race condition and more ways for the check to go
> which way is prefered? or is there another way how to do it?
Generally I would suggest to have a look at <on-disconnect>,
"mount_remove" option for URL auth, as well as the "source-disconnect"
event (Icecast 2.5.x).
Those can provide triggers.
However keep in mind that Icecast is multi-threaded as well as your
operating is multi-tasking so it might take a few extra milliseconds
before the mountpoint is ready to be mounted again.
> is ok if i repeat this check once per second?
Icecast can work with that. But see above.
> i have also defined fallback mount point to avoid client
> disconnections where short loop is still playing is it proper way how
> i doing it?
I just wonder why not just send the backup signal to the fallback all
With best regards,
Philipp Schafft (CEO/Geschäftsführer)
Telephon: +49.3535 490 17 92
Löwenfelsen UG (haftungsbeschränkt) Registration number:
Bickinger Straße 21 HRB 12308 CB
04916 Herzberg (Elster) VATIN/USt-ID:
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 228 bytes
Desc: This is a digitally signed message part
More information about the Icecast