public abstract class Track
extends java.lang.Object
DecoderInfo
object that contains necessary information for the
decoder.Modifier and Type | Class and Description |
---|---|
static interface |
Track.Codec |
Modifier and Type | Field and Description |
---|---|
protected DecoderInfo |
decoderInfo |
protected DecoderSpecificInfo |
decoderSpecificInfo |
protected Protection |
protection |
protected TrackHeaderBox |
tkhd |
Modifier and Type | Method and Description |
---|---|
protected void |
findDecoderSpecificInfo(ESDBox esds) |
abstract Track.Codec |
getCodec() |
java.util.Date |
getCreationTime()
Returns the time this track was created.
|
DecoderInfo |
getDecoderInfo()
Returns the
DecoderInfo , if present. |
byte[] |
getDecoderSpecificInfo()
Returns the decoder specific info, if present.
|
java.util.Locale |
getLanguage()
Returns the language for this media.
|
java.net.URL |
getLocation()
If the data for this track is not present in this file (if
isInFile returns false), this method returns the data's
location. |
java.util.Date |
getModificationTime()
Returns the last time this track was modified.
|
Protection |
getProtection()
Returns the
ProtectionInformation object that contains
details about the DRM system used. |
abstract Type |
getType() |
boolean |
hasMoreFrames()
Indicates if there are more frames to be read in this track.
|
boolean |
isEnabled()
Returns true if the track is enabled.
|
boolean |
isInFile()
Returns true if the data for this track is present in this file (stream).
|
boolean |
isUsed()
Returns true if the track is used in the presentation.
|
boolean |
isUsedForPreview()
Returns true if the track is used in previews.
|
protected <T> void |
parseSampleEntry(Box sampleEntry,
java.lang.Class<T> clazz) |
Frame |
readNextFrame()
Reads the next frame from this track.
|
double |
seek(double timestamp)
This method tries to seek to the frame that is nearest to the given
timestamp.
|
protected final TrackHeaderBox tkhd
protected DecoderSpecificInfo decoderSpecificInfo
protected DecoderInfo decoderInfo
protected Protection protection
protected void findDecoderSpecificInfo(ESDBox esds)
protected <T> void parseSampleEntry(Box sampleEntry, java.lang.Class<T> clazz)
public abstract Type getType()
public abstract Track.Codec getCodec()
public boolean isEnabled()
public boolean isUsed()
public boolean isUsedForPreview()
public java.util.Date getCreationTime()
public java.util.Date getModificationTime()
public java.util.Locale getLanguage()
public boolean isInFile()
getLocation()
returns the URL where the data can be
found.public java.net.URL getLocation()
isInFile
returns false), this method returns the data's
location. Else null is returned.public byte[] getDecoderSpecificInfo()
DecoderInfo
.getDecoderInfo()
public DecoderInfo getDecoderInfo()
DecoderInfo
, if present. It contains
configuration information for the decoder. If the structure is not
present, the track contains a decoder specific info.getDecoderSpecificInfo()
public Protection getProtection()
ProtectionInformation
object that contains
details about the DRM system used. If no protection is present this
method returns null.ProtectionInformation
object or null if no
protection is usedpublic boolean hasMoreFrames()
public Frame readNextFrame() throws java.io.IOException
java.io.IOException
- if reading failspublic double seek(double timestamp)
timestamp
- a timestamp to seek to