pub struct Ramp {
pub points: Vec<(f64, f64)>,
pub source_duration: f64,
}Expand description
A speed ramp (ffcine.time.ramp/1): points [(u, speed)] piecewise linear over the clip’s
source_duration seconds of source (u 0..1).
Fields§
§points: Vec<(f64, f64)>§source_duration: f64Implementations§
Source§impl Ramp
impl Ramp
Sourcepub fn segments(&self) -> Vec<(f64, f64, f64, f64, f64)>
pub fn segments(&self) -> Vec<(f64, f64, f64, f64, f64)>
render.py ramp_map: (t0, t1, s0, s1, out0) per source-time segment, output time =
out0 + integral(dt / speed).
Sourcepub fn source_time(&self, t: f64) -> f64
pub fn source_time(&self, t: f64) -> f64
Source seconds since the clip’s first frame shown at output second t (the inverse of
Ramp::segments’ map).
Sourcepub fn setpts(&self) -> String
pub fn setpts(&self) -> String
ffmpeg setpts expression mapping source time since the first frame to output time
(render.py ramp_setpts).
Sourcepub fn setpts_of(&self, x: &str) -> String
pub fn setpts_of(&self, x: &str) -> String
Ramp::setpts with the source time given by the expression x.
Trait Implementations§
impl StructuralPartialEq for Ramp
Auto Trait Implementations§
impl Forget for Ramp
impl Freeze for Ramp
impl RefUnwindSafe for Ramp
impl Send for Ramp
impl Sync for Ramp
impl Unpin for Ramp
impl UnsafeUnpin for Ramp
impl UnwindSafe for Ramp
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