Skip to main content

Profile

Struct Profile 

Source
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 str

The profile’s name: latency, balanced or quality.

§max_bitrate_kbps: u32

The ceiling on the publisher’s video bitrate; the closed-loop controller moves the actual request between 25 % of this and this.

§latency_budget_ms: u32

How 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: u32

The 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: bool

Ask 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: u32

Reed-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: u32

Parity for keyframes, which are larger and cost a GOP if torn.

§backlog_drop_frames: u32

Drop a delta frame if the send backlog exceeds this many frame-times.

§pilot_deadline_delta_ms: u32

How long the pilot waits for a delta frame’s missing chunks before closing it out.

§pilot_deadline_key_ms: u32

The same wait for a keyframe.

§pilot_presentation_delay_ms: u32

How 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: u32

How 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: OnLoss

What 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

Source

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.

Source

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.

Source

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).

Source

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).

Trait Implementations§

Source§

impl Clone for Profile

Source§

fn clone(&self) -> Profile

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Profile

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Profile

Source§

impl PartialEq for Profile

Source§

fn eq(&self, other: &Profile) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Profile

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Profile

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.