Package io.opentimeline.opentimelineio
Class Algorithms
java.lang.Object
io.opentimeline.opentimelineio.Algorithms
public class Algorithms
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description Algorithms()
-
Method Summary
Modifier and Type Method Description Track
flattenStack(Stack inStack, ErrorStatus errorStatus)
Flatten a Stack, into a single Track.Track
flattenStack(java.util.List<Track> tracks, ErrorStatus errorStatus)
Flatten a Stack, into a single Track.Timeline
timelineTrimmedToRange(Timeline inTimeline, TimeRange trimRange, ErrorStatus errorStatus)
Returns a new timeline that is a copy of the inTimeline, but with items outside the trimRange removed and items on the ends trimmed to the trimRange.Track
trackTrimmedToRange(Track inTrack, TimeRange trimRange, ErrorStatus errorStatus)
Returns a new track that is a copy of the inTrack, but with items outside the trimRange removed and items on the ends trimmed to the trimRange.
-
Constructor Details
-
Algorithms
public Algorithms()
-
-
Method Details
-
flattenStack
Flatten a Stack, into a single Track. Note that the 1st Track is the bottom one, and the last is the top.- Parameters:
inStack
- stack to flattenerrorStatus
- errorStatus to report error during flattening- Returns:
- flattened track
-
flattenStack
Flatten a Stack, into a single Track. Note that the 1st Track is the bottom one, and the last is the top.- Parameters:
tracks
- list of tracks to flattenerrorStatus
- errorStatus to report error during flattening- Returns:
- flattened track
-
trackTrimmedToRange
Returns a new track that is a copy of the inTrack, but with items outside the trimRange removed and items on the ends trimmed to the trimRange. Note that the track is never expanded, only shortened. Please note that you could do nearly the same thing non-destructively by just setting the Track's source_range but sometimes you want to really cut away the stuff outside and that's what this function is meant for.- Parameters:
inTrack
- track to be trimmedtrimRange
- this is the range, which the track will be trimmed toerrorStatus
- errorStatus to report error during trimming- Returns:
- trimmed track
-
timelineTrimmedToRange
public Timeline timelineTrimmedToRange(Timeline inTimeline, TimeRange trimRange, ErrorStatus errorStatus)Returns a new timeline that is a copy of the inTimeline, but with items outside the trimRange removed and items on the ends trimmed to the trimRange. Note that the timeline is never expanded, only shortened. Please note that you could do nearly the same thing non-destructively by just setting the Track's sourceRange but sometimes you want to really cut away the stuff outside and that's what this function is meant for.- Parameters:
inTimeline
- timeline to be trimmedtrimRange
- this is the range, which the timeline will be trimmed toerrorStatus
- errorStatus to report error during trimming- Returns:
- trimmed timeline
-