pub struct VideoWallWindow {
pub pos_x: u16,
pub pos_y: u16,
pub width: u16,
pub height: u16,
pub raster_w: u16,
pub raster_h: u16,
}Expand description
Where a video-wall sink’s window sits, and the picture it was measured against.
The raster travels with the window because only the sender knows what the installer drew against; a sink deriving it from what it happens to be showing would place the window against the wrong picture.
Nothing on the receiving side is guaranteed to check any of this, so
VideoWallWindow::validate runs before every send. See
crate::Remote::store_video_wall for why that matters.
Fields§
§pos_x: u16Window origin, horizontal. A multiple of VIDEO_WALL_POS_ALIGN.
pos_y: u16Window origin, vertical. No alignment constraint.
width: u16Window width. A multiple of VIDEO_WALL_WIDTH_ALIGN, and at least
VIDEO_WALL_MIN_SIZE unless it is zero.
height: u16Window height, at least VIDEO_WALL_MIN_SIZE unless it is zero. No
alignment constraint.
raster_w: u16Active picture width the window was measured against. Zero states no raster, which is accepted and skips the containment check.
raster_h: u16Active picture height the window was measured against. See
Self::raster_w.
Implementations§
Source§impl VideoWallWindow
impl VideoWallWindow
Sourcepub const fn is_cleared(&self) -> bool
pub const fn is_cleared(&self) -> bool
Reports whether this window clears the wall rather than placing one.
Sourcepub fn validate(&self) -> Result<(), &'static str>
pub fn validate(&self) -> Result<(), &'static str>
Checks a window against the rules the sink applies to it.
Every rule here matches one the receiver enforces, and is worth applying anyway: a window the sink refuses is refused in silence. It logs locally, keeps whatever it had, and answers nothing, so a caller that skipped this would see a successful send and no wall.
The three alignments follow the sink’s hardware - the horizontal step from its framebuffer’s burst width, the width step from the pixels its pipeline moves per clock, the minimum from its scaler - and a live unit reports them over HTTP, so a caller with access to one can read them rather than trust the constants here.
A cleared window passes: zero is the protocol’s word for “clear”, not a window too small to draw. So does a window naming no raster.
Trait Implementations§
Source§impl Clone for VideoWallWindow
impl Clone for VideoWallWindow
Source§fn clone(&self) -> VideoWallWindow
fn clone(&self) -> VideoWallWindow
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more