Skip to main content

TargetBackgroundGridDescriptor

Struct TargetBackgroundGridDescriptor 

Source
pub struct TargetBackgroundGridDescriptor {
    pub horizontal_size: u16,
    pub vertical_size: u16,
    pub aspect_ratio_information: u8,
}
Expand description

target_background_grid_descriptor body (§2.6.12 Table 2-49).

Describes a grid of unit pixels projected onto the display area (e.g. a monitor) for a video stream that is not intended to occupy the full display. A paired video_window_descriptor (§2.6.14) then places the stream’s window on this grid. Per §2.6.13:

  • horizontal_size — horizontal size of the target background grid in pixels.
  • vertical_size — vertical size of the target background grid in pixels.
  • aspect_ratio_information — sample or display aspect ratio of the grid, encoded per the aspect_ratio_information field of ITU-T Rec. H.262 | ISO/IEC 13818-2 (Table 2-49 cross-reference). Surfaced as the raw 4-bit code; this crate does not decode the H.262 table.

On the wire the body is exactly 4 bytes (Table 2-49):

byte 0: horizontal_size bits 13..6                      (8)
byte 1: horizontal_size bits 5..0 (6) | vertical_size bits 13..12 (2)
byte 2: vertical_size bits 11..4                        (8)
byte 3: vertical_size bits 3..0 (4) | aspect_ratio_information (4)

Both size fields are big-endian 14-bit unsigned values; the table carries no reserved bits, so all 32 bits are payload.

Fields§

§horizontal_size: u16

horizontal_size (14 bits) — grid width in pixels.

§vertical_size: u16

vertical_size (14 bits) — grid height in pixels.

§aspect_ratio_information: u8

aspect_ratio_information (4 bits) — raw H.262 aspect-ratio code.

Trait Implementations§

Source§

impl Clone for TargetBackgroundGridDescriptor

Source§

fn clone(&self) -> TargetBackgroundGridDescriptor

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 TargetBackgroundGridDescriptor

Source§

impl Debug for TargetBackgroundGridDescriptor

Source§

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

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

impl Eq for TargetBackgroundGridDescriptor

Source§

impl PartialEq for TargetBackgroundGridDescriptor

Source§

fn eq(&self, other: &TargetBackgroundGridDescriptor) -> 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 StructuralPartialEq for TargetBackgroundGridDescriptor

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.