Skip to main content

Crate moq_lite

Crate moq_lite 

Source
Expand description

§moq-lite: Media over QUIC Transport

moq-lite is designed for real-time live media delivery with sub-second latency at massive scale. This is a simplified subset of the official Media over QUIC (MoQ) transport, focusing on the practical features.

NOTE: While compatible with a subset of the IETF MoQ specification, many features are not supported on purpose. I highly highly highly recommend using moq-lite instead of the IETF standard until at least draft-30.

§API

The API is built around Producer/Consumer pairs, with the hierarchy:

  • Origin: A collection of Broadcasts, produced by one or more Sessions.
  • Broadcast: A collection of Tracks, produced by a single publisher.
  • Track: A collection of Groups, delivered out-of-order until expired.
  • Group: A collection of Frames, delivered in order until cancelled.
  • Frame: Chunks of data with an upfront size.

Re-exports§

pub use bytes;

Structs§

Broadcast
A collection of media tracks that can be published and subscribed to.
BroadcastConsumer
Subscribe to abitrary broadcast/tracks.
BroadcastProducer
Receive broadcast/track requests and return if we can fulfill them.
Client
A MoQ client session builder.
Frame
A chunk of data with an upfront size.
FrameConsumer
Used to consume a frame’s worth of data in chunks.
FrameProducer
Used to write a frame’s worth of data in chunks.
Group
A group contains a sequence number because they can arrive out of order.
GroupConsumer
Consume a group, frame-by-frame.
GroupProducer
Create a group, frame-by-frame.
Origin
A collection of broadcasts that can be published and subscribed to.
OriginConsumer
Consumes announced broadcasts matching against an optional prefix.
OriginProducer
Announces broadcasts to consumers over the network.
Path
A broadcast path that provides safe prefix matching operations.
Server
A MoQ server session builder.
Session
A MoQ transport session, wrapping a WebTransport connection.
TimeOverflow
Timescale
A timestamp representing the presentation time in a given scale. ex. 1000 for milliseconds.
Track
A track is a collection of groups, delivered out-of-order until expired.
TrackConsumer
A consumer for a track, used to read groups.
TrackProducer
A producer for a track, used to create new groups.

Enums§

Error
A list of possible errors that can occur during the session.

Constants§

ALPNS
ALPN strings for supported versions.

Traits§

AsPath
A trait for types that can be converted to a Path.

Type Aliases§

OriginAnnounce
A broadcast path and its associated consumer, or None if closed.
PathOwned
An owned version of Path with a 'static lifetime.
Result
Time
A timestamp representing the presentation time in milliseconds.