Skip to main content

FrameSource

Trait FrameSource 

Source
pub trait FrameSource: Send {
    // Required methods
    fn info(&self) -> &MediaInfo;
    fn frames(&mut self) -> Result<Frames<'_>, SourceError>;

    // Provided method
    fn sparse_frames(
        &mut self,
        wanted: &[bool],
    ) -> Result<Frames<'_>, SourceError> { ... }
}
Expand description

A recording a run reads, once per pass.

Required Methods§

Source

fn info(&self) -> &MediaInfo

Source

fn frames(&mut self) -> Result<Frames<'_>, SourceError>

Starts a read from the first frame.

Provided Methods§

Source

fn sparse_frames(&mut self, wanted: &[bool]) -> Result<Frames<'_>, SourceError>

Like FrameSource::frames, but a frame whose entry in wanted is false (or past its end) may come without pixels (an empty rgba), which saves converting it. The default converts every frame.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl FrameSource for RawSource

Source§

impl FrameSource for VideoSource

Available on crate feature decode only.