FileDocCategorySizeDatePackage
DivideTimeScaleTrack.javaAPI Docmp4parser 1.0-RC-173893Wed Dec 19 20:10:37 GMT 2012com.googlecode.mp4parser.authoring.tracks

DivideTimeScaleTrack

public class DivideTimeScaleTrack extends Object implements com.googlecode.mp4parser.authoring.Track
Changes the timescale of a track by wrapping the track.

Fields Summary
com.googlecode.mp4parser.authoring.Track
source
private int
timeScaleDivisor
Constructors Summary
public DivideTimeScaleTrack(com.googlecode.mp4parser.authoring.Track source, int timeScaleDivisor)

        this.source = source;
        this.timeScaleDivisor = timeScaleDivisor;
    
Methods Summary
java.util.ListadjustCtts()

        List<CompositionTimeToSample.Entry> origCtts = this.source.getCompositionTimeEntries();
        if (origCtts != null) {
            List<CompositionTimeToSample.Entry> entries2 = new ArrayList<CompositionTimeToSample.Entry>(origCtts.size());
            for (CompositionTimeToSample.Entry entry : origCtts) {
                entries2.add(new CompositionTimeToSample.Entry(entry.getCount(), entry.getOffset() / timeScaleDivisor));
            }
            return entries2;
        } else {
            return null;
        }
    
java.util.ListadjustTts()

        List<TimeToSampleBox.Entry> origTts = source.getDecodingTimeEntries();
        LinkedList<TimeToSampleBox.Entry> entries2 = new LinkedList<TimeToSampleBox.Entry>();
        for (TimeToSampleBox.Entry e : origTts) {
            entries2.add(new TimeToSampleBox.Entry(e.getCount(), e.getDelta() / timeScaleDivisor));
        }
        return entries2;
    
public java.util.ListgetCompositionTimeEntries()

        return adjustCtts();
    
public java.util.ListgetDecodingTimeEntries()

        return adjustTts();
    
public java.lang.StringgetHandler()

        return source.getHandler();
    
public BoxgetMediaHeaderBox()

        return source.getMediaHeaderBox();
    
public java.util.ListgetSampleDependencies()

        return source.getSampleDependencies();
    
public SampleDescriptionBoxgetSampleDescriptionBox()

        return source.getSampleDescriptionBox();
    
public java.util.ListgetSamples()

        return source.getSamples();
    
public SubSampleInformationBoxgetSubsampleInformationBox()

        return source.getSubsampleInformationBox();
    
public long[]getSyncSamples()

        return source.getSyncSamples();
    
public com.googlecode.mp4parser.authoring.TrackMetaDatagetTrackMetaData()

        TrackMetaData trackMetaData = (TrackMetaData) source.getTrackMetaData().clone();
        trackMetaData.setTimescale(source.getTrackMetaData().getTimescale() / this.timeScaleDivisor);
        return trackMetaData;
    
public booleanisEnabled()

        return source.isEnabled();
    
public booleanisInMovie()

        return source.isInMovie();
    
public booleanisInPoster()

        return source.isInPoster();
    
public booleanisInPreview()

        return source.isInPreview();
    
public java.lang.StringtoString()

        return "MultiplyTimeScaleTrack{" +
                "source=" + source +
                '}";