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

MultiplyTimeScaleTrack

public class MultiplyTimeScaleTrack 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
timeScaleFactor
Constructors Summary
public MultiplyTimeScaleTrack(com.googlecode.mp4parser.authoring.Track source, int timeScaleFactor)

        this.source = source;
        this.timeScaleFactor = timeScaleFactor;
    
Methods Summary
static java.util.ListadjustCtts(java.util.List source, int timeScaleFactor)

        if (source != null) {
            List<CompositionTimeToSample.Entry> entries2 = new ArrayList<CompositionTimeToSample.Entry>(source.size());
            for (CompositionTimeToSample.Entry entry : source) {
                entries2.add(new CompositionTimeToSample.Entry(entry.getCount(), timeScaleFactor * entry.getOffset()));
            }
            return entries2;
        } else {
            return null;
        }
    
static java.util.ListadjustTts(java.util.List source, int timeScaleFactor)

        LinkedList<TimeToSampleBox.Entry> entries2 = new LinkedList<TimeToSampleBox.Entry>();
        for (TimeToSampleBox.Entry e : source) {
            entries2.add(new TimeToSampleBox.Entry(e.getCount(), timeScaleFactor * e.getDelta()));
        }
        return entries2;
    
public java.util.ListgetCompositionTimeEntries()

        return adjustCtts(source.getCompositionTimeEntries(), timeScaleFactor);
    
public java.util.ListgetDecodingTimeEntries()

        return adjustTts(source.getDecodingTimeEntries(), timeScaleFactor);
    
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.timeScaleFactor);
        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 +
                '}";