#[non_exhaustive]pub struct Options {
pub track: Option<String>,
pub settings: Settings,
pub bandwidth: Allocator,
}Expand description
Encode and publication policy for Producer.
#[non_exhaustive]: construct via Options::default and set fields, so
new knobs can be added without breaking 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.track: Option<String>Track name to publish under. None derives a unique one from the codec
(0.opus, then 1.opus, …), matching how the video side names its
track. Subscribers find it through the catalog either way.
settings: SettingsCodec input and encoded output settings.
bandwidth: AllocatorThe connection’s bandwidth, as an allocator over
Session::send_bandwidth.
The audio track reserves its bitrate against it, so the video encoder sharing the connection sizes itself against what’s actually left rather than against the whole uplink. Pass the same allocator to both.
Defaults to Allocator::unlimited,
which reserves nothing and leaves every sender at its configured rate.
Audio reserves but does not follow its share: Opus can retune live and PCM
can’t at all, and at hang’s priorities audio outranks video, so it is only
ever squeezed on a link that can’t carry audio alone.