pub struct Frame<'d> {
pub width: u16,
pub height: u16,
pub intervals: &'d [u32],
pub max_frame_size: Option<u32>,
}Expand description
A frame size of a Format, with the frame intervals it supports.
Fields§
§width: u16Width in pixels.
height: u16Height in pixels.
intervals: &'d [u32]Supported frame intervals in 100 ns units, e.g. 333_333 for 30 fps. At least one, at
most 56. The first is the default.
max_frame_size: Option<u32>Upper bound of a frame’s size in bytes. None defaults to the uncompressed frame size.
Implementations§
Source§impl<'d> Frame<'d>
impl<'d> Frame<'d>
Sourcepub const fn with_max_frame_size(self, max_frame_size: u32) -> Self
pub const fn with_max_frame_size(self, max_frame_size: u32) -> Self
Overrides the maximum frame size advertised in descriptors and probe/commit.
Sourcepub const fn interval_for_fps(fps: u32) -> u32
pub const fn interval_for_fps(fps: u32) -> u32
Frame interval in 100 ns units for a frame rate.
Trait Implementations§
impl<'d> Copy for Frame<'d>
Auto Trait Implementations§
impl<'d> Forget for Frame<'d>
impl<'d> Freeze for Frame<'d>
impl<'d> Move for Frame<'d>
impl<'d> RefUnwindSafe for Frame<'d>
impl<'d> Send for Frame<'d>
impl<'d> Sync for Frame<'d>
impl<'d> Unpin for Frame<'d>
impl<'d> UnsafeUnpin for Frame<'d>
impl<'d> UnwindSafe for Frame<'d>
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