Skip to main content

TimeMap

Enum TimeMap 

Source
pub enum TimeMap {
    Forward,
    Reverse,
    Freeze {
        source_time: MediaTime,
    },
    Loop {
        mode: LoopMode,
    },
    Curve {
        keyframes: Vec<TimeKeyframe>,
        before: Extrapolation,
        after: Extrapolation,
    },
}
Expand description

How a clip plays its source range over its timeline range.

forward and reverse stretch the source range over the timeline range, so their speed is the ratio of the two. A loop plays the source range at its own speed for as long as the timeline range lasts. A curve names the source time at each timeline time, at any speed and in either direction.

Variants§

§

Forward

From the start of the source range to its end.

§

Reverse

From the end of the source range to its start: pictures in reverse order and sound played backwards.

§

Freeze

One source instant for the whole clip, and silence.

Fields

§source_time: MediaTime

The instant shown; inside the source range.

§

Loop

The source range again and again, at its own speed.

Fields

§mode: LoopMode

How each pass follows the one before.

§

Curve

Source time keyed over timeline time: speed ramps, reverse play and holds in one clip.

The picture shows the curve’s value rounded down to a tick and held inside source_range; a falling stretch shows the instants it names, so it is not reverse’s mirror by frame. Sound follows the curve and is silent where it stands still.

Fields

§keyframes: Vec<TimeKeyframe>

2 to MAX_KEYFRAMES keyframes, strictly ascending in time. They may lie outside the clip’s timeline range.

§before: Extrapolation

What the curve does before the first keyframe.

§after: Extrapolation

What the curve does from the last keyframe on.

Implementations§

Source§

impl TimeMap

Source

pub fn problem( &self, timeline: TimeRange, source: TimeRange, ) -> Option<TimeMapProblem>

The first thing wrong with this map on a clip of the two ranges, if anything.

Trait Implementations§

Source§

impl Clone for TimeMap

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TimeMap

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TimeMap

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for TimeMap

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for TimeMap

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for TimeMap

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for TimeMap

Source§

impl TimelineValue for TimeMap

Source§

fn shift(&mut self, delta: i64)

Moves every keyframe by delta ticks.
Source§

fn keep_window(&mut self, window: (i64, i64))

Keeps the keyframes that decide values inside window (ticks, end exclusive): those inside it and the nearest one on each side, or all of them when the window reaches past an end the value does not hold at.
Source§

fn via_clips(&self, _: &mut dyn FnMut(&ClipId))

Calls visit with each clip a data binding of the value reads through: the value’s own binding, or those of its split channels.
Source§

fn via_clips_mut(&mut self, _: &mut dyn FnMut(&mut ClipId))

Self::via_clips, to point them at other clips.

Auto Trait Implementations§

§

impl Forget for TimeMap

§

impl Freeze for TimeMap

§

impl Move for TimeMap

§

impl RefUnwindSafe for TimeMap

§

impl Send for TimeMap
where RawVecInner: Send,

§

impl Sync for TimeMap
where RawVecInner: Sync,

§

impl Unpin for TimeMap
where *const u8 is !null: Unpin,

§

impl UnsafeUnpin for TimeMap

§

impl UnwindSafe for TimeMap
where RawVecInner: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.