pub enum SpeedEffect {
Normal,
FreezeFrame {
at_frame: u64,
},
ConstantSpeed {
factor: f32,
},
VariableSpeed {
keyframes: Vec<(u64, f32)>,
},
}Expand description
High-level description of a speed effect applied to a clip.
Use ClipSpeedController to map playhead frame numbers to source frame
numbers under a given SpeedEffect.
Variants§
Normal
Normal forward playback at 1× speed.
FreezeFrame
Freeze the output at the source frame at_frame for the entire clip duration.
ConstantSpeed
Constant speed change (factor > 1.0 = faster, < 1.0 = slower).
VariableSpeed
Variable (ramping) speed driven by a list of (output_frame, speed_factor) keyframes.
Speed is linearly interpolated between consecutive keyframes.
Keyframes are assumed to be sorted by output_frame.
Trait Implementations§
Source§impl Clone for SpeedEffect
impl Clone for SpeedEffect
Source§fn clone(&self) -> SpeedEffect
fn clone(&self) -> SpeedEffect
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpeedEffect
impl Debug for SpeedEffect
Source§impl Default for SpeedEffect
impl Default for SpeedEffect
Source§impl PartialEq for SpeedEffect
impl PartialEq for SpeedEffect
Source§fn eq(&self, other: &SpeedEffect) -> bool
fn eq(&self, other: &SpeedEffect) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SpeedEffect
Auto Trait Implementations§
impl Freeze for SpeedEffect
impl RefUnwindSafe for SpeedEffect
impl Send for SpeedEffect
impl Sync for SpeedEffect
impl Unpin for SpeedEffect
impl UnsafeUnpin for SpeedEffect
impl UnwindSafe for SpeedEffect
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more