pub struct VideoFrame {
pub stream_time_ns: i64,
pub sequence: u64,
pub width: u32,
pub height: u32,
pub stride: u32,
pub pixel_format: PixelFormat,
pub color_space: Option<ColorSpace>,
pub data: FrameData,
pub damage: Option<Vec<Rect>>,
}Expand description
One captured video frame with complete layout and timing metadata.
Fields§
§stream_time_ns: i64Capture timestamp in nanoseconds, monotonic within a session and
comparable with AudioFrame::stream_time_ns of the same session.
The epoch is platform-dependent (boot time on macOS/Windows,
process-relative on Linux).
sequence: u64Per-stream counter advanced once per delivered frame; a jump means frames were dropped.
width: u32§height: u32§stride: u32Bytes from the start of one row to the next in FrameData::Host.
pixel_format: PixelFormat§color_space: Option<ColorSpace>§data: FrameData§damage: Option<Vec<Rect>>Changed regions since the previous frame, when the backend knows.
Trait Implementations§
Source§impl Clone for VideoFrame
impl Clone for VideoFrame
Source§fn clone(&self) -> VideoFrame
fn clone(&self) -> VideoFrame
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VideoFrame
impl Debug for VideoFrame
Source§impl PartialEq for VideoFrame
impl PartialEq for VideoFrame
Source§fn eq(&self, other: &VideoFrame) -> bool
fn eq(&self, other: &VideoFrame) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VideoFrame
Auto Trait Implementations§
impl Freeze for VideoFrame
impl RefUnwindSafe for VideoFrame
impl Send for VideoFrame
impl Sync for VideoFrame
impl Unpin for VideoFrame
impl UnsafeUnpin for VideoFrame
impl UnwindSafe for VideoFrame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more