pub struct Profile {Show 13 fields
pub name: &'static str,
pub max_bitrate_kbps: u32,
pub latency_budget_ms: u32,
pub max_gop_ms: u32,
pub prefer_intra_refresh: bool,
pub fec_delta_pct: u32,
pub fec_key_pct: u32,
pub backlog_drop_frames: u32,
pub pilot_deadline_delta_ms: u32,
pub pilot_deadline_key_ms: u32,
pub pilot_presentation_delay_ms: u32,
pub recovery_grace_ms: u32,
pub on_loss: OnLoss,
}Fields§
§name: &'static strThe profile’s name: latency, balanced or quality.
max_bitrate_kbps: u32The ceiling on the publisher’s video bitrate; the closed-loop controller moves the actual request between 25 % of this and this.
latency_budget_ms: u32How much end-to-end delay the profile is prepared to spend, told to the publisher so it can size its own buffers (VBV, lookahead).
max_gop_ms: u32The longest the publisher may go without a full recovery point — an
IDR, or a completed intra-refresh sweep. A ceiling, and a safety net:
Seyd asks for recovery points when it needs them (recovery-request),
so the periodic one only has to catch a publisher that ignores it
(ADR 0009). It is long on purpose: a periodic IDR is several times a
delta frame, and measured on the demo camera it arrived ~22 ms late and
made every GOP’s first two intervals 60 ms then 18 ms; at 10 s GOPs
arrival judder fell from 3.7 to 0.9 ms mean and the stream lost 43 % of
its bitrate, the IDRs’ share. A joining pilot never waits for it: the
agent asks for an IDR on hello.
prefer_intra_refresh: boolAsk the publisher to refresh the picture gradually — a strip of
intra-coded blocks per frame sweeping the picture within max_gop_ms —
rather than with periodic IDRs, where its encoder can (x264, NVENC,
Jetson; not the ONVIF cameras surveyed). Removes the keyframe burst
entirely; measured on the sim through a shaped link as g2g p95
148 → 48 ms (docs/latency-sources.md §11).
fec_delta_pct: u32Reed-Solomon parity added to a delta frame’s block, as a percentage of its data chunks, on a clean link; the controller raises it under loss.
fec_key_pct: u32Parity for keyframes, which are larger and cost a GOP if torn.
backlog_drop_frames: u32Drop a delta frame if the send backlog exceeds this many frame-times.
pilot_deadline_delta_ms: u32How long the pilot waits for a delta frame’s missing chunks before closing it out.
pilot_deadline_key_ms: u32The same wait for a keyframe.
pilot_presentation_delay_ms: u32How long the pilot holds a decoded frame past its capture slot before painting it (ADR 0005). This is the profile’s judder-versus-latency call: a keyframe is ~8x a delta frame and is produced in one frame slot, so without a budget here the picture hitches once per GOP. It is a bound, not an average — a frame never waits longer than this past its own arrival — so it is the latency the profile is prepared to spend. 0 disables pacing and restores decode-on-arrival.
recovery_grace_ms: u32How long the sender waits for a recovery point after asking for one before it resumes sending delta frames regardless.
A publisher that recovers with intra-refresh or an LTR reference never produces a keyframe, so waiting for one latches the stream silent forever. Roughly one refresh cycle: long enough that a real keyframe arrives first when the publisher sends IDRs, short enough that a stall is not visible as a freeze.
on_loss: OnLossWhat the pilot does when a frame cannot be repaired: keep decoding
(continue, and ask for a recovery point) or freeze until the next IDR.
Implementations§
Source§impl Profile
impl Profile
Sourcepub fn drop_threshold_bytes(&self, fps: u32) -> usize
pub fn drop_threshold_bytes(&self, fps: u32) -> usize
Backlog above which a delta frame is dropped before any of it is sent. A byte budget rather than “queue non-empty”: the transport’s pending queue also grows merely because the pacer is spacing packets out.
Sourcepub fn drop_threshold_bytes_at(&self, ceiling_kbps: u32, fps: u32) -> usize
pub fn drop_threshold_bytes_at(&self, ceiling_kbps: u32, fps: u32) -> usize
The same budget at a ceiling other than the profile’s own — a publisher that tops out lower has smaller frames, and a backlog of “a few frames” is correspondingly fewer bytes.
Sourcepub fn publisher_config(&self, channel: u8, reason: &str) -> Value
pub fn publisher_config(&self, channel: u8, reason: &str) -> Value
The half of the profile the video publisher is responsible for, as the
video-config publisher-control message (docs/protocol/seydd.md).
Sourcepub fn pilot_config(&self) -> Value
pub fn pilot_config(&self) -> Value
What the pilot needs: close-out deadlines, presentation delay and loss
policy (welcome.qos / qos-ack.qos in docs/protocol/control-stream.md).