pub struct PatternSource { /* private fields */ }Expand description
Source stage that generates deterministic raw frames from a pattern.
Implementations§
Source§impl PatternSource
impl PatternSource
Sourcepub fn new(info: FrameInfo, pattern: PatternKind, frames: usize) -> Result<Self>
pub fn new(info: FrameInfo, pattern: PatternKind, frames: usize) -> Result<Self>
Create a finite pattern source.
Sourcepub const fn pattern(&self) -> PatternKind
pub const fn pattern(&self) -> PatternKind
Pattern emitted by this source.
Sourcepub const fn frames_remaining(&self) -> usize
pub const fn frames_remaining(&self) -> usize
Number of frames still available before EOF.
Sourcepub fn fill_frame(&mut self, output: &mut [u8]) -> Result<bool>
pub fn fill_frame(&mut self, output: &mut [u8]) -> Result<bool>
Fill output with the next generated frame.
Returns Ok(false) when the finite pattern source is exhausted.
Trait Implementations§
Source§impl Clone for PatternSource
impl Clone for PatternSource
Source§impl Debug for PatternSource
impl Debug for PatternSource
Source§impl RawVideoFrameSource for PatternSource
Available on crate feature filter-pattern only.
impl RawVideoFrameSource for PatternSource
Available on crate feature
filter-pattern only.Auto Trait Implementations§
impl Forget for PatternSource
impl Freeze for PatternSource
impl RefUnwindSafe for PatternSource
impl Send for PatternSource
impl Sync for PatternSource
impl Unpin for PatternSource
impl UnsafeUnpin for PatternSource
impl UnwindSafe for PatternSource
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