Methods Summary |
---|
public void | _parseDetails(java.nio.ByteBuffer content)
parseVersionAndFlags(content);
trackId = IsoTypeReader.readUInt32(content);
if ((getFlags() & 0x1) == 1) { //baseDataOffsetPresent
baseDataOffset = IsoTypeReader.readUInt64(content);
}
if ((getFlags() & 0x2) == 0x2) { //sampleDescriptionIndexPresent
sampleDescriptionIndex = IsoTypeReader.readUInt32(content);
}
if ((getFlags() & 0x8) == 0x8) { //defaultSampleDurationPresent
defaultSampleDuration = IsoTypeReader.readUInt32(content);
}
if ((getFlags() & 0x10) == 0x10) { //defaultSampleSizePresent
defaultSampleSize = IsoTypeReader.readUInt32(content);
}
if ((getFlags() & 0x20) == 0x20) { //defaultSampleFlagsPresent
defaultSampleFlags = new SampleFlags(content);
}
if ((getFlags() & 0x10000) == 0x10000) { //durationIsEmpty
durationIsEmpty = true;
}
|
public long | getBaseDataOffset()
return baseDataOffset;
|
protected void | getContent(java.nio.ByteBuffer byteBuffer)
writeVersionAndFlags(byteBuffer);
IsoTypeWriter.writeUInt32(byteBuffer, trackId);
if ((getFlags() & 0x1) == 1) { //baseDataOffsetPresent
IsoTypeWriter.writeUInt64(byteBuffer, getBaseDataOffset());
}
if ((getFlags() & 0x2) == 0x2) { //sampleDescriptionIndexPresent
IsoTypeWriter.writeUInt32(byteBuffer, getSampleDescriptionIndex());
}
if ((getFlags() & 0x8) == 0x8) { //defaultSampleDurationPresent
IsoTypeWriter.writeUInt32(byteBuffer, getDefaultSampleDuration());
}
if ((getFlags() & 0x10) == 0x10) { //defaultSampleSizePresent
IsoTypeWriter.writeUInt32(byteBuffer, getDefaultSampleSize());
}
if ((getFlags() & 0x20) == 0x20) { //defaultSampleFlagsPresent
defaultSampleFlags.getContent(byteBuffer);
}
|
protected long | getContentSize()
long size = 8;
int flags = getFlags();
if ((flags & 0x1) == 1) { //baseDataOffsetPresent
size += 8;
}
if ((flags & 0x2) == 0x2) { //sampleDescriptionIndexPresent
size += 4;
}
if ((flags & 0x8) == 0x8) { //defaultSampleDurationPresent
size += 4;
}
if ((flags & 0x10) == 0x10) { //defaultSampleSizePresent
size += 4;
}
if ((flags & 0x20) == 0x20) { //defaultSampleFlagsPresent
size += 4;
}
return size;
|
public long | getDefaultSampleDuration()
return defaultSampleDuration;
|
public SampleFlags | getDefaultSampleFlags()
return defaultSampleFlags;
|
public long | getDefaultSampleSize()
return defaultSampleSize;
|
public long | getSampleDescriptionIndex()
return sampleDescriptionIndex;
|
public long | getTrackId()
return trackId;
|
public boolean | hasBaseDataOffset()
return (getFlags() & 0x1) != 0;
|
public boolean | hasDefaultSampleDuration()
return (getFlags() & 0x8) != 0;
|
public boolean | hasDefaultSampleFlags()
return (getFlags() & 0x20) != 0;
|
public boolean | hasDefaultSampleSize()
return (getFlags() & 0x10) != 0;
|
public boolean | hasSampleDescriptionIndex()
return (getFlags() & 0x2) != 0;
|
public boolean | isDurationIsEmpty()
return durationIsEmpty;
|
public void | setBaseDataOffset(long baseDataOffset)
if (baseDataOffset == -1) {
setFlags(getFlags() & (Integer.MAX_VALUE ^ 0x1));
} else {
setFlags(getFlags() | 0x1); // activate the field
}
this.baseDataOffset = baseDataOffset;
|
public void | setDefaultSampleDuration(long defaultSampleDuration)
setFlags(getFlags() | 0x8); // activate the field
this.defaultSampleDuration = defaultSampleDuration;
|
public void | setDefaultSampleFlags(SampleFlags defaultSampleFlags)
setFlags(getFlags() | 0x20); // activate the field
this.defaultSampleFlags = defaultSampleFlags;
|
public void | setDefaultSampleSize(long defaultSampleSize)
setFlags(getFlags() | 0x10); // activate the field
this.defaultSampleSize = defaultSampleSize;
|
public void | setDurationIsEmpty(boolean durationIsEmpty)
setFlags(getFlags() | 0x10000); // activate the field
this.durationIsEmpty = durationIsEmpty;
|
public void | setSampleDescriptionIndex(long sampleDescriptionIndex)
if (sampleDescriptionIndex == -1) {
setFlags(getFlags() & (Integer.MAX_VALUE ^ 0x2));
} else {
setFlags(getFlags() | 0x2); // activate the field
}
this.sampleDescriptionIndex = sampleDescriptionIndex;
|
public void | setTrackId(long trackId)
this.trackId = trackId;
|
public java.lang.String | toString()
final StringBuilder sb = new StringBuilder();
sb.append("TrackFragmentHeaderBox");
sb.append("{trackId=").append(trackId);
sb.append(", baseDataOffset=").append(baseDataOffset);
sb.append(", sampleDescriptionIndex=").append(sampleDescriptionIndex);
sb.append(", defaultSampleDuration=").append(defaultSampleDuration);
sb.append(", defaultSampleSize=").append(defaultSampleSize);
sb.append(", defaultSampleFlags=").append(defaultSampleFlags);
sb.append(", durationIsEmpty=").append(durationIsEmpty);
sb.append('}");
return sb.toString();
|