#[non_exhaustive]pub struct Config {
pub format: Format,
pub sample_rate: Option<u32>,
pub channels: Option<u32>,
pub latency_max: Option<Duration>,
}Expand description
Decoder configuration: the PCM layout to emit, plus the subscription’s latency budget.
The mirror of encode::Config: it describes the
output, since the codec’s own shape is read from the catalog.
#[non_exhaustive]: build via Config::new (or default()) and set the
optional fields, so future knobs don’t break callers.
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.format: FormatHow to pack samples in each emitted frame.
sample_rate: Option<u32>Sample rate to emit at. None uses the codec’s native rate from the
catalog; anything else resamples.
channels: Option<u32>Channel count to emit. None uses the codec’s native count; anything
else remixes mono and stereo at the decode boundary.
latency_max: Option<Duration>Upper bound on buffering before skipping a stalled group.
Forwarded to moq_mux::container::Consumer::with_latency: if a group is
stuck and a newer group is more than this far ahead, the consumer skips.
None keeps the moq-mux default of zero, which skips aggressively. Set it
to the playout buffer you can tolerate (typically tens to a few hundred ms)
for the best congestion-vs-quality trade-off. The _max suffix is a
reminder that we never add latency here: the consumer skips only when
newer data is already this far ahead. A companion latency_min for
jitter-buffer padding will land in a follow-up.