The Source / … categories contain all functions that return sources. The Input functions are those which build elementary sources (playing files, synthesizing sound, etc.). The Output functions are those which take a source and register it for being streamed to the outside (file, soundcard, audio server, etc.). The Visualization functions are experimental ones that let you visualize in real-time some aspects of the audio stream. The Sound Processing functions are those which basically work on the source as a continuous audio stream. They would typically be mixers of streams, audio effects or analysis. Finally, Track Processing functions are basically all others, often having a behaviour that depends on or affects the extra information that liquidsoap puts in streams: track limits and metadata.
Mark a function as deprecated.
Type:
('a, string) -> unit
Arguments:
(unlabeled)
(of type'a
): Old function name.(unlabeled)
(of typestring
): New function name.
Deprecated: flow is no longer maintained Register a radio on Liquidsoap Flows.
Type:
(?server : string, ?user : string, ?password : string, ?email : string,
radio : string, website : string, description : string, genre : string,
streams : [string * string], 'b
.{on_metadata : ((([string * string]) -> unit)) -> 'a}) -> 'a
Arguments:
server
(of typestring
, which defaults to""
)user
(of typestring
, which defaults to"default"
)password
(of typestring
, which defaults to"default"
)email
(of typestring
, which defaults to""
)radio
(of typestring
): Name of the radio.website
(of typestring
): URL of the website of the radio.description
(of typestring
): Description of the radio.genre
(of typestring
): Genre of the radio (rock or rap or etc.).streams
(of type[string * string]
): List of streams for the radio described by a pair of strings consisting of the format of the stream and the url of the stream. The format should be of the form “ogg/128k” consisting of the codec and the bitrate, separated by “/”.(unlabeled)
(of type'b.{on_metadata : ((([string * string]) -> unit)) -> 'a}
)
Deprecated: use decoder.add
.
Type:
(name : string, description : string, ?mimes : [string],
?file_extensions : [string], ?priority : int, test : ((string) -> int),
string) -> unit
Arguments:
name
(of typestring
)description
(of typestring
)mimes
(of type[string]
, which defaults to[]
)file_extensions
(of type[string]
, which defaults to[]
)priority
(of typeint
, which defaults to1
)test
(of type(string) -> int
)(unlabeled)
(of typestring
)
Deprecated: use decoder.metadata.add
.
Type:
(string, ((string) -> [string * string])) -> unit
Arguments:
(unlabeled)
(of typestring
)(unlabeled)
(of type(string) -> [string * string]
)
Deprecated: use decoder.oblivious.add
.
Type:
(name : string, description : string, test : ((string) -> int),
?priority : int, ?mimes : [string], ?file_extensions : [string],
?buffer : float, ((string) -> string)) -> unit
Arguments:
name
(of typestring
)description
(of typestring
)test
(of type(string) -> int
)priority
(of typeint
, which defaults to1
)mimes
(of type[string]
, which defaults to[]
)file_extensions
(of type[string]
, which defaults to[]
)buffer
(of typefloat
, which defaults to5.
)(unlabeled)
(of type(string) -> string
)
Deprecated: use playlist.parse.register
instead
Type:
(format : string, strict : bool,
((?pwd : string, string) -> [[string * string] * string])) -> unit
Arguments:
format
(of typestring
)strict
(of typebool
)(unlabeled)
(of type(?pwd : string, string) -> [[string * string] * string]
)
Deprecated: use protocol.add
.
Type:
(?temporary : bool, ?static : bool, ?syntax : string, ?doc : string, string,
((rlog : ((string) -> unit), maxtime : float, string) -> [string])) -> unit
Arguments:
temporary
(of typebool
, which defaults tofalse
)static
(of typebool
, which defaults tofalse
)syntax
(of typestring
, which defaults to"Undocumented"
)doc
(of typestring
, which defaults to"Undocumented"
)(unlabeled)
(of typestring
)(unlabeled)
(of type(rlog : ((string) -> unit), maxtime : float, string) -> [string]
)
Deprecated: this function has been replaced by
thread.run.recurrent
.
Type:
(?fast : bool, float, (() -> float)) -> unit
Arguments:
fast
(of typebool
, which defaults totrue
)(unlabeled)
(of typefloat
)(unlabeled)
(of type() -> float
)
Deprecated: use at
instead.
Type:
({bool}, source('a)) -> source('a)
Arguments:
(unlabeled)
(of type{bool}
)(unlabeled)
(of typesource('a)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use source.stereo
Type:
(?id : string?, source(audio=pcm('a), 'b)) -> source(audio=pcm(stereo), 'b)
Arguments:
id
(of typestring?
, which defaults tonull
)(unlabeled)
(of typesource(audio=pcm('a), 'b)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: this function has been replaced by
string.base64.decode
.
Type:
(string) -> string
Arguments:
(unlabeled)
(of typestring
)
Deprecated: this function has been replaced by
string.base64.encode
.
Type:
(string) -> string
Arguments:
(unlabeled)
(of typestring
)
Deprecated: use compress
Type:
(?id : string?, source(audio=pcm('a), 'b)) -> source(audio=pcm('a)
.{gain? : never, rms? : never}, 'b)
Arguments:
id
(of typestring?
, which defaults tonull
)(unlabeled)
(of typesource(audio=pcm('a), 'b)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.gain
(of type() -> float
):id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.rms
(of type() -> float
):seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use source.tracks
and
source
Type:
(?id : string?, source(audio='a, 'b)) -> source('b)
Arguments:
id
(of typestring?
, which defaults tonull
)(unlabeled)
(of typesource(audio='a, 'b)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use source.tracks
and
source
Type:
(?id : string?, source('a)) -> source('a)
where 'a is any media type (pcm, etc...)
Arguments:
id
(of typestring?
, which defaults tonull
)(unlabeled)
(of typesource('a) where 'a is any media type (pcm, etc...)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use source.tracks
and
source
Type:
(?id : string?, source(midi='a, 'b)) -> source('b)
Arguments:
id
(of typestring?
, which defaults tonull
)(unlabeled)
(of typesource(midi='a, 'b)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use source.tracks
and
source
Type:
(?id : string?, source(video='a, 'b)) -> source('b)
Arguments:
id
(of typestring?
, which defaults tonull
)(unlabeled)
(of typesource(video='a, 'b)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use blank.eat
instead
Type:
(?id : string?, ?at_beginning : bool, ?max_blank : float, ?min_noise : float,
?start_blank : bool, ?threshold : float, ?track_sensitive : bool,
source(audio=pcm('a), 'b)) -> source(audio=pcm('a), 'b)
Arguments:
id
(of typestring?
, which defaults tonull
)at_beginning
(of typebool
, which defaults tofalse
)max_blank
(of typefloat
, which defaults to20.
)min_noise
(of typefloat
, which defaults to0.
)start_blank
(of typebool
, which defaults tofalse
)threshold
(of typefloat
, which defaults to-40.
)track_sensitive
(of typebool
, which defaults totrue
)(unlabeled)
(of typesource(audio=pcm('a), 'b)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_blank
(of type() -> bool
): Indicate whether blank was detected.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: this function has been replaced by
source.fail
.
Type:
(?id : string?) -> source('a)
Arguments:
id
(of typestring?
, which defaults tonull
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use error method instead
Type:
('b.{kind : 'a}) -> 'a
Arguments:
(unlabeled)
(of type'b.{kind : 'a}
)
Deprecated: use error method instead
Type:
('b.{message : 'a}) -> 'a
Arguments:
(unlabeled)
(of type'b.{message : 'a}
)
Deprecated: this function has been replaced by
thread.when
.
Type:
(?freq : float, pred : (() -> bool), (() -> 'a)) -> unit
Arguments:
freq
(of typefloat
, which defaults to1.
)pred
(of type() -> bool
)(unlabeled)
(of type() -> 'a
)
Deprecated: was designed for transitions only and is not needed
anymore. Use file.out
instead.
Type:
(?id : string, ?duration : float, ?type : string, source(audio=pcm('a), 'b)) ->
source(audio=pcm('a), 'b)
Arguments:
id
(of typestring
, which defaults to"fade.final"
)duration
(of typefloat
, which defaults to3.
)type
(of typestring
, which defaults to"lin"
)(unlabeled)
(of typesource(audio=pcm('a), 'b)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).selected
(of type() -> source(audio=pcm('B), 'A)?
): Currently selected source.self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: was designed for transitions only and is not needed
anymore. Use fade.in
instead.
Type:
(?id : string, ?duration : float, ?type : string, source(audio=pcm('a), 'b)) ->
source(audio=pcm('a), 'b)
Arguments:
id
(of typestring
, which defaults to"fade.initial"
)duration
(of typefloat
, which defaults to3.
)type
(of typestring
, which defaults to"lin"
)(unlabeled)
(of typesource(audio=pcm('a), 'b)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use file.remove
instead.
Type:
(string) -> unit
Arguments:
(unlabeled)
(of typestring
)
Deprecated: use runtime.gc.full_major
instead
Type:
() -> unit
Deprecated: use file.mime
Type:
(string) -> string
Arguments:
(unlabeled)
(of typestring
)
Deprecated: use process.read.lines
instead.
Type:
(?timeout : float, ?env : [string * string], ?inherit_env : bool,
?log_errors : bool, string) -> [string]
Arguments:
timeout
(of typefloat
, which defaults to-1.
)env
(of type[string * string]
, which defaults to[]
)inherit_env
(of typebool
, which defaults totrue
)log_errors
(of typebool
, which defaults totrue
)(unlabeled)
(of typestring
)
Deprecated: use process.read
instead.
Type:
(?timeout : float, ?env : [string * string], ?inherit_env : bool,
?log_errors : bool, string) -> string
Arguments:
timeout
(of typefloat
, which defaults to-1.
)env
(of type[string * string]
, which defaults to[]
)inherit_env
(of typebool
, which defaults totrue
)log_errors
(of typebool
, which defaults totrue
)(unlabeled)
(of typestring
)
Deprecated: use environment.get
Type:
(?string, string) -> string
Arguments:
(unlabeled)
(of typestring
, which defaults to""
)(unlabeled)
(of typestring
)
Deprecated: use getpid
Type:
() -> int
Deprecated: use time
instead
Type:
() -> float
Deprecated: use time.utc
instead
Type:
(float?) -> unit
Arguments:
(unlabeled)
(of typefloat?
)
Methods:
day
(of typeint
): Day of month.dst
(of typebool
): Daylight time savings in effect.hour
(of typeint
): Hours.min
(of typeint
): Minutes.month
(of typeint
): Month of year.sec
(of typeint
): Seconds.week_day
(of typeint
): Day of week (Sunday is 0 or 7, Saturday is 6).year
(of typeint
): Year.year_day
(of typeint
): Day of year, between1
and366
.
Deprecated: use http.delete
instead.
Type:
(?headers : [string * string], ?http_version : string?, ?redirect : bool,
?timeout : float?, string) -> unit
Arguments:
headers
(of type[string * string]
, which defaults to[]
)http_version
(of typestring?
, which defaults tonull
)redirect
(of typebool
, which defaults totrue
)timeout
(of typefloat?
, which defaults to10.
)(unlabeled)
(of typestring
)
Methods:
headers
(of type[string * string]
): HTTP headers.http_version
(of typestring
): Version of the HTTP protocol.status_code
(of typeint
): Status code.status_message
(of typestring
): Status message.
Deprecated: use http.get
instead.
Type:
(?headers : [string * string], ?http_version : string?, ?redirect : bool,
?timeout : float?, string) -> string
Arguments:
headers
(of type[string * string]
, which defaults to[]
)http_version
(of typestring?
, which defaults tonull
)redirect
(of typebool
, which defaults totrue
)timeout
(of typefloat?
, which defaults to10.
)(unlabeled)
(of typestring
)
Methods:
headers
(of type[string * string]
): HTTP headers.http_version
(of typestring
): Version of the HTTP protocol.status_code
(of typeint
): Status code.status_message
(of typestring
): Status message.
Deprecated: use http.head
instead.
Type:
(?headers : [string * string], ?http_version : string?, ?redirect : bool,
?timeout : float?, string) -> unit
Arguments:
headers
(of type[string * string]
, which defaults to[]
)http_version
(of typestring?
, which defaults tonull
)redirect
(of typebool
, which defaults totrue
)timeout
(of typefloat?
, which defaults to10.
)(unlabeled)
(of typestring
)
Methods:
headers
(of type[string * string]
): HTTP headers.http_version
(of typestring
): Version of the HTTP protocol.status_code
(of typeint
): Status code.status_message
(of typestring
): Status message.
Deprecated: use http.post
instead.
Type:
(?data : {string}, ?headers : [string * string], ?http_version : string?,
?redirect : bool, ?timeout : float?, string) -> string
Arguments:
data
(of type{string}
, which defaults to""
)headers
(of type[string * string]
, which defaults to[]
)http_version
(of typestring?
, which defaults tonull
)redirect
(of typebool
, which defaults totrue
)timeout
(of typefloat?
, which defaults to10.
)(unlabeled)
(of typestring
)
Methods:
headers
(of type[string * string]
): HTTP headers.http_version
(of typestring
): Version of the HTTP protocol.status_code
(of typeint
): Status code.status_message
(of typestring
): Status message.
Deprecated: use http.put
instead.
Type:
(?data : {string}, ?headers : [string * string], ?http_version : string?,
?redirect : bool, ?timeout : float?, string) -> string
Arguments:
data
(of type{string}
, which defaults to""
)headers
(of type[string * string]
, which defaults to[]
)http_version
(of typestring?
, which defaults tonull
)redirect
(of typebool
, which defaults totrue
)timeout
(of typefloat?
, which defaults to10.
)(unlabeled)
(of typestring
)
Methods:
headers
(of type[string * string]
): HTTP headers.http_version
(of typestring
): Version of the HTTP protocol.status_code
(of typeint
): Status code.status_message
(of typestring
): Status message.
Deprecated: this function will be removed in a future release
Type:
(?id : 'a?, 'b) -> 'b
Arguments:
id
(of type'a?
, which defaults tonull
)(unlabeled)
(of type'b
)
Deprecated: use input
instead.
Type:
(?id : string?, ?start : bool, ?on_start : (() -> unit),
?on_stop : (() -> unit), ?fallible : bool) -> source(audio=pcm('A))
Arguments:
id
(of typestring?
, which defaults tonull
)start
(of typebool
, which defaults totrue
)on_start
(of type() -> unit
, which defaults to{()}
)on_stop
(of type() -> unit
, which defaults to{()}
)fallible
(of typebool
, which defaults tofalse
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started
(of type() -> bool
):true
if the output or source is started.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.shutdown
(of type() -> unit
): Shutdown the output or source.skip
(of type() -> unit
): Skip to the next track.start
(of type() -> unit
): Ask the source or output to start.stop
(of type() -> unit
): Ask the source or output to stop.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: this function has been replaced by
input.external.rawaudio
.
Type:
(?id : string?, ?buffer : float, ?channels : int, ?max : float,
?restart : bool, ?restart_on_error : bool, ?samplerate : int, {string}) ->
source(audio=pcm('a))
Arguments:
id
(of typestring?
, which defaults tonull
)buffer
(of typefloat
, which defaults to2.
)channels
(of typeint
, which defaults to2
)max
(of typefloat
, which defaults to10.
)restart
(of typebool
, which defaults totrue
)restart_on_error
(of typebool
, which defaults tofalse
)samplerate
(of typeint
, which defaults to44100
)(unlabeled)
(of type{string}
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use input.http
instead
Type:
(?id : string?, ?clock_safe : bool, ?debug : bool,
?float_args : [string * float], ?format : string?,
?int_args : [string * int], ?max_buffer : float,
?new_track_on_metadata : bool, ?on_connect : (([string * string]) -> unit),
?on_disconnect : (() -> unit),
?on_error : ((error
.{
kind : string,
message : string,
trace : [
{
position_end :
{
character_offset : int,
filename : string,
line_number : int
},
position_start :
{
character_offset : int,
filename : string,
line_number : int
},
to_string : (?prefix : string) -> string
}]
}) -> unit),
?on_start : (() -> unit), ?on_stop : (() -> unit), ?poll_delay : float,
?self_sync : {bool?}, ?start : bool, ?string_args : [string * string],
?timeout : float, ?user_agent : string, {string}) -> source('a)
Arguments:
id
(of typestring?
, which defaults tonull
)clock_safe
(of typebool
, which defaults tofalse
)debug
(of typebool
, which defaults tofalse
)float_args
(of type[string * float]
, which defaults to[]
)format
(of typestring?
, which defaults tonull
)int_args
(of type[string * int]
, which defaults to[]
)max_buffer
(of typefloat
, which defaults to5.
)new_track_on_metadata
(of typebool
, which defaults totrue
)on_connect
(of type([string * string]) -> unit
, which defaults tofun (_) -> ()
)on_disconnect
(of type() -> unit
, which defaults to{()}
)on_error
(of type(error .{ kind : string, message : string, trace : [ { position_end : {character_offset : int, filename : string, line_number : int }, position_start : {character_offset : int, filename : string, line_number : int }, to_string : (?prefix : string) -> string }] }) -> unit
, which defaults tofun (_) -> ()
)on_start
(of type() -> unit
, which defaults to{()}
)on_stop
(of type() -> unit
, which defaults to{()}
)poll_delay
(of typefloat
, which defaults to2.
)self_sync
(of type{bool?}
, which defaults tonull
)start
(of typebool
, which defaults totrue
)string_args
(of type[string * string]
, which defaults to[]
)timeout
(of typefloat
, which defaults to10.
)user_agent
(of typestring
, which defaults to"Liquidsoap/2.2.0+git@d6b69c34d (Unix; OCaml 4.14.0)"
)(unlabeled)
(of type{string}
)
Methods:
buffer_length
(of type() -> float
): Get the buffer’s length in seconds.buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started
(of type() -> bool
):true
if the output or source is started.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.set_url
(of type({string}) -> unit
): Set the source’s url.shutdown
(of type() -> unit
): Shutdown the output or source.skip
(of type() -> unit
): Skip to the next track.start
(of type() -> unit
): Ask the source or output to start.status
(of type() -> string
): Return the current status of the source, either “stopped” (the source isn’t trying to relay the HTTP stream), “starting” (polling task is about to begin) “polling” (attempting to connect to the HTTP stream), “connected” (connected to , buffering or playing back the stream) or “stopping” (source is stopping). stop
(of type() -> unit
): Ask the source or output to stop.time
(of type() -> float
): Get a source’s time, based on its assigned clock.url
(of type() -> string
): Return the source’s current url.
Deprecated: use json.stringify
instead
Type:
(?compact : bool, ?json5 : bool, 'a) -> string
Arguments:
compact
(of typebool
, which defaults tofalse
): Output compact text.json5
(of typebool
, which defaults tofalse
): Use json5 extended spec.(unlabeled)
(of type'a
)
Deprecated: use list.assoc.mem
instead
Type:
('a, ['a * 'b]) -> bool where 'a is an orderable type
Arguments:
(unlabeled)
(of typeanything that is an orderable type
)(unlabeled)
(of type['a * 'b] where 'a is an orderable type
)
Deprecated: use time.local
instead
Type:
(float?) -> unit
Arguments:
(unlabeled)
(of typefloat?
)
Methods:
day
(of typeint
): Day of month.dst
(of typebool
): Daylight time savings in effect.hour
(of typeint
): Hours.min
(of typeint
): Minutes.month
(of typeint
): Month of year.sec
(of typeint
): Seconds.week_day
(of typeint
): Day of week (Sunday is 0 or 7, Saturday is 6).year
(of typeint
): Year.year_day
(of typeint
): Day of year, between1
and366
.
Deprecated: use metadata.map
Type:
(?id : string?, ?update : bool, ?strip : bool, ?insert_missing : bool,
(([string * string]) -> [string * string]), source('a)) -> source('a)
where 'a is any media type (pcm, etc...)
Arguments:
id
(of typestring?
, which defaults to"metadata.map"
)update
(of typebool
, which defaults totrue
)strip
(of typebool
, which defaults tofalse
)insert_missing
(of typebool
, which defaults totrue
)(unlabeled)
(of type([string * string]) -> [string * string]
)(unlabeled)
(of typesource('a) where 'a is any media type (pcm, etc...)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use source.tracks
and
source
Type:
(?id : string?, source('a)) -> source('a)
where 'a is any media type (pcm, etc...)
Arguments:
id
(of typestring?
, which defaults tonull
)(unlabeled)
(of typesource('a) where 'a is any media type (pcm, etc...)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use source.available
instead.
Type:
(?id : string, ?track_sensitive : {bool}, ?active : {bool},
?available : {bool}, source('a)) -> source('a)
Arguments:
id
(of typestring
, which defaults to"mkavailable"
)track_sensitive
(of type{bool}
, which defaults totrue
)active
(of type{bool}
, which defaults tofalse
)available
(of type{bool}
, which defaults totrue
)(unlabeled)
(of typesource('a)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).selected
(of type() -> source('A)?
): Currently selected source.self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use source
Type:
(?id : string?, audio : source(audio='a, 'b), source('c)) -> source(audio='a,
'c) where 'c is any media type (pcm, etc...)
Arguments:
id
(of typestring?
, which defaults tonull
)audio
(of typesource(audio='a, 'b)
)(unlabeled)
(of typesource('c) where 'c is any media type (pcm, etc...)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use source
Type:
(?id : string?, midi : source(midi='a, 'b), source('c)) -> source(midi='a,
'c) where 'c is any media type (pcm, etc...)
Arguments:
id
(of typestring?
, which defaults tonull
)midi
(of typesource(midi='a, 'b)
)(unlabeled)
(of typesource('c) where 'c is any media type (pcm, etc...)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use source
Type:
(?id : string?, video : source(video='a, 'b), source('c)) -> source(video='a,
'c) where 'c is any media type (pcm, etc...)
Arguments:
id
(of typestring?
, which defaults tonull
)video
(of typesource(video='a, 'b)
)(unlabeled)
(of typesource('c) where 'c is any media type (pcm, etc...)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use json.parse
instead
Type:
(default : 'a, string) -> 'a
Arguments:
default
(of type'a
): Default value if string cannot be parsed.(unlabeled)
(of typestring
)
Deprecated: use blank.detect
instead
Type:
(?id : string?, ?max_blank : float, ?min_noise : float,
?on_noise : (() -> unit), ?start_blank : bool, ?threshold : float,
?track_sensitive : bool, (() -> unit), source(audio=pcm('a), 'b)) ->
source(audio=pcm('a), 'b)
Arguments:
id
(of typestring?
, which defaults tonull
)max_blank
(of typefloat
, which defaults to20.
)min_noise
(of typefloat
, which defaults to0.
)on_noise
(of type() -> unit
, which defaults to{()}
)start_blank
(of typebool
, which defaults tofalse
)threshold
(of typefloat
, which defaults to-40.
)track_sensitive
(of typebool
, which defaults totrue
)(unlabeled)
(of type() -> unit
)(unlabeled)
(of typesource(audio=pcm('a), 'b)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_blank
(of type() -> bool
): Indicate whether blank was detected.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use source.on_end
instead.
Type:
(?id : string?, ?delay : {float}, source('a),
((float, [string * string]) -> unit)) -> source('a)
Arguments:
id
(of typestring?
, which defaults tonull
)delay
(of type{float}
, which defaults to5.
)(unlabeled)
(of typesource('a)
)(unlabeled)
(of type(float, [string * string]) -> unit
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use output
instead.
Type:
(source(audio=pcm('A))) -> unit
Arguments:
(unlabeled)
(of typesource(audio=pcm('A))
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started
(of type() -> bool
):true
if the output or source is started.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.shutdown
(of type() -> unit
): Shutdown the output or source.skip
(of type() -> unit
): Skip to the next track.start
(of type() -> unit
): Ask the source or output to start.stop
(of type() -> unit
): Ask the source or output to stop.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Type:
(?id : string?, ?fallible : bool, ?on_start : (() -> unit),
?on_stop : (() -> unit), ?start : bool, source(audio=pcm('A))) -> unit
Arguments:
id
(of typestring?
, which defaults tonull
)fallible
(of typebool
, which defaults tofalse
)on_start
(of type() -> unit
, which defaults to{()}
)on_stop
(of type() -> unit
, which defaults to{()}
)start
(of typebool
, which defaults totrue
)(unlabeled)
(of typesource(audio=pcm('A))
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_started
(of type() -> bool
):true
if the output or source is started.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.shutdown
(of type() -> unit
): Shutdown the output or source.skip
(of type() -> unit
): Skip to the next track.start
(of type() -> unit
): Ask the source or output to start.stop
(of type() -> unit
): Ask the source or output to stop.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: this function has been replaced with
playlist
, setting reload_mode
argument to
"never"
and loop
to false
.
Type:
(?id : string?, ?random : bool, ?reload_mode : string, ?prefetch : int,
?filter : ((request) -> bool), string) -> source('a)
Arguments:
id
(of typestring?
, which defaults tonull
)random
(of typebool
, which defaults tofalse
)reload_mode
(of typestring
, which defaults to""
)prefetch
(of typeint
, which defaults to1
)filter
(of type(request) -> bool
, which defaults tofun (_) -> true
)(unlabeled)
(of typestring
)
Methods:
add
(of type(request) -> bool
): Add a request to the queue. Requests are resolved before being added. Returnstrue
if the request was successfully added.buffered
(of type() -> [string * float]
): Length of buffered data.current
(of type() -> request?
): Get the request currently being played.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.fetch
(of type() -> bool
): Try feeding the queue with a new request. Returnstrue
if successful. This method can take long to return and should usually be run in a separate thread.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.length
(of type() -> int
):log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.queue
(of type() -> [request]
): Get the requests currently in the queue.reload
(of type(?empty_queue : bool, ?uri : string?) -> unit
):remaining
(of type() -> float
): Estimation of remaining time in the current track.remaining_files
(of type() -> [string]
):seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.set
(of type(source('A)) -> unit
): Set the source.set_queue
(of type([request]) -> unit
): Set the queue of requests. Requests are resolved before being added to the queue. You are responsible for destroying the requests currently in the queue.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use playlist
instead
Type:
(?id : string?, ?mime_type : string, ?mode : string,
?on_track : (() -> unit), ?prefix : string, ?reload : int,
?reload_mode : string, string) -> source('a)
Arguments:
id
(of typestring?
, which defaults tonull
)mime_type
(of typestring
, which defaults to""
)mode
(of typestring
, which defaults to"randomize"
)on_track
(of type() -> unit
, which defaults to{()}
)prefix
(of typestring
, which defaults to""
)reload
(of typeint
, which defaults to0
)reload_mode
(of typestring
, which defaults to"seconds"
)(unlabeled)
(of typestring
)
Methods:
add
(of type(request) -> bool
): Add a request to the queue. Requests are resolved before being added. Returnstrue
if the request was successfully added.buffered
(of type() -> [string * float]
): Length of buffered data.current
(of type() -> request?
): Get the request currently being played.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.fetch
(of type() -> bool
): Try feeding the queue with a new request. Returnstrue
if successful. This method can take long to return and should usually be run in a separate thread.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.length
(of type() -> int
):log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.queue
(of type() -> [request]
): Get the requests currently in the queue.reload
(of type(?empty_queue : bool, ?uri : string?) -> unit
):remaining
(of type() -> float
): Estimation of remaining time in the current track.remaining_files
(of type() -> [string]
):seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.set
(of type(source('A)) -> unit
): Set the source.set_queue
(of type([request]) -> unit
): Set the queue of requests. Requests are resolved before being added to the queue. You are responsible for destroying the requests currently in the queue.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use mksafe and playlist instead.
Type:
(?id : string?, ?mime_type : string, ?mode : string,
?on_track : (() -> unit), ?prefix : string, ?reload : int,
?reload_mode : string, string) -> source('a)
where 'a is an internal media type (pcm or canvas)
Arguments:
id
(of typestring?
, which defaults tonull
)mime_type
(of typestring
, which defaults to""
)mode
(of typestring
, which defaults to"randomize"
)on_track
(of type() -> unit
, which defaults to{()}
)prefix
(of typestring
, which defaults to""
)reload
(of typeint
, which defaults to0
)reload_mode
(of typestring
, which defaults to"seconds"
)(unlabeled)
(of typestring
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).selected
(of type() -> source('A)? where 'A is an internal media type (pcm or canvas)
): Currently selected source.self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: this function has been replaced by
string.quote
.
Type:
(string) -> string
Arguments:
(unlabeled)
(of typestring
)
Deprecated: use request.create
instead.
Type:
(?indicators : [string], ?persistent : bool, ?temporary : bool, string) ->
request
Arguments:
indicators
(of type[string]
, which defaults to[]
)persistent
(of typebool
, which defaults tofalse
)temporary
(of typebool
, which defaults tofalse
)(unlabeled)
(of typestring
)
Deprecated: use request.dynamic
instead
Type:
(?id : string?, ?available : {bool}, ?prefetch : int, ?retry_delay : {float},
?timeout : float, (() -> [request])) -> source('a)
Arguments:
id
(of typestring?
, which defaults tonull
)available
(of type{bool}
, which defaults totrue
)prefetch
(of typeint
, which defaults to1
)retry_delay
(of type{float}
, which defaults to0.1
)timeout
(of typefloat
, which defaults to20.
)(unlabeled)
(of type() -> [request]
)
Methods:
add
(of type(request) -> bool
): Add a request to the queue. Requests are resolved before being added. Returnstrue
if the request was successfully added.buffered
(of type() -> [string * float]
): Length of buffered data.current
(of type() -> request?
): Get the request currently being played.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.fetch
(of type() -> bool
): Try feeding the queue with a new request. Returnstrue
if successful. This method can take long to return and should usually be run in a separate thread.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.queue
(of type() -> [request]
): Get the requests currently in the queue.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.set
(of type(source('A)) -> unit
): Set the source.set_queue
(of type([request]) -> unit
): Set the queue of requests. Requests are resolved before being added to the queue. You are responsible for destroying the requests currently in the queue.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use request.resolved
Type:
(request) -> bool
Arguments:
(unlabeled)
(of typerequest
)
Deprecated: this function has been replaced by
metadata.map
.
Type:
([string * string], ?insert_missing : bool, ?update : bool, ?strip : bool,
source('a)) -> source('a)
where 'a is any media type (pcm, etc...)
Arguments:
(unlabeled)
(of type[string * string]
)insert_missing
(of typebool
, which defaults totrue
)update
(of typebool
, which defaults totrue
)strip
(of typebool
, which defaults tofalse
)(unlabeled)
(of typesource('a) where 'a is any media type (pcm, etc...)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use process.run
instead
Type:
(?env : [string * string], ?inherit_env : bool, ?rwdirs : [string],
?rodirs : [string], ?network : bool?, ?timeout : float?, string) ->
string * string * (string * string)
Arguments:
env
(of type[string * string]
, which defaults to[]
)inherit_env
(of typebool
, which defaults totrue
)rwdirs
(of type[string]
, which defaults to["default"]
)rodirs
(of type[string]
, which defaults to["default"]
)network
(of typebool?
, which defaults tonull
)timeout
(of typefloat?
, which defaults tonull
)(unlabeled)
(of typestring
)
Deprecated: use source.say_metadata
instead
Type:
(source('a), pattern : string) -> source('a)
Arguments:
(unlabeled)
(of typesource('a)
)pattern
(of typestring
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use environment.set
Type:
(string, string) -> unit
Arguments:
(unlabeled)
(of typestring
)(unlabeled)
(of typestring
)
Deprecated: use blank.skip
instead
Type:
(?id : string?, ?threshold : float, ?max_blank : float, ?min_noise : float,
?track_sensitive : bool, source(audio=pcm('a), 'b).{skip : () -> unit}) ->
source(audio=pcm('a), 'b)
Arguments:
id
(of typestring?
, which defaults tonull
)threshold
(of typefloat
, which defaults to-40.
)max_blank
(of typefloat
, which defaults to20.
)min_noise
(of typefloat
, which defaults to0.
)track_sensitive
(of typebool
, which defaults totrue
)(unlabeled)
(of typesource(audio=pcm('a), 'b).{skip : () -> unit}
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_blank
(of type() -> bool
): Indicate whether blank was detected.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use thread.pause
Type:
(float) -> unit
Arguments:
(unlabeled)
(of typefloat
)
Deprecated: this function has been replaced by
string.escape
.
Type:
(string) -> string
Arguments:
(unlabeled)
(of typestring
)
Deprecated: use string
.
Type:
('a) -> string
Arguments:
(unlabeled)
(of type'a
)
Deprecated: use string.float
.
Type:
(float) -> string
Arguments:
(unlabeled)
(of typefloat
)
Deprecated: use blank.strip
instead
Type:
(?id : string?, ?max_blank : float, ?min_noise : float, ?start_blank : bool,
?threshold : float, ?track_sensitive : bool, source(audio=pcm('a), 'b)) ->
source(audio=pcm('a), 'b)
Arguments:
id
(of typestring?
, which defaults tonull
)max_blank
(of typefloat
, which defaults to20.
)min_noise
(of typefloat
, which defaults to0.
)start_blank
(of typebool
, which defaults tofalse
)threshold
(of typefloat
, which defaults to-40.
)track_sensitive
(of typebool
, which defaults totrue
)(unlabeled)
(of typesource(audio=pcm('a), 'b)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_blank
(of type() -> bool
): Indicate whether blank was detected.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: use process.run
instead.
Type:
(string) -> unit
Arguments:
(unlabeled)
(of typestring
)
Methods:
status
(of typestring.{code : int, description : string}
): Status when process ended, can be one of"exit"
(the program exited, thestatus
code is then relevant),"killed"
(the program was killed by signal given instatus
code),"stopped"
(the program was stopped by signal given instatus
code) or"exception"
(the program raised and exception detailed in thedescription
).stderr
(of typestring
): Messages written by process on standard error stream.stdout
(of typestring
): Messages written by process on standard output stream.
Deprecated: use process.test
instead.
Type:
(?timeout : float, ?env : [string * string], ?inherit_env : bool, string) ->
bool
Arguments:
timeout
(of typefloat
, which defaults to-1.
)env
(of type[string * string]
, which defaults to[]
)inherit_env
(of typebool
, which defaults totrue
)(unlabeled)
(of typestring
)
Deprecated: use video.alpha.of_color
Type:
(?id : string?, ?color : int, ?precision : float, source(video=canvas('a),
'b)) -> source(video=canvas('a), 'b)
Arguments:
id
(of typestring?
, which defaults tonull
)color
(of typeint
, which defaults to0
)precision
(of typefloat
, which defaults to0.2
)(unlabeled)
(of typesource(video=canvas('a), 'b)
)
Methods:
buffered
(of type() -> [string * float]
): Length of buffered data.duration
(of type() -> float
): Estimation of the duration of the current track.elapsed
(of type() -> float
): Elapsed time in the current track.fallible
(of typebool
): Indicate if a source may fail, i.e. may not be ready to stream.id
(of type() -> string
): Identifier of the source.is_active
(of type() -> bool
):true
if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically,true
for outputs and sources such asinput.http
.is_ready
(of type() -> bool
): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.is_up
(of type() -> bool
): Indicate that the source can be asked to produce some data at any time. This istrue
when the source is currently being used or if it could be used at any time, typically inside aswitch
orfallback
.last_metadata
(of type() -> [string * string]?
): Return the last metadata from the source.log
(of type{level : (() -> int?).{set : (int) -> unit}}
): Get or set the source’s log level, from1
to5
.on_get_ready
(of type((() -> unit)) -> unit
): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.on_leave
(of type((() -> unit)) -> unit
): Register a function to be called when source is not used anymore by another source.on_metadata
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on metadata packets.on_shutdown
(of type((() -> unit)) -> unit
): Register a function to be called when source shuts down.on_track
(of type((([string * string]) -> unit)) -> unit
): Call a given handler on new tracks.remaining
(of type() -> float
): Estimation of remaining time in the current track.seek
(of type(float) -> float
): Seek forward, in seconds (returns the amount of time effectively seeked).self_sync
(of type() -> bool
): Is the source currently controlling its own real-time loop.skip
(of type() -> unit
): Skip to the next track.time
(of type() -> float
): Get a source’s time, based on its assigned clock.
Deprecated: this function has been replaced by
file.which
.
Type:
(string) -> string
Arguments:
(unlabeled)
(of typestring
)