Skip to main content

V2ipDecoderReason

Struct V2ipDecoderReason 

Source
pub struct V2ipDecoderReason(/* private fields */);
Expand description

Why a decoder reports the state it does.

The primary cause only. Several causes can be true at once, and which of them lands here is a fixed priority order in the firmware that the numbering does not express: these values are identities, not ranks, and comparing or ordering them says nothing. Ask V2ipDecoderReport::has_cause whether a particular cause applies - a test against this field answers “is this the one that won” instead, which is a different question.

Firmware adds causes, so the wire value is carried as it arrived: folding an unrecognised one onto a named cause would report a fault this library invented. Appending one cannot reorder the existing priorities.

Implementations§

Source§

impl V2ipDecoderReason

Source

pub const OK: Self

Decoding normally.

Source

pub const NO_PACKETS: Self

No packets are arriving.

Source

pub const PACKETS_DEGRADED: Self

Packets are arriving, degraded.

Source

pub const NO_FORMAT: Self

No format could be recovered from the codestream.

Source

pub const FORMAT_MISMATCH: Self

The recovered format is not the one the sink is configured for.

Source

pub const FORMAT_REJECTED: Self

The configured output format was refused.

Source

pub const DECODER_BLOCKED: Self

The converter watchdog is holding the stream back.

Source

pub const SWITCH_PENDING: Self

A source switch is in progress: a step in an operation someone asked for, rather than a fault.

Source

pub const PTP_UNLOCKED: Self

PTP is unlocked. That costs audio alone; the picture is unaffected.

Source

pub const TX_BRIDGE_UNLOCKED: Self

The pipeline is rebuilding after the HDMI transmitter stayed unlocked.

The picture is down, and has been for five seconds before this can appear: the sender debounces the unlocked reading for that long, so this never reports a transient. Unlike Self::SWITCH_PENDING nobody asked for it.

The debounce restarts each time it elapses, so this holding across reports is a restart loop rather than one event, and that is what to escalate on.

It sits near the bottom of the priority order, below every input-side cause, so a rebuilding pipeline names one of those in V2ipDecoderReport::reason and carries this in V2ipDecoderReport::flags alone - always, rather than briefly.

It is evaluated only while no format change is in progress. Across a switch it holds its previous value and clears on the first reading after the change settles, which V2ipDecoderReport::updates cannot distinguish: a value carried forward is still a stored reading.

Source

pub const IDLE: Self

The sink is configured but switched off, so no stream is expected.

This outranks every other cause: whenever it applies it is what V2ipDecoderReport::reason carries.

The causes beneath it stay set in V2ipDecoderReport::flags. A sink switched off while it was running keeps the bits the decoder genuinely observed on the way down - no packets, no format - so a classifier that tests a fault mask over the whole word calls a deliberately disabled sink broken. Ask for this cause first and stop there; the bits below it describe what was seen, not a fault to report.

This says nothing about geometry, in either direction. The decoder reports what it currently detects whatever the cause, so a switched-off sink still detecting a codestream carries a real geometry, and a zero one means the decoder has nothing rather than that the sink is off.

Older senders never report this and give Self::NO_PACKETS for a disabled sink instead, indistinguishable from one whose source has died. So an absent Self::IDLE is not evidence a sink is enabled, and nothing in this block answers enablement: it carries no such field, and the answer comes from V2IP_DEVICE_CFG or the device’s HTTP status.

Source

pub const fn from_wire(value: u8) -> Self

Wraps a raw wire value, including one this library has no name for.

Source

pub const fn to_wire(self) -> u8

Returns the raw wire value.

Trait Implementations§

Source§

impl Clone for V2ipDecoderReason

Source§

fn clone(&self) -> V2ipDecoderReason

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 Copy for V2ipDecoderReason

Source§

impl Debug for V2ipDecoderReason

Source§

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

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

impl Default for V2ipDecoderReason

Source§

fn default() -> V2ipDecoderReason

Returns the “default value” for a type. Read more
Source§

impl Display for V2ipDecoderReason

Source§

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

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

impl Eq for V2ipDecoderReason

Source§

impl Hash for V2ipDecoderReason

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for V2ipDecoderReason

Source§

fn cmp(&self, other: &V2ipDecoderReason) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl PartialEq for V2ipDecoderReason

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialOrd for V2ipDecoderReason

Source§

fn partial_cmp(&self, other: &V2ipDecoderReason) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StructuralPartialEq for V2ipDecoderReason

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.