Skip to main content

Module media

Module media 

Source
Expand description

Broadcasts: a namespace with its tracks, MSF event timelines and media sources of encoded frames, published and followed as the browser SDK’s moq-wasm/media and the Python SDK’s moq_wasm.media do.

Structs§

AudioLevel
An RFC 6464 §3 audio level indication.
BroadcastBuilder
The tracks registered before the PUBLISH_NAMESPACE, so that a SUBSCRIBE the relay forwards at once finds them.
Catalog
An independent draft-ietf-moq-msf-02 catalog (§5).
CatalogTrack
Catalogs
The catalogs of a RemoteBroadcast; dropping it unsubscribes.
EventTimeline
Writes a draft-ietf-moq-msf-02 §8 event timeline as one group: it opens with an empty record list, and each record is one more object, so a late joiner’s joining FETCH brings the records the track still keeps. A record is the §8 JSON object, such as {"T": milliseconds, "data": …} or {"L": [group, object], "data": …}.
EventTimelineOptions
How RemoteBroadcast::event_timeline subscribes. delivery_timeout is None by default, so every record arrives.
FollowOptions
How RemoteBroadcast::follow subscribes.
FollowedTrack
A followed track, read with next; dropping it unsubscribes.
LocalBroadcast
A published namespace; a media source’s tracks reach subscribers through the MSF catalog. add_media_source and dropping it without close spawn tasks (the latter withdraws the namespace), so call both inside the tokio runtime.
MediaSource
A video track with its renditions and an audio track, fed with encoded frames and published as LOC with the MSF catalog and media timeline. Once its broadcast is closed or dropped, its pushes fail and its waits end with an error.
MediaSourceOptions
RemoteBroadcast
A namespace another publisher publishes, handed to a watch_broadcasts handler.
RemoteEventTimeline
The records of an event timeline track, read with next; dropping it unsubscribes.
Rendition
Another encoding of a MediaSource’s video.
TrackDemand
Whether a subscription to a track published on demand is in Forward State 1, as Origin::publish_on_demand reports it.
TrackQuery
Which tracks Catalog::select takes: every field given must match.
WatchOptions

Enums§

BitratePreference
Which bitrate TrackQuery::prefer picks. A track without a bitrate, which draft-ietf-moq-msf-02 requires only of audio and video, counts as the highest.
CatalogParseError
KnownPackaging
KnownTrackRole
MediaSourceError
Packaging
TrackKind
TrackRole

Functions§

create_broadcast
A broadcast in namespace, published by BroadcastBuilder::announce.
watch_broadcasts
Runs handler on a task for each namespace published under prefix, including those published before the call, except this session’s own. A withdrawal aborts the namespace’s task; publishing it again starts a new one. A handler’s Err is logged.