Class QuickTimeInputStream
java.lang.Object
org.monte.media.quicktime.QuickTimeInputStream
Provides low-level support for reading encoded audio and video samples from a
QuickTime file.
- Author:
- Werner Randelshofer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longprotected ImageInputStreamThe image input stream.protected QuickTimeMetaThis variable is set to non-null, when the movie meta data has been read.protected long -
Constructor Summary
ConstructorsConstructorDescriptionQuickTimeInputStream(File file) Creates a new instance.Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidEnsures that all meta-data has been read from the file.Gets the creation time of the movie.longGets the time value for current time position within the movie.longgetMediaDuration(int track) Returns the media duration of a track in the media's timescale.longgetMediaTimeScale(int track) Returns the time scale of the media in a track.Gets the modification time of the movie.longlongReturns the time scale of the movie.double[]Gets the transformation matrix of the entire movie.longGets the time value of the time of the movie poster.doubleGets the preferred rate at which to play this movie.doubleGets the preferred volume of this movie’s sound.longGets the duration of the movie preview in movie time scale units.longGets the time value in the movie at which the preview begins.intdouble[]getTransformationMatrix(int track) Gets the transformation matrix of the specified track.
-
Field Details
-
in
The image input stream. -
meta
This variable is set to non-null, when the movie meta data has been read. -
streamOffset
protected long streamOffset -
currentTime
protected long currentTime
-
-
Constructor Details
-
QuickTimeInputStream
Creates a new instance.- Parameters:
file- the input file- Throws:
IOException
-
QuickTimeInputStream
Creates a new instance.- Parameters:
in- the input stream.- Throws:
IOException
-
-
Method Details
-
getTrackCount
- Throws:
IOException
-
getMovieDuration
- Throws:
IOException
-
getCreationTime
Gets the creation time of the movie.- Throws:
IOException
-
getModificationTime
Gets the modification time of the movie.- Throws:
IOException
-
getPreferredRate
Gets the preferred rate at which to play this movie. A value of 1.0 indicates normal rate.- Throws:
IOException
-
getPreferredVolume
Gets the preferred volume of this movie’s sound. A value of 1.0 indicates full volume.- Throws:
IOException
-
getCurrentTime
Gets the time value for current time position within the movie.- Throws:
IOException
-
getPosterTime
Gets the time value of the time of the movie poster.- Throws:
IOException
-
getPreviewDuration
Gets the duration of the movie preview in movie time scale units.- Throws:
IOException
-
getPreviewTime
Gets the time value in the movie at which the preview begins.- Throws:
IOException
-
getMovieTransformationMatrix
Gets the transformation matrix of the entire movie.- Returns:
- The transformation matrix.
- Throws:
IOException
-
getMovieTimeScale
Returns the time scale of the movie.The movie time scale is used for editing tracks. Such as for specifying the start time of a track.
- Returns:
- time scale
- Throws:
IOException
-
getMediaTimeScale
Returns the time scale of the media in a track.The media time scale is used for specifying the duration of samples in a track.
- Parameters:
track- Track index.- Returns:
- time scale
- Throws:
IOException
-
getMediaDuration
Returns the media duration of a track in the media's timescale.- Parameters:
track- Track index.- Returns:
- media duration
- Throws:
IOException
-
getTransformationMatrix
Gets the transformation matrix of the specified track.- Parameters:
track- The track number.- Returns:
- The transformation matrix.
- Throws:
IOException
-
ensureRealized
Ensures that all meta-data has been read from the file.- Throws:
IOException
-
close
- Throws:
IOException
-