#[non_exhaustive]pub struct Info {
pub timescale: Timescale,
pub latency_max: Duration,
pub priority: u8,
pub ordered: bool,
/* private fields */
}Expand description
Publisher-side properties of a track.
These are fixed by the publisher when the track is created and don’t change
while the track is alive. A subscriber learns them via
broadcast::Consumer::track,
which returns the publisher’s Info once the subscription is accepted.
Not Copy: it carries an internal handle to its parent broadcast.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.timescale: TimescaleUnits per second for per-frame timestamps on this track.
Every track is timed; this defaults to Timescale::MILLI. On Lite05+ it is
reported in TRACK_INFO and the publisher zigzag-delta encodes per-frame
timestamps at this scale on the wire. Protocols whose wire can’t carry it
(pre-Lite05 moq-lite, IETF moq-transport) fall back to local monotonic milliseconds.
latency_max: DurationThe maximum age of a non-latest group before the publisher evicts it (the
newest group is always retained). A subscriber’s
Subscription::latency_max window is clamped to this, since a group can’t be
waited for longer than it’s kept around. Reported in TRACK_INFO so
relays re-serve with the same window. Defaults to DEFAULT_LATENCY_MAX.
This is the Publisher Max Latency on the wire, the publisher-side half of
the same budget Subscription::latency_max sets for a subscriber.
priority: u8The publisher’s priority for this track, used only to break ties between subscriptions of equal subscriber priority. Reported in TRACK_INFO (Lite05+).
ordered: boolWhether groups are prioritized in sequence order. Groups may always arrive
out-of-order (or not at all) over the network. Used only to break ties,
reported in TRACK_INFO (Lite05+), and defaults to false (newest-first).
Implementations§
Source§impl Info
impl Info
Sourcepub fn with_timescale(self, timescale: Timescale) -> Self
pub fn with_timescale(self, timescale: Timescale) -> Self
Set the per-frame timestamp scale, returning self for chaining.
Defaults to Timescale::MILLI. On Lite05+ this scale is reported in TRACK_INFO
and used to encode per-frame timestamps on the wire.
Sourcepub fn with_latency_max(self, latency_max: Duration) -> Self
pub fn with_latency_max(self, latency_max: Duration) -> Self
Set the maximum age of a non-latest group before eviction, returning self for chaining.
Sourcepub fn with_priority(self, priority: u8) -> Self
pub fn with_priority(self, priority: u8) -> Self
Set the publisher’s tie-break priority, returning self for chaining.
Sourcepub fn with_ordered(self, ordered: bool) -> Self
pub fn with_ordered(self, ordered: bool) -> Self
Set whether groups are prioritized in sequence order, returning self for
chaining. Groups may always arrive out-of-order (or not at all) over the
network. Defaults to false.