pub struct FrameSequence {
pub width: u32,
pub height: u32,
pub data: Vec<u8>,
pub n_frames: usize,
pub fps: f32,
}Fields§
§width: u32§height: u32§data: Vec<u8>Packed RGB frames concatenated: n * w * h * 3
n_frames: usize§fps: f32Implementations§
Source§impl FrameSequence
impl FrameSequence
Sourcepub fn new(width: u32, height: u32, fps: f32) -> FrameSequence
pub fn new(width: u32, height: u32, fps: f32) -> FrameSequence
Creates a default FrameSequence.
Sourcepub fn frame_bytes(&self) -> usize
pub fn frame_bytes(&self) -> usize
frame size in bytes.
Sourcepub fn push_rgb(&mut self, rgb: &[u8]) -> Result<(), CvError>
pub fn push_rgb(&mut self, rgb: &[u8]) -> Result<(), CvError>
Push one RGB frame; drops oldest if over MAX_SEQ_FRAMES.
Sourcepub fn as_packed_rgb(&self) -> &[u8] ⓘ
pub fn as_packed_rgb(&self) -> &[u8] ⓘ
Flatten for EVM APIs (all frames contiguous).
Trait Implementations§
Source§impl Clone for FrameSequence
impl Clone for FrameSequence
Source§fn clone(&self) -> FrameSequence
fn clone(&self) -> FrameSequence
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 FrameSequence
impl RefUnwindSafe for FrameSequence
impl Send for FrameSequence
impl Sync for FrameSequence
impl Unpin for FrameSequence
impl UnsafeUnpin for FrameSequence
impl UnwindSafe for FrameSequence
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more