java.lang.Object
org.monte.media.quicktime.AbstractQuickTimeStream
- Direct Known Subclasses:
QuickTimeOutputStream
This is the base class for low-level QuickTime stream IO.
FIXME - Separation between AbstractQuickTimeStream and QuickTimeOutputStream is not clean. Move write methods in the track classes down to QuickTimeOutputStream.
- Author:
- Werner Randelshofer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classAtom base class.protected classprotected static classGroups consecutive samples with the same sample description Id and with adjacent offsets in the movie file.protected classA CompositeAtom contains an ordered list of Atoms.protected classData Atom.static classAnEditdefine the portions of the media that are to be used to build up a track for a movie.protected static classGroups consecutive samples with same characteristics.protected static classQuickTime stores media data in samples.protected static classGroups consecutive samples of the same size.protected static enumThe states of the movie output stream.protected static classGroups consecutive smples of the same duration.protected classRepresents a track.protected classprotected classWideDataAtom can grow larger then 4 gigabytes. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DateCreation time of the movie.protected longThe time value for current time position within the movie.protected AbstractQuickTimeStream.WideDataAtomThis atom holds the media data.protected longOffset for the mdat atom.protected DateModification time of the movie.protected AbstractQuickTimeStream.CompositeAtomThis atom holds the moovie header.protected double[]The transformation matrix for the entire movie.protected longThe timeScale of the movie.protected ImageOutputStreamUnderlying output stream.protected longThe time value of the time of the movie poster.protected doubleThe preferred rate at which to play this movie.protected doubleThe preferred volume of this movie’s sound.protected longThe duration of the movie preview in movie time scale units.protected longThe time value in the movie at which the preview begins.protected longThe duration of the current selection in movie time scale units.protected longThe time value for the start time of the current selection.protected AbstractQuickTimeStream.StatesThe current state of the movie output stream.protected longThe offset in the underlying ImageOutputStream.protected ArrayList<AbstractQuickTimeStream.Track>The list of tracks in the movie. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected longGets the position relative to the beginning of the QuickTime stream.protected static StringintToType(int id) booleanisTrackEnabled(int track) booleanisTrackInMovie(int track) booleanisTrackInPoster(int track) booleanisTrackInPreview(int track) protected voidseekRelative(long newPosition) Seeks relative to the beginning of the QuickTime stream.voidsetTrackEnabled(int track, boolean newValue) voidsetTrackInMovie(int track, boolean newValue) voidsetTrackInPoster(int track, boolean newValue) voidsetTrackInPreview(int track, boolean newValue) protected static int
-
Field Details
-
out
Underlying output stream. -
streamOffset
protected long streamOffsetThe offset in the underlying ImageOutputStream. Normally this is 0 unless the underlying stream already contained data when it was passed to the constructor. -
mdatAtom
This atom holds the media data. -
mdatOffset
protected long mdatOffsetOffset for the mdat atom. -
moovAtom
This atom holds the moovie header. -
creationTime
Creation time of the movie. -
modificationTime
Modification time of the movie. -
movieTimeScale
protected long movieTimeScaleThe timeScale of the movie. A time value that indicates the time scale for this media—that is, the number of time units that pass per second in its time coordinate system. -
preferredRate
protected double preferredRateThe preferred rate at which to play this movie. A value of 1.0 indicates normal rate. -
preferredVolume
protected double preferredVolumeThe preferred volume of this movie’s sound. A value of 1.0 indicates full volume. -
previewTime
protected long previewTimeThe time value in the movie at which the preview begins. -
previewDuration
protected long previewDurationThe duration of the movie preview in movie time scale units. -
posterTime
protected long posterTimeThe time value of the time of the movie poster. -
selectionTime
protected long selectionTimeThe time value for the start time of the current selection. -
selectionDuration
protected long selectionDurationThe duration of the current selection in movie time scale units. -
currentTime
protected long currentTimeThe time value for current time position within the movie. -
tracks
The list of tracks in the movie. -
movieMatrix
protected double[] movieMatrixThe transformation matrix for the entire movie. -
state
The current state of the movie output stream.
-
-
Constructor Details
-
AbstractQuickTimeStream
public AbstractQuickTimeStream()
-
-
Method Details
-
setTrackEnabled
public void setTrackEnabled(int track, boolean newValue) -
isTrackEnabled
public boolean isTrackEnabled(int track) -
setTrackInMovie
public void setTrackInMovie(int track, boolean newValue) -
isTrackInMovie
public boolean isTrackInMovie(int track) -
setTrackInPreview
public void setTrackInPreview(int track, boolean newValue) -
isTrackInPreview
public boolean isTrackInPreview(int track) -
setTrackInPoster
public void setTrackInPoster(int track, boolean newValue) -
isTrackInPoster
public boolean isTrackInPoster(int track) -
getRelativeStreamPosition
Gets the position relative to the beginning of the QuickTime stream.Usually this value is equal to the stream position of the underlying ImageOutputStream, but can be larger if the underlying stream already contained data.
- Returns:
- The relative stream position.
- Throws:
IOException
-
seekRelative
Seeks relative to the beginning of the QuickTime stream.Usually this equal to seeking in the underlying ImageOutputStream, but can be different if the underlying stream already contained data.
- Throws:
IOException
-
typeToInt
-
intToType
-