pub trait SourceFrames {
// Required method
fn frame(
&mut self,
need: &FrameNeed,
index: u64,
cancel: &CancelToken,
) -> Result<Option<SourceFrame>, String>;
// Provided methods
fn release_finished(&mut self, _time: MediaTime) { ... }
fn held_bytes(&self) -> u64 { ... }
}Expand description
Decoded frames of the project’s sources, by need.
Required Methods§
Sourcefn frame(
&mut self,
need: &FrameNeed,
index: u64,
cancel: &CancelToken,
) -> Result<Option<SourceFrame>, String>
fn frame( &mut self, need: &FrameNeed, index: u64, cancel: &CancelToken, ) -> Result<Option<SourceFrame>, String>
The decoded frame need of output frame index shows: the frame presented at its media
time; None for an audio source, which audio clips name but nothing draws.
§Errors
A source that cannot be opened or decoded there, with the reason.
Provided Methods§
Sourcefn release_finished(&mut self, _time: MediaTime)
fn release_finished(&mut self, _time: MediaTime)
Lets go of what only frames before timeline time read; called before the frame at time
is decoded.
Sourcefn held_bytes(&self) -> u64
fn held_bytes(&self) -> u64
Bytes of decoded frames held outside the prepared-frame cache.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".