pub trait Supplier {
// Required methods
fn frame(&mut self, need: &Need) -> Result<Option<SuppliedFrame>, String>;
fn audio(&mut self, need: &Need) -> Result<SuppliedAudio, String>;
// Provided method
fn frame_into(
&mut self,
need: &Need,
place: &mut FramePlace<'_>,
) -> Result<Option<SuppliedFrame>, String> { ... }
}Expand description
Supplies the inputs a session asks for: decoded and presented frames, or audio.
Required Methods§
Sourcefn frame(&mut self, need: &Need) -> Result<Option<SuppliedFrame>, String>
fn frame(&mut self, need: &Need) -> Result<Option<SuppliedFrame>, String>
The frame a Need::SourceFrame or Need::TimelineFrame asks for, or None when no
such source frame exists.
§Errors
A decode or render failure, which ends the run.
Sourcefn audio(&mut self, need: &Need) -> Result<SuppliedAudio, String>
fn audio(&mut self, need: &Need) -> Result<SuppliedAudio, String>
The block a Need::SourceAudio or Need::TimelineAudio asks for.
§Errors
A decode or mix failure, which ends the run.
Provided Methods§
Sourcefn frame_into(
&mut self,
need: &Need,
place: &mut FramePlace<'_>,
) -> Result<Option<SuppliedFrame>, String>
fn frame_into( &mut self, need: &Need, place: &mut FramePlace<'_>, ) -> Result<Option<SuppliedFrame>, String>
Self::frame for a Need of RGBA frames, writing the pixels into the memory
FramePlace::buffer gives for their length when it gives some; the returned frame’s
rgba is then empty. The default supplies the frame as Self::frame does.
§Errors
As Self::frame.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".