#[repr(C)]pub struct mxr_v2ip_decoder_t {
pub detail: mxr_v2ip_decoder_detail_t,
pub reason: u8,
pub blocking: bool,
pub width: u16,
pub height: u16,
pub format: u16,
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. Every field but
detail is zero unless detail is MXR_V2IP_DECODER_ANSWERED.
detail follows the sink being configured rather than the sink being
enabled, so a sink that is switched off still reports - as reason 10, or
from an older sender as reason 1, which is the same reading a sink whose
source has died produces. Nothing here answers whether a sink is enabled.
Colour depth is absent on purpose and will stay absent: the video processor answers that 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§
§detail: mxr_v2ip_decoder_detail_tWhich of the three states this report is in.
reason: u8The primary cause of the state the decoder is in, by the sender’s own names: 0 OK, 1 NO_PACKETS, 2 PACKETS_DEGRADED, 3 NO_FORMAT, 4 FORMAT_MISMATCH, 5 FORMAT_REJECTED, 6 DECODER_BLOCKED, 7 SWITCH_PENDING, 8 PTP_UNLOCKED, 9 TX_BRIDGE_UNLOCKED, 10 IDLE. Firmware adds causes, so an unrecognised value is passed through as it arrived.
The primary cause only, and the numbers are identities rather than
ranks: several causes can be true at once and a fixed priority order in
the firmware decides which lands here. Classify on flags, which
carries all of them; a test against this field asks which cause won
instead. Reason 10 is the exception and is read here: it outranks the
whole word, and testing it first is what stops a switched-off sink
being reported as broken. Reason 9 is the one most often hidden here —
see flags.
A pending switch is a step in an operation someone asked for rather
than a fault, and PTP unlocked costs audio alone: audio cannot enable
and the picture is unaffected, so reporting it as a fault puts an
overlay over a good picture. Reason 10 says the sink is switched off,
and carries no implication about width and height: those are read
before any cause is decided, so a switched-off sink still detecting a
codestream reports a real geometry. An older sender reports reason 1
for the same sink, so an absent reason 10 is not evidence a sink is
enabled - nothing here answers that, which comes from
mxr_v2ip_details() or the device’s HTTP status.
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: u16The recovered colour space: 0 RGB, 1 YCbCr 4:4:4, 2 YCbCr 4:2:2, 3 YCbCr 4:2:0, 255 the decoder cannot name it.
No value here means “no signal”: a decoder with nothing to decode
reports 0, which is indistinguishable from a real RGB reading. A zero
width or height is what says the decoder recovered nothing - which
is not the same as the sink being switched off, and does not imply it. The 255
is its own value rather than the 0xF a signal report uses for an
unknown 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, where reason carries
the primary one. Bit 0 is cleared by the sender, so an empty word means
nothing beyond the primary cause applies.
This is what to classify on, once reason 10 has been ruled out. That
cause outranks the whole word and leaves the bits below it set - a sink
switched off while running keeps the bits the decoder genuinely saw on
the way down - so a fault mask over flags reports a deliberately
disabled sink as broken.
A cause that is true can be missing from
reason and present here: reason 9, the pipeline rebuilding after the
transmitter bridge stayed unlocked, sits below every input-side cause,
so a pipeline restarting in a loop shows an input-side cause in
reason and bit 9 here alone - always, rather than briefly. Bit 9
needs a sustained five seconds to appear at all, and sustained across
reports it means a restart loop rather than one event, because the
sender’s debounce restarts each time it elapses.
Reasons 3 and 4 are the two arms of one decision and never appear together.
blocked_count: u32How many times the converter watchdog has triggered.
Trait Implementations§
Source§impl Clone for mxr_v2ip_decoder_t
impl Clone for mxr_v2ip_decoder_t
Source§fn clone(&self) -> mxr_v2ip_decoder_t
fn clone(&self) -> mxr_v2ip_decoder_t
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more