Skip to main content

caption_rows

Function caption_rows 

Source
pub fn caption_rows(
    cues: &[CaptionCue],
) -> Result<Vec<Vec<CaptionCue>>, CaptionImportError>
Expand description

Splits cues onto rows, one caption track each. Every cue goes to the first row with room (a track holds MAX_CLIPS_PER_TRACK) whose last cue has ended by its start. O(n log n) in the cues, however many overlap.

ยงErrors

Returns CaptionImportError::TooManyRows for cues that need more rows than a project holds tracks.