FileDocCategorySizeDatePackage
TrackReferenceTypeBox.javaAPI Docmp4parser 1.0-RC-172193Wed Dec 19 20:10:38 GMT 2012com.coremedia.iso.boxes

TrackReferenceTypeBox

public class TrackReferenceTypeBox extends com.googlecode.mp4parser.AbstractBox
Contains a reference to a track. The type of the box gives the kind of reference.

Fields Summary
public static final String
TYPE1
public static final String
TYPE2
private long[]
trackIds
Constructors Summary
public TrackReferenceTypeBox(String type)


       
        super(type);
    
Methods Summary
public void_parseDetails(java.nio.ByteBuffer content)

        int count = (int) (content.remaining() / 4);
        trackIds = new long[count];
        for (int i = 0; i < count; i++) {
            trackIds[i] = IsoTypeReader.readUInt32(content);
        }
    
protected voidgetContent(java.nio.ByteBuffer byteBuffer)

        for (long trackId : trackIds) {
            IsoTypeWriter.writeUInt32(byteBuffer, trackId);
        }
    
protected longgetContentSize()

        return trackIds.length * 4;
    
public long[]getTrackIds()

        return trackIds;
    
public java.lang.StringtoString()

        StringBuilder buffer = new StringBuilder();
        buffer.append("TrackReferenceTypeBox[type=").append(getType());
        for (int i = 0; i < trackIds.length; i++) {
            buffer.append(";trackId");
            buffer.append(i);
            buffer.append("=");
            buffer.append(trackIds[i]);
        }
        buffer.append("]");
        return buffer.toString();