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§
fn info(&self) -> &MediaInfo
Sourcefn frames(&mut self) -> Result<Frames<'_>, SourceError>
fn frames(&mut self) -> Result<Frames<'_>, SourceError>
Starts a read from the first frame.
Provided Methods§
Sourcefn sparse_frames(&mut self, wanted: &[bool]) -> Result<Frames<'_>, SourceError>
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§
impl FrameSource for RawSource
impl FrameSource for VideoSource
Available on crate feature
decode only.