Package org.mp4parser.muxer.tracks.ttml
Class TtmlTrackImpl
- java.lang.Object
-
- org.mp4parser.muxer.AbstractTrack
-
- org.mp4parser.muxer.tracks.ttml.TtmlTrackImpl
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Track
public class TtmlTrackImpl extends AbstractTrack
-
-
Constructor Summary
Constructors Constructor Description TtmlTrackImpl(String name, List<Document> ttmls)
-
Method Summary
Modifier and Type Method Description voidclose()protected static List<byte[]>extractImages(Document ttml)protected voidextractLanguage(List<Document> ttmls)protected List<String>extractMimeTypes(Document ttml)protected longfirstTimestamp(Document document)StringgetHandler()static StringgetLanguage(Document document)long[]getSampleDurations()Each samples is covers a small time span in a video.List<SampleEntry>getSampleEntries()List<Sample>getSamples()The list of all samples.SubSampleInformationBoxgetSubsampleInformationBox()TrackMetaDatagetTrackMetaData()protected longlastTimestamp(Document document)-
Methods inherited from class org.mp4parser.muxer.AbstractTrack
getCompositionTimeEntries, getDuration, getEdits, getName, getSampleDependencies, getSampleGroups, getSyncSamples
-
-
-
-
Constructor Detail
-
TtmlTrackImpl
public TtmlTrackImpl(String name, List<Document> ttmls) throws IOException, ParserConfigurationException, SAXException, XPathExpressionException, URISyntaxException
-
-
Method Detail
-
extractImages
protected static List<byte[]> extractImages(Document ttml) throws XPathExpressionException, URISyntaxException, IOException
-
firstTimestamp
protected long firstTimestamp(Document document)
-
lastTimestamp
protected long lastTimestamp(Document document)
-
extractMimeTypes
protected List<String> extractMimeTypes(Document ttml) throws XPathExpressionException
- Throws:
XPathExpressionException
-
getSampleEntries
public List<SampleEntry> getSampleEntries()
-
getSampleDurations
public long[] getSampleDurations()
Description copied from interface:TrackEach samples is covers a small time span in a video. This method returns the duration for each sample in track timescale. The array must contain exactly as many samples asTrack.getSamples()contains.- Returns:
- an array of ticks
-
getTrackMetaData
public TrackMetaData getTrackMetaData()
-
getHandler
public String getHandler()
-
getSamples
public List<Sample> getSamples()
Description copied from interface:TrackThe list of all samples.- Returns:
- this track's samples
-
getSubsampleInformationBox
public SubSampleInformationBox getSubsampleInformationBox()
- Specified by:
getSubsampleInformationBoxin interfaceTrack- Overrides:
getSubsampleInformationBoxin classAbstractTrack
-
close
public void close() throws IOException- Throws:
IOException
-
-