Struct VideoFrame
pub struct VideoFrame {
pub width: u32,
pub height: u32,
pub bgra: Vec<u8>,
pub pts_seconds: f64,
pub frame_index: u64,
}Expand description
One decoded frame in BGRA8 layout, the canonical wgpu input format for per-frame texture uploads.
Fields§
§width: u32Frame width in pixels.
height: u32Frame height in pixels.
bgra: Vec<u8>Tightly packed BGRA bytes, row-major. Length must equal
(width * height * 4) as usize.
pts_seconds: f64Presentation timestamp in seconds since the start of the stream.
frame_index: u64Zero-based frame index (monotonic across the stream).
Trait Implementations§
§impl Clone for VideoFrame
impl Clone for VideoFrame
§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 moreAuto 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