Skip to main content

Module scene

Module scene 

Source
Expand description

Real-time playback of a Scene.

ScenePlayer opens every placement on the base video track of a Scene and plays them back in order, mapping each clip’s frame PTS to the unified timeline coordinate. The Scene is a model-agnostic description an engine derives from its editing model.

TypeRole
ScenePlayerThin builder: call open
SceneRunnerOwns the decode pipelines; move to a thread and call run
PlayerHandleShared, cloneable control handle

§Audio

When any placement on the base video track carries an audio stream, ScenePlayer::open creates an AudioMixer with one track per audio-bearing clip. A background AudioDecoder thread is started for the active clip and pushes mono samples via AudioTrackHandle. On clip transition or seek the old thread is cancelled and a new one is started. PlayerHandle::pop_audio_samples calls AudioMixer::mix and returns interleaved stereo f32 output.

Structs§

Scene
A whole timeline’s worth of playback work, described without the editing model.
SceneAudioPlacement
One audio-only clip placed on the timeline.
SceneAudioTrack
One dedicated audio-only track (A1, A2, …).
ScenePlacement
One video clip placed on the timeline.
ScenePlayer
Thin builder for a (SceneRunner, PlayerHandle) pair backed by a Scene.
SceneRunner
Exclusive owner of the timeline decode pipeline.
SceneVideoTrack
One video track: an ordered list of clip placements along the timeline. The track’s index in Scene::video_tracks is its compositing order (0 = base).

Enums§

Pacing
How SceneRunner::run paces frame delivery.
SceneSource
The video source backing a ScenePlacement: a decoded media file, or a generated (solid-colour / text) source rendered without a file — the preview counterpart of the engine’s ClipSource. Generated sources are produced by ff-filter’s SolidSource / TextSource (the same color / drawtext filters the export path uses), so preview matches export.

Traits§

PreviewCompositor
An external compositor the preview runner can use in place of its built-in CPU compositor. Implemented by avio over ff-render; see the module docs.

Functions§

apply_xfade
Blends the outgoing frame a and incoming frame b (packed RGBA, w*h*4) at transition progress alpha (0 = all A, 1 = all B) using the xfade kind.