Package org.mp4parser.muxer.tracks
Class DivideTimeScaleTrack
- java.lang.Object
-
- org.mp4parser.muxer.tracks.DivideTimeScaleTrack
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Track
public class DivideTimeScaleTrack extends Object implements Track
Changes the timescale of a track by wrapping the track.
-
-
Constructor Summary
Constructors Constructor Description DivideTimeScaleTrack(Track source, int timeScaleDivisor)
-
Method Summary
Modifier and Type Method Description voidclose()List<CompositionTimeToSample.Entry>getCompositionTimeEntries()longgetDuration()The duration of the track in track timescale.List<Edit>getEdits()StringgetHandler()StringgetName()A name for identification purposes.List<SampleDependencyTypeBox.Entry>getSampleDependencies()long[]getSampleDurations()Each samples is covers a small time span in a video.List<SampleEntry>getSampleEntries()Map<GroupEntry,long[]>getSampleGroups()List<Sample>getSamples()The list of all samples.SubSampleInformationBoxgetSubsampleInformationBox()long[]getSyncSamples()TrackMetaDatagetTrackMetaData()StringtoString()
-
-
-
Constructor Detail
-
DivideTimeScaleTrack
public DivideTimeScaleTrack(Track source, int timeScaleDivisor)
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getSampleEntries
public List<SampleEntry> getSampleEntries()
- Specified by:
getSampleEntriesin interfaceTrack
-
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.- Specified by:
getSampleDurationsin interfaceTrack- Returns:
- an array of ticks
-
getCompositionTimeEntries
public List<CompositionTimeToSample.Entry> getCompositionTimeEntries()
- Specified by:
getCompositionTimeEntriesin interfaceTrack
-
getSyncSamples
public long[] getSyncSamples()
- Specified by:
getSyncSamplesin interfaceTrack
-
getSampleDependencies
public List<SampleDependencyTypeBox.Entry> getSampleDependencies()
- Specified by:
getSampleDependenciesin interfaceTrack
-
getTrackMetaData
public TrackMetaData getTrackMetaData()
- Specified by:
getTrackMetaDatain interfaceTrack
-
getHandler
public String getHandler()
- Specified by:
getHandlerin interfaceTrack
-
getSamples
public List<Sample> getSamples()
Description copied from interface:TrackThe list of all samples.- Specified by:
getSamplesin interfaceTrack- Returns:
- this track's samples
-
getSubsampleInformationBox
public SubSampleInformationBox getSubsampleInformationBox()
- Specified by:
getSubsampleInformationBoxin interfaceTrack
-
getDuration
public long getDuration()
Description copied from interface:TrackThe duration of the track in track timescale. It's the sum of all samples' duration and does NOT include any edits.- Specified by:
getDurationin interfaceTrack- Returns:
- the track's duration
-
getName
public String getName()
Description copied from interface:TrackA name for identification purposes. Might return the underlying filename or network address or any other identifier. For informational/debug only. This is no metadata!
-
getSampleGroups
public Map<GroupEntry,long[]> getSampleGroups()
- Specified by:
getSampleGroupsin interfaceTrack
-
-