pub struct SceneRunner { /* private fields */ }Expand description
Implementations§
Source§impl SceneRunner
impl SceneRunner
Sourcepub fn set_pacing(&mut self, pacing: Pacing)
pub fn set_pacing(&mut self, pacing: Pacing)
Choose how frames are paced. Call before run; the default
is Pacing::RealTime. Switching keeps the current position.
Sourcepub fn set_gpu_compositor(&mut self, compositor: Box<dyn PreviewCompositor>)
pub fn set_gpu_compositor(&mut self, compositor: Box<dyn PreviewCompositor>)
Register an external GPU compositor tried before the built-in CPU path.
Call before run. avio supplies one over ff-render.
Sourcepub fn has_gpu_compositor(&self) -> bool
pub fn has_gpu_compositor(&self) -> bool
Whether an external GPU compositor is registered (else the CPU path is used).
Sourcepub fn run(self) -> Result<(), PreviewError>
pub fn run(self) -> Result<(), PreviewError>
A/V sync presentation loop.
Plays all clips in the primary video track from start to finish (or until
a PlayerCommand::Stop is received).
Emits PlayerEvent::SeekCompleted after each successful seek,
PlayerEvent::PositionUpdate after each presented video frame,
PlayerEvent::Error on non-fatal decode errors, and
PlayerEvent::Eof before returning.
§Errors
Returns PreviewError::SeekOutOfRange if a seek command targets a
timestamp that falls outside all clips on the timeline.