Interface Movie

All Known Implementing Classes:
AbstractMovie, AVIMovie, DefaultMovie, QuickTimeMeta

public interface Movie
A movie provides an editable container for media samples in a time and tracks coordinate system.

Note this interface is work in progress. It is not part of the API yet.

A movie has a time dimension and a track dimension. The time dimension is the duration of the movie. The track dimension is a list of tracks. A track has a duration and a time offset.

 Movie duration: |------------------------------------------------|
 Track 0:         LOREMIPSUM
 Track 1:         ..............THEQUICKBROWNFOXJUMPSOVERTHELAZYDOG
 Track 2:         .....FARFARAWAYBEHINDTHEMOUNTAINS
 Track 3:         .......................THENIGHTWASHOTANDWET
    ...
 

A track provides random access to decoded samples, either by index or by a time offset.

Internally, a track consists of a media and a sequence of clips. The duration of a track is the sum of the duration of its clips.

A clips selects a contiguous sequence of samples from a media. It specifies a playback rate, and filters which are applied to the samples before they are presented. The playback rate can be negative. The duration of a clip is the duration of the samples multiplied by its absolute playback rate.

A media is made up of a sequence of samples. It provides random access to samples, either by index or by a time offset. Media provides decoding information about the samples. Including a decoding sequence for predicted samples.

A sample provides encoded data for a specified duration. A sample is a sequence of bytes located in a file at a specific offset and length.

 Track 1:         THEQUICKBROWNFOXJUMPSOVERTHELAZYDOG
 Edits:           (0)( 1 )(  2   )(   3   )(4)(  5  )

 Media:           BLAQUICKBLAJUMPSOVERBLALAZYDOGBROWNFOXBLATHEBLABLA
                     ( 1 )   (   3   )   (  5  )(  2   )   (0)
                                                           (4)

 File A:          B.L..A..Q..U..IC.K
 File B:          BLA..J.UM.PS.OV.
 File C:          ...ER.BLA.LA.ZYD...DOG
 File D:          BR..OWNF..OXB..LAT..HEB..LAB.LA..
 
Author:
Werner Randelshofer
  • Field Details

  • Method Details

    • getDuration

      Rational getDuration()
      Returns the total duration of the movie in seconds.
    • setInsertionPoint

      void setInsertionPoint(Rational seconds)
      Sets the position of the insertion point in seconds.
    • getInsertionPoint

      Rational getInsertionPoint()
      Returns the position of the insertion point in seconds. If a movie has a duration of n, then there are n+1 insertion points.
    • getSelectionStart

      Rational getSelectionStart()
      Returns the position of the in point in seconds.
    • setSelectionStart

      void setSelectionStart(Rational in)
      Sets the position of the in point in seconds.
    • getSelectionEnd

      Rational getSelectionEnd()
      Returns the position of the out point in seconds.
    • setSelectionEnd

      void setSelectionEnd(Rational out)
      Sets the position of the out point in seconds.
    • timeToSample

      long timeToSample(int track, Rational seconds)
      Returns the frame number for the specified time in seconds.
    • addPropertyChangeListener

      void addPropertyChangeListener(PropertyChangeListener listener)
    • removePropertyChangeListener

      void removePropertyChangeListener(PropertyChangeListener listener)
    • sampleToTime

      Rational sampleToTime(int track, long sample)
    • getTrackCount

      int getTrackCount()
    • getFormat

      Format getFormat(int track)
    • getFileFormat

      Format getFileFormat()
    • getReader

      MovieReader getReader()
    • getURI

      URI getURI()
      Returns the URI associated with this movie. This is typically a file, but can be null if the movie only resides in memory.
      Returns:
      The Movie URI.