pub struct Video { /* private fields */ }Expand description
Immutable decoded video frames with increasing presentation timestamps.
All frames retain a single image format, shape, and channel type. This is an inspectable value, not a codec, playback clock, capture stream, or audio muxer.
Implementations§
Source§impl Video
impl Video
Sourcepub fn new(frames: Vec<VideoFrame>) -> Result<Self, DataError>
pub fn new(frames: Vec<VideoFrame>) -> Result<Self, DataError>
Validates a nonempty sequence with strictly increasing timestamps and an identical decoded layout for every frame.
§Errors
Rejects empty sequences, more than one million frames, changing layouts, duplicate or decreasing timestamps, and overflow in logical byte counts.
Sourcepub fn frames(&self) -> &[VideoFrame]
pub fn frames(&self) -> &[VideoFrame]
Borrows the ordered decoded frames; cloning this value shares the list.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Video
impl<'de> Deserialize<'de> for Video
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Video
Auto Trait Implementations§
impl Freeze for Video
impl RefUnwindSafe for Video
impl Send for Video
impl Sync for Video
impl Unpin for Video
impl UnsafeUnpin for Video
impl UnwindSafe for Video
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