Package io.opentimeline.opentimelineio
Class Timeline
java.lang.Object
io.opentimeline.OTIOObject
io.opentimeline.opentimelineio.SerializableObject
io.opentimeline.opentimelineio.SerializableObjectWithMetadata
io.opentimeline.opentimelineio.Timeline
- All Implemented Interfaces:
java.lang.AutoCloseable
public class Timeline extends SerializableObjectWithMetadata
A class that contains a Stack.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Timeline.TimelineBuilder
Nested classes/interfaces inherited from class io.opentimeline.opentimelineio.SerializableObjectWithMetadata
SerializableObjectWithMetadata.SerializableObjectWithMetadataBuilder
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
Timeline()
Timeline(Timeline.TimelineBuilder builder)
Timeline(java.lang.String name, RationalTime globalStartTime, AnyDictionary metadata)
-
Method Summary
Modifier and Type Method Description java.util.stream.Stream<Composable>
eachChild(TimeRange searchRange, ErrorStatus errorStatus)
Return a flat Stream of each child, limited to the search_range.<T extends Composable>
java.util.stream.Stream<T>eachChild(TimeRange searchRange, java.lang.Class<T> descendedFrom, ErrorStatus errorStatus)
Return a flat Stream of each child of specified type, limited to the search_range.java.util.stream.Stream<Composable>
eachChild(ErrorStatus errorStatus)
Return a flat Stream of each child.<T extends Composable>
java.util.stream.Stream<T>eachChild(java.lang.Class<T> descendedFrom, ErrorStatus errorStatus)
Return a flat Stream of each child of specified type.java.util.stream.Stream<Clip>
eachClip(TimeRange searchRange, ErrorStatus errorStatus)
Return a flat Stream of each clip, limited to the search_range.java.util.stream.Stream<Clip>
eachClip(ErrorStatus errorStatus)
Return a flat Stream of each clip.java.util.List<Track>
getAudioTracks()
This convenience method returns a list of the top-level audio tracks in this timeline.RationalTime
getDuration(ErrorStatus errorStatus)
Get duration of this timeline.RationalTime
getGlobalStartTime()
Get global starting time value and rate of the timeline.TimeRange
getRangeOfChild(Composable child, ErrorStatus errorStatus)
Range of the child object contained in this timeline.Stack
getTracks()
java.util.List<Track>
getVideoTracks()
This convenience method returns a list of the top-level video tracks in this timeline.void
setGlobalStartTime(RationalTime globalStartTime)
Set global starting time value and rate of the timeline.void
setTracks(Stack stack)
java.lang.String
toString()
Methods inherited from class io.opentimeline.opentimelineio.SerializableObjectWithMetadata
getMetadata, getName, setMetadata, setName
Methods inherited from class io.opentimeline.opentimelineio.SerializableObject
clone, currentRefCount, dynamicFields, equals, fromJSONFile, fromJSONString, isEquivalentTo, isUnknownSchema, schemaName, schemaVersion, toJSONFile, toJSONFile, toJSONString, toJSONString
-
Constructor Details
-
Method Details
-
getTracks
-
setTracks
-
getGlobalStartTime
Get global starting time value and rate of the timeline.- Returns:
- global starting time value and rate of the timeline.
-
setGlobalStartTime
Set global starting time value and rate of the timeline.- Parameters:
globalStartTime
- global starting time value and rate of the timeline.
-
getDuration
Get duration of this timeline.- Parameters:
errorStatus
- errorStatus to report error while fetching duration- Returns:
- duration of the timeline.
-
getRangeOfChild
Range of the child object contained in this timeline.- Parameters:
child
- child Composable whose range is to be found.errorStatus
- errorStatus to report error while fetching range- Returns:
- range of the child object contained in this timeline.
-
getAudioTracks
This convenience method returns a list of the top-level audio tracks in this timeline.- Returns:
- a list of the top-level audio tracks in this timeline
-
getVideoTracks
This convenience method returns a list of the top-level video tracks in this timeline.- Returns:
- a list of the top-level video tracks in this timeline
-
eachChild
public <T extends Composable> java.util.stream.Stream<T> eachChild(TimeRange searchRange, java.lang.Class<T> descendedFrom, ErrorStatus errorStatus)Return a flat Stream of each child of specified type, limited to the search_range. This recursively searches all compositions.- Type Parameters:
T
- type of children to fetch- Parameters:
searchRange
- TimeRange to search indescendedFrom
- only children who are a descendent of the descendedFrom type will be in the streamerrorStatus
- errorStatus to report any error while iterating- Returns:
- a Stream consisting of all the children of specified type in the composition in the order in which it is found
-
eachChild
public java.util.stream.Stream<Composable> eachChild(TimeRange searchRange, ErrorStatus errorStatus)Return a flat Stream of each child, limited to the search_range. This recursively searches all compositions.- Parameters:
searchRange
- TimeRange to search inerrorStatus
- errorStatus to report any error while iterating- Returns:
- a Stream consisting of all the children in the composition (in the searchRange) in the order in which it is found
-
eachChild
Return a flat Stream of each child. This recursively searches all compositions.- Parameters:
errorStatus
- errorStatus to report any error while iterating- Returns:
- a Stream consisting of all the children in the composition in the order in which it is found
-
eachChild
public <T extends Composable> java.util.stream.Stream<T> eachChild(java.lang.Class<T> descendedFrom, ErrorStatus errorStatus)Return a flat Stream of each child of specified type. This recursively searches all compositions.- Type Parameters:
T
- type of children to fetch- Parameters:
descendedFrom
- only children who are a descendent of the descendedFrom type will be in the streamerrorStatus
- errorStatus to report any error while iterating- Returns:
- a Stream consisting of all the children of specified type in the composition in the order in which it is found
-
eachClip
Return a flat Stream of each clip, limited to the search_range.- Parameters:
searchRange
- TimeRange to search inerrorStatus
- errorStatus to report error while iterating- Returns:
- a Stream of all clips in the timeline (in the searchRange) in the order they are found
-
eachClip
Return a flat Stream of each clip.- Parameters:
errorStatus
- errorStatus to report error while iterating- Returns:
- a Stream of all clips in the timeline in the order they are found
-
toString
public java.lang.String toString()- Overrides:
toString
in classSerializableObjectWithMetadata
-