Skip to main content

apply_linear_stretch

Function apply_linear_stretch 

Source
pub fn apply_linear_stretch(
    cues: &[SubtitleCue],
    anchor_frame: u64,
    factor: f64,
    rate: FrameRate,
) -> Result<Vec<SubtitleCue>, TimecodeError>
Expand description

Linear time-stretch: scale all cue times relative to anchor_frame by factor.

A factor of 1.0 is identity. Factor > 1.0 stretches, < 1.0 compresses.

ยงErrors

Returns an error if any resulting timecode is invalid.