Realm

oa::vision::ScreenCapture

Portal-approved screen or window capture producing owned RGBA8 frames. open may show the desktop picker. poll is nonblocking and never retains a PipeWire producer slot after returning. Drop releases host resources only; close explicitly disconnects the stream and reports a disconnect failure.

StRust public API

Declaration

pub struct ScreenCapture { /* private fields */ }
Public Rust declaration.

Public Methods

pub fn poll(&mut self) -> Result<Option<VideoFrame>>
pub fn close(&mut self) -> Result<()>
pub fn is_streaming(&self) -> bool
pub const fn width(&self) -> u32
pub const fn height(&self) -> u32

Associated Functions

pub fn is_supported() -> bool
pub fn open(engine: &Engine, config: &ScreenCaptureConfig) -> Result<Self>

Public Method Documentation

pub fn poll( &mut self ) -> Result<Option<VideoFrame>>
No public source comment is attached to this declaration.
pub fn close(&mut self) -> Result<()>
No public source comment is attached to this declaration.
pub fn is_streaming( &self ) -> bool
No public source comment is attached to this declaration.
pub const fn width( &self ) -> u32
No public source comment is attached to this declaration.
pub const fn height( &self ) -> u32
No public source comment is attached to this declaration.
pub fn is_supported() -> bool
No public source comment is attached to this declaration.
pub fn open( engine: &Engine, config: &ScreenCaptureConfig ) -> Result<Self>
No public source comment is attached to this declaration.