pub struct ActiveComposition<'a> { /* private fields */ }Expand description
A clip’s composition at one timeline timestamp.
Implementations§
Source§impl<'a> ActiveComposition<'a>
impl<'a> ActiveComposition<'a>
Sourcepub const fn new(plan: &'a CompositionPlan, time: MediaTime) -> Self
pub const fn new(plan: &'a CompositionPlan, time: MediaTime) -> Self
plan at composition time time, reading no data and shown by no clip, so its shifted
clip steps are transparent.
Sourcepub const fn with_data(self, data: SampleContext<'a>) -> Self
pub const fn with_data(self, data: SampleContext<'a>) -> Self
The same composition reading data through data.
Sourcepub fn step_data(&self, step: usize) -> SampleContext<'a>
pub fn step_data(&self, step: usize) -> SampleContext<'a>
What step step’s settings read data through.
Sourcepub const fn plan(&self) -> &'a CompositionPlan
pub const fn plan(&self) -> &'a CompositionPlan
The compiled composition.
Sourcepub fn media(
&self,
) -> impl Iterator<Item = (usize, &'a SourceId, MediaTime, FrameInterpolation)> + 'a
pub fn media( &self, ) -> impl Iterator<Item = (usize, &'a SourceId, MediaTime, FrameInterpolation)> + 'a
Each host-supplied source a step reads, with step index, source time and what the step shows between two frames.
Sourcepub fn shifted_clip_time(&self, shift: MediaTime) -> Option<MediaTime>
pub fn shifted_clip_time(&self, shift: MediaTime) -> Option<MediaTime>
The source time at which a clip step read through offsets adding to shift shows the
clip: its picture at the shifted timeline time
(alpha2_model::TimeScale::shifted_time) through its time map. None when that
time is outside the clip, where the step is transparent, and when no clip shows the
composition.
Sourcepub fn shifted_clips(
&self,
) -> impl Iterator<Item = (usize, Option<MediaTime>)> + use<'a>
pub fn shifted_clips( &self, ) -> impl Iterator<Item = (usize, Option<MediaTime>)> + use<'a>
Each step that draws the clip at another time, with the source time it shows
(Self::shifted_clip_time).