Skip to main content

V2ipDecoderReport

Struct V2ipDecoderReport 

Source
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: V2ipDecoderReason

The primary cause of the state the decoder is in.

§blocking: bool

The converter watchdog is holding the stream back.

§width: u16

The recovered picture width, and 0 when none was recovered.

§height: u16

The recovered picture height, and 0 when none was recovered.

§format: V2ipDecoderFormat

The recovered colour space.

§updates: u16

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

Every cause that applies, as bit N for reason N. See Self::has_cause.

This is what to classify on. 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: u32

How many times the converter watchdog has triggered.

Implementations§

Source§

impl V2ipDecoderReport

Source

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.

Source

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

Source§

fn clone(&self) -> V2ipDecoderReport

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 V2ipDecoderReport

Source§

impl Debug for V2ipDecoderReport

Source§

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

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

impl Default for V2ipDecoderReport

Source§

fn default() -> V2ipDecoderReport

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

impl Eq for V2ipDecoderReport

Source§

impl PartialEq for V2ipDecoderReport

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for V2ipDecoderReport

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 = !

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.