Class Timeline

All Implemented Interfaces:
java.lang.AutoCloseable

public class Timeline
extends SerializableObjectWithMetadata
A class that contains a Stack.
  • Constructor Details

  • Method Details

    • getTracks

      public Stack getTracks()
    • setTracks

      public void setTracks​(Stack stack)
    • getGlobalStartTime

      public RationalTime getGlobalStartTime()
      Get global starting time value and rate of the timeline.
      Returns:
      global starting time value and rate of the timeline.
    • setGlobalStartTime

      public void setGlobalStartTime​(RationalTime globalStartTime)
      Set global starting time value and rate of the timeline.
      Parameters:
      globalStartTime - global starting time value and rate of the timeline.
    • getDuration

      public RationalTime getDuration​(ErrorStatus errorStatus)
      Get duration of this timeline.
      Parameters:
      errorStatus - errorStatus to report error while fetching duration
      Returns:
      duration of the timeline.
    • getRangeOfChild

      public TimeRange getRangeOfChild​(Composable child, ErrorStatus errorStatus)
      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

      public java.util.List<Track> 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

      public java.util.List<Track> 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 in
      descendedFrom - only children who are a descendent of the descendedFrom type will be in the stream
      errorStatus - 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 in
      errorStatus - 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

      public java.util.stream.Stream<Composable> eachChild​(ErrorStatus errorStatus)
      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 stream
      errorStatus - 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

      public java.util.stream.Stream<Clip> eachClip​(TimeRange searchRange, ErrorStatus errorStatus)
      Return a flat Stream of each clip, limited to the search_range.
      Parameters:
      searchRange - TimeRange to search in
      errorStatus - 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

      public java.util.stream.Stream<Clip> eachClip​(ErrorStatus errorStatus)
      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 class SerializableObjectWithMetadata