Class AbstractQuickTimeStream.Track
java.lang.Object
org.monte.media.quicktime.AbstractQuickTimeStream.Track
- Direct Known Subclasses:
AbstractQuickTimeStream.AudioTrack,AbstractQuickTimeStream.VideoTrack
- Enclosing class:
AbstractQuickTimeStream
Represents a track.
- Author:
- Werner Randelshofer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ArrayList<AbstractQuickTimeStream.Chunk> List of chunks.protected CodecThe codec.protected AbstractQuickTimeStream.Edit[]The edit list of the track.protected FormatThe format of the media in the track.protected int// Enumeration for track header flags set { TrackEnable = 0x1, // enabled track TrackInMovie = 0x2, // track in playback TrackInPreview = 0x4, // track in preview TrackInPoster = 0x8 // track in poster } TrackHeaderFlags;protected doubleprotected Bufferprotected RationalStart time of the first buffer that was added to the track.protected double[]The transformation matrix of the track.protected StringThe compression type of the media.protected StringThe compressor name.protected longThe duration of the media in this track in media time units.protected longThe timeScale of the media in the track.protected final FormatKeys.MediaTypeThe media type of the track.protected Bufferprotected longThe number of samples in this track.protected ArrayList<AbstractQuickTimeStream.SampleSizeGroup> List of SampleSize entries.protected intInterval between sync samples (keyframes).List of sync samples.List of TimeToSample entries.protected doubleprotected RationalCurrent write time. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChunk(AbstractQuickTimeStream.Chunk chunk, boolean isSyncSample) voidaddSample(AbstractQuickTimeStream.Sample sample, int sampleDescriptionId, boolean isSyncSample) intgetFirstSampleTime(long movieTimeScale) Gets the time of the first sample in the movie time scale.longlonggetTrackDuration(long movieTimeScale) Gets the track duration in the movie time scale.booleanisEmpty()booleanbooleanbooleanbooleanvoidsetEnabled(boolean newValue) voidsetInMovie(boolean newValue) voidsetInPoster(boolean newValue) voidsetInPreview(boolean newValue) protected abstract void
-
Field Details
-
mediaType
The media type of the track. -
format
The format of the media in the track. -
mediaTimeScale
protected long mediaTimeScaleThe timeScale of the media in the track. 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. -
mediaCompressionType
The compression type of the media. -
mediaCompressorName
The compressor name. -
chunks
List of chunks. -
timeToSamples
List of TimeToSample entries. -
sampleSizes
List of SampleSize entries. -
syncSamples
-
sampleCount
protected long sampleCountThe number of samples in this track. -
mediaDuration
protected long mediaDurationThe duration of the media in this track in media time units. -
editList
The edit list of the track. -
syncInterval
protected int syncIntervalInterval between sync samples (keyframes). 0 = automatic. 1 = write all samples as sync samples. n = sync every n-th sample. -
codec
The codec. -
outputBuffer
-
inputBuffer
-
inputTime
Start time of the first buffer that was added to the track. -
writeTime
Current write time. -
matrix
protected double[] matrixThe transformation matrix of the track. -
width
protected double width -
height
protected double height -
headerFlags
protected int headerFlags// Enumeration for track header flags set { TrackEnable = 0x1, // enabled track TrackInMovie = 0x2, // track in playback TrackInPreview = 0x4, // track in preview TrackInPoster = 0x8 // track in poster } TrackHeaderFlags;
-
-
Constructor Details
-
Track
-
-
Method Details
-
setEnabled
public void setEnabled(boolean newValue) -
isEnabled
public boolean isEnabled() -
setInMovie
public void setInMovie(boolean newValue) -
isInMovie
public boolean isInMovie() -
setInPreview
public void setInPreview(boolean newValue) -
isInPreview
public boolean isInPreview() -
setInPoster
public void setInPoster(boolean newValue) -
isInPoster
public boolean isInPoster() -
addSample
public void addSample(AbstractQuickTimeStream.Sample sample, int sampleDescriptionId, boolean isSyncSample) -
addChunk
-
isEmpty
public boolean isEmpty() -
getSampleCount
public long getSampleCount() -
getTrackDuration
public long getTrackDuration(long movieTimeScale) Gets the track duration in the movie time scale.- Parameters:
movieTimeScale- The time scale of the movie.
-
getFirstSampleTime
public int getFirstSampleTime(long movieTimeScale) Gets the time of the first sample in the movie time scale.- Parameters:
movieTimeScale- The time scale of the movie.
-
writeSampleDescriptionAtom
protected abstract void writeSampleDescriptionAtom(AbstractQuickTimeStream.CompositeAtom stblAtom) throws IOException - Throws:
IOException
-