Skip to main content

FrameMetadata

Struct FrameMetadata 

Source
pub struct FrameMetadata {
    pub last_present_time: i64,
    pub last_mouse_update_time: i64,
    pub accumulated_frames: u32,
    pub rects_coalesced: bool,
    pub protected_content_masked_out: bool,
    pub pointer_position: Option<(i32, i32)>,
    pub pointer_visible: bool,
    pub dirty_rects: Vec<(i32, i32, i32, i32)>,
    pub move_rects: Vec<MoveRect>,
}
Available on Windows only.
Expand description

Metadata about a captured frame.

This structure contains timing information, dirty regions, moved regions, and other metadata that can help optimize screen capture and streaming applications.

Fields§

§last_present_time: i64

Timestamp of the last desktop image update (Windows performance counter)

§last_mouse_update_time: i64

Timestamp of the last mouse update (Windows performance counter)

§accumulated_frames: u32

Number of frames accumulated since the last processed frame

§rects_coalesced: bool

Whether dirty regions were coalesced and may contain unmodified pixels

§protected_content_masked_out: bool

Whether protected content was masked out in the captured frame

§pointer_position: Option<(i32, i32)>

Mouse cursor position and visibility

§pointer_visible: bool

Whether the mouse cursor is visible

§dirty_rects: Vec<(i32, i32, i32, i32)>

List of dirty rectangles that have changed since the last frame

§move_rects: Vec<MoveRect>

List of move rectangles that have been moved since the last frame

Implementations§

Source§

impl FrameMetadata

Source

pub fn has_updates(&self) -> bool

Returns true if the frame contains any updates (dirty regions or moves)

Source

pub fn has_mouse_updates(&self) -> bool

Returns true if the mouse cursor has been updated

Source

pub fn total_change_count(&self) -> usize

Returns the total number of changed regions

Trait Implementations§

Source§

impl Clone for FrameMetadata

Source§

fn clone(&self) -> FrameMetadata

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FrameMetadata

Source§

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

Formats the value using the given formatter. Read more

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.