Icecast Server/Events: Difference between revisions

From XiphWiki
Jump to navigation Jump to search
(Initial stub)
 
(Update: Added basic list of events)
Line 8: Line 8:
== Overview ==
== Overview ==
Icecast 2.5.x features an event subsystem. This subsystem is used to deliver information on certain events that happen within the server to backends. In it's nature it is very similar to the auth subsystem. However in contrast to the auth subsystem it cannot modify the server state in any way. This makes it much more performant at the cost of slightly less usecases.
Icecast 2.5.x features an event subsystem. This subsystem is used to deliver information on certain events that happen within the server to backends. In it's nature it is very similar to the auth subsystem. However in contrast to the auth subsystem it cannot modify the server state in any way. This makes it much more performant at the cost of slightly less usecases.
== List of events ==
{| class="wikitable"
! event !! Context !! Description
|-
| <code>icecast-start</code>  || Global || Emitted when Icecast has been started up initially.
|-
| <code>icecast-stop</code>  || Global || Emitted as part of Icecast's shutdown.
|-
| <code>icecast-active</code> || Global || Emitted when Icecast is active (has sources connected).
|-
| <code>icecast-idle</code>  || Global || Emitted when Icecast is in idle (no sources connected).
|-
| <code>source-connect</code> || Source || Emitted when a source enters running state.
|-
| <code>source-disconnect</code> || Source || Emitted when a source is shut down.
|-
| <code>source-flags-changed</code> || Source || Emitted when a source experiences changes of it's flags. This might be for internal and external reasons.
|-
| <code>format-metadata-changed</code> || Source || Emitted whenever the metadata on the format level changes.
|-
| <code>dumpfile-opened</code> || Source || Emitted when a dumpfile was just opened. At the time this is emitted any operations on the dumpfile as per the operating systems specification on open files are allowed. This usually includes renaming the file and moving it between directories on the same volume.
|-
| <code>dumpfile-closed</code> || Source || Emitted when a dumpfile is closed. **Note:** At this point Icecast knows hardly anything about the dumpfile anymore. So not all information is available to handlers of this event. Any operation should be done via <code>dumpfile-opened</code> whenever possible.
|-
| <code>dumpfile-error</code> || Source || Emitted when a dumpfile cannot be opened for any reason. See also <code>dumpfile-opened</code>.
|}

Revision as of 01:56, 18 April 2023

Events

Overview

Icecast 2.5.x features an event subsystem. This subsystem is used to deliver information on certain events that happen within the server to backends. In it's nature it is very similar to the auth subsystem. However in contrast to the auth subsystem it cannot modify the server state in any way. This makes it much more performant at the cost of slightly less usecases.

List of events

event Context Description
icecast-start Global Emitted when Icecast has been started up initially.
icecast-stop Global Emitted as part of Icecast's shutdown.
icecast-active Global Emitted when Icecast is active (has sources connected).
icecast-idle Global Emitted when Icecast is in idle (no sources connected).
source-connect Source Emitted when a source enters running state.
source-disconnect Source Emitted when a source is shut down.
source-flags-changed Source Emitted when a source experiences changes of it's flags. This might be for internal and external reasons.
format-metadata-changed Source Emitted whenever the metadata on the format level changes.
dumpfile-opened Source Emitted when a dumpfile was just opened. At the time this is emitted any operations on the dumpfile as per the operating systems specification on open files are allowed. This usually includes renaming the file and moving it between directories on the same volume.
dumpfile-closed Source Emitted when a dumpfile is closed. **Note:** At this point Icecast knows hardly anything about the dumpfile anymore. So not all information is available to handlers of this event. Any operation should be done via dumpfile-opened whenever possible.
dumpfile-error Source Emitted when a dumpfile cannot be opened for any reason. See also dumpfile-opened.