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, each row a caption track’s worth: every cue goes to the first row that has room for another cue (a track holds MAX_CLIPS_PER_TRACK) and whose last cue has ended by its start.

Takes time n log n in the cues, however many overlap.

§Errors

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