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

SilenceTrackImpl

public class SilenceTrackImpl extends Object implements com.googlecode.mp4parser.authoring.Track
This is just a basic idea how things could work but they don't.

Fields Summary
com.googlecode.mp4parser.authoring.Track
source
List
samples
TimeToSampleBox.Entry
entry
Constructors Summary
public SilenceTrackImpl(com.googlecode.mp4parser.authoring.Track ofType, long ms)


         
        source = ofType;
        if ("mp4a".equals(ofType.getSampleDescriptionBox().getSampleEntry().getType())) {
            long numFrames = getTrackMetaData().getTimescale() * ms / 1000 / 1024;
            long standZeit = getTrackMetaData().getTimescale() * ms / numFrames / 1000;
            entry = new TimeToSampleBox.Entry(numFrames, standZeit);


            while (numFrames-- > 0) {
                samples.add((ByteBuffer) ByteBuffer.wrap(new byte[]{
                        0x21, 0x10, 0x04, 0x60, (byte) 0x8c, 0x1c,
                }).rewind());
            }

        } else {
            throw new RuntimeException("Tracks of type " + ofType.getClass().getSimpleName() + " are not supported");
        }
    
Methods Summary
public java.util.ListgetCompositionTimeEntries()

        return null;
    
public java.util.ListgetDecodingTimeEntries()

        return Collections.singletonList(entry);

    
public java.lang.StringgetHandler()

        return source.getHandler();
    
public BoxgetMediaHeaderBox()

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

        return null;
    
public SampleDescriptionBoxgetSampleDescriptionBox()

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

        return samples;
    
public SubSampleInformationBoxgetSubsampleInformationBox()

        return null;
    
public long[]getSyncSamples()

        return null;
    
public com.googlecode.mp4parser.authoring.TrackMetaDatagetTrackMetaData()

        return source.getTrackMetaData();
    
public booleanisEnabled()

        return source.isEnabled();
    
public booleanisInMovie()

        return source.isInMovie();
    
public booleanisInPoster()

        return source.isInPoster();
    
public booleanisInPreview()

        return source.isInPreview();