Skip to main content

Module catalog

Module catalog 

Source
Expand description

Catalog publish/subscribe.

The catalog is a JSON document listing every track in a broadcast: its codec, container, dimensions, and any decoder configuration the subscriber needs. Two encodings coexist on every broadcast:

  • hang is hang’s original shape, served on the catalog.json track.
  • msf is the IETF-proposed alternative, served on the catalog track.

Publishing through Producer writes both tracks together; subscribers pick one based on the broadcast’s filename suffix. See CatalogFormat for the suffix-to-format mapping. The producer is generic over an application extension E (see hang::CatalogExt), defaulting to () for media-only catalogs.

On the consume side, Consumer is the unified entry point: it subscribes to whichever catalog track format advertises and yields Catalog<E> snapshots. Wrap it with Select (driven by a select::Broadcast) to narrow the set before handing it to an exporter; both also implement Stream so they compose either direction.

Modules§

hang
Hang catalog.
msf
MSF catalog.

Structs§

Config
Everything a catalog Producer is built from: the initial catalog and any overrides.
Consumer
A catalog stream sourced from a [moq_net::broadcast::Consumer].
Entry
One entry in a catalog section: the track’s name and the config describing it.
Estimate
The catalog fields a producer measures from the frames written to it.
Guard
RAII guard for modifying a catalog with automatic publishing on drop.
Producer
Produces both a hang and MSF catalog track for a broadcast.
Reserved
A clonable reservation context handed to importers so they declare their tracks up front.
Select
A Stream that keeps only the renditions a select::Broadcast selects.
Timebase
One source’s timestamp base on a catalog, shared by every importer reading it.
VideoHint
Caller-provided catalog fields for a video track: a starting point for what the importer detects.

Enums§

CatalogFormat
The catalog format advertised by a broadcast name suffix.

Traits§

IntoRendition
The config a data producer (Producer::json_stream and the like) publishes as its catalog entry.
RenditionConfig
A catalog config that can be published as a named rendition.
Stream
A stream of catalog snapshots.