- All Known Implementing Classes:
AbstractMovie,AVIMovie,DefaultMovie,QuickTimeMeta
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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidReturns the total duration of the movie in seconds.getFormat(int track) Returns the position of the insertion point in seconds.Returns the position of the out point in seconds.Returns the position of the in point in seconds.intgetURI()Returns the URI associated with this movie.voidsampleToTime(int track, long sample) voidsetInsertionPoint(Rational seconds) Sets the position of the insertion point in seconds.voidsetSelectionEnd(Rational out) Sets the position of the out point in seconds.voidSets the position of the in point in seconds.longtimeToSample(int track, Rational seconds) Returns the frame number for the specified time in seconds.
-
Field Details
-
INSERTION_POINT_PROPERTY
- See Also:
-
SELECTION_START_PROPERTY
- See Also:
-
SELECTION_END_PROPERTY
- See Also:
-
URI_PROPERTY
- See Also:
-
-
Method Details
-
getDuration
Rational getDuration()Returns the total duration of the movie in seconds. -
setInsertionPoint
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
Sets the position of the in point in seconds. -
getSelectionEnd
Rational getSelectionEnd()Returns the position of the out point in seconds. -
setSelectionEnd
Sets the position of the out point in seconds. -
timeToSample
Returns the frame number for the specified time in seconds. -
addPropertyChangeListener
-
removePropertyChangeListener
-
sampleToTime
-
getTrackCount
int getTrackCount() -
getFormat
-
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.
-