pub struct V2ipDecoderReport {
pub reason: V2ipDecoderReason,
pub blocking: bool,
pub width: u16,
pub height: u16,
pub format: V2ipDecoderFormat,
pub updates: u16,
pub flags: u32,
pub blocked_count: u32,
}Expand description
What a sink’s decoder recovered from the codestream it is being given.
This is what the decoder understood, read ahead of the scaler: the geometry is unrounded and is not what the display is being sent. It separates “the decoder understood the codestream” from “a picture came out the other end”.
Colour depth is absent on purpose and will stay absent. The video processor answers that one from a driver constant rather than from the codestream, so there is no reading to carry; assert depth at the encoder’s input bay instead.
Fields§
§reason: V2ipDecoderReasonThe primary cause of the state the decoder is in.
blocking: boolThe converter watchdog is holding the stream back.
width: u16The recovered picture width, and 0 when none was recovered.
height: u16The recovered picture height, and 0 when none was recovered.
format: V2ipDecoderFormatThe recovered colour space.
updates: u16How many readings the sink has stored. Monotonic, wrapping at 65535 after some 36 hours, and never reset.
A sink reads its video processor every two seconds and reports every second, so roughly every other report repeats a reading already seen: a frame arriving says nothing about how fresh the values in it are. This counter moves only when a reading is stored, so a processor that stopped answering leaves it still rather than implying a refresh.
After pointing a sink at something else, wait for this to advance by two before trusting the geometry. It ticks when a reply lands rather than when a query is sent, so the first tick can carry an answer the processor read fractionally before the switch; the second cannot, because at most one query is outstanding at a time.
flags: u32Every cause that applies, as bit N for reason N. See
Self::has_cause.
This is what to classify on, once V2ipDecoderReason::IDLE has been
ruled out: that cause outranks the whole word and leaves the bits below
it set, so a fault mask over flags reports a switched-off sink as
broken. Self::reason carries whichever cause won a fixed priority
contest, so a cause that is true can be absent from it while present
here. Bit 0 is cleared by the sender, so an empty word means nothing
beyond the primary cause applies.
V2ipDecoderReason::NO_FORMAT and
V2ipDecoderReason::FORMAT_MISMATCH are the two arms of one decision
and never appear together.
blocked_count: u32How many times the converter watchdog has triggered.
Implementations§
Source§impl V2ipDecoderReport
impl V2ipDecoderReport
Sourcepub const fn has_geometry(&self) -> bool
pub const fn has_geometry(&self) -> bool
Reports whether the decoder recovered a geometry.
This is what says whether the decoder is being given a codestream it
understands. Self::format cannot: it reads
V2ipDecoderFormat::RGB when nothing is arriving, which is
indistinguishable from a real RGB reading.
It answers that and nothing else. The reading is taken before any cause is decided, so it does not say whether the sink is switched on: a sink that is off can still detect a codestream, and one that is on can detect nothing.
Sourcepub const fn has_cause(&self, reason: V2ipDecoderReason) -> bool
pub const fn has_cause(&self, reason: V2ipDecoderReason) -> bool
Reports whether reason is among the causes that apply.
Self::reason carries the primary cause and flags carries all of
them at once. Bit 0 is unused, so V2ipDecoderReason::OK is never
among them and an empty word means nothing beyond the primary cause
applies.
Trait Implementations§
Source§impl Clone for V2ipDecoderReport
impl Clone for V2ipDecoderReport
Source§fn clone(&self) -> V2ipDecoderReport
fn clone(&self) -> V2ipDecoderReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more