Skip to main content

VideoWindowDescriptor

Struct VideoWindowDescriptor 

Source
pub struct VideoWindowDescriptor {
    pub horizontal_offset: u16,
    pub vertical_offset: u16,
    pub window_priority: u8,
}
Expand description

video_window_descriptor body (§2.6.14 Table 2-50).

Describes the window characteristics of the associated video elementary stream; its offsets reference the grid established by the stream’s paired target_background_grid_descriptor (§2.6.12). Per §2.6.15:

  • horizontal_offset — horizontal position of the top-left pixel of the video display window (or display rectangle) on the target background grid. The top-left pixel shall coincide with a grid pixel.
  • vertical_offset — vertical position of the same top-left pixel on the grid.
  • window_priority — overlap order, 0 lowest through 15 highest; windows at priority 15 are always visible.

On the wire the body is exactly 4 bytes (Table 2-50), laid out identically to the target_background_grid_descriptor’s first three fields:

byte 0: horizontal_offset bits 13..6                     (8)
byte 1: horizontal_offset bits 5..0 (6) | vertical_offset bits 13..12 (2)
byte 2: vertical_offset bits 11..4                       (8)
byte 3: vertical_offset bits 3..0 (4) | window_priority  (4)

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

Fields§

§horizontal_offset: u16

horizontal_offset (14 bits) — top-left X on the grid, in pixels.

§vertical_offset: u16

vertical_offset (14 bits) — top-left Y on the grid, in pixels.

§window_priority: u8

window_priority (4 bits) — overlap order, 0 lowest, 15 highest (always visible).

Trait Implementations§

Source§

impl Clone for VideoWindowDescriptor

Source§

fn clone(&self) -> VideoWindowDescriptor

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 VideoWindowDescriptor

Source§

impl Debug for VideoWindowDescriptor

Source§

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

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

impl Eq for VideoWindowDescriptor

Source§

impl PartialEq for VideoWindowDescriptor

Source§

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

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.