Methods Summary |
---|
public void | _parseDetails(java.nio.ByteBuffer content)
parseVersionAndFlags(content);
if (getVersion() == 1) {
creationTime = IsoTypeReader.readUInt64(content);
modificationTime = IsoTypeReader.readUInt64(content);
trackId = IsoTypeReader.readUInt32(content);
IsoTypeReader.readUInt32(content);
duration = IsoTypeReader.readUInt64(content);
} else {
creationTime = IsoTypeReader.readUInt32(content);
modificationTime = IsoTypeReader.readUInt32(content);
trackId = IsoTypeReader.readUInt32(content);
IsoTypeReader.readUInt32(content);
duration = IsoTypeReader.readUInt32(content);
} // 196
IsoTypeReader.readUInt32(content);
IsoTypeReader.readUInt32(content);
layer = IsoTypeReader.readUInt16(content); // 204
alternateGroup = IsoTypeReader.readUInt16(content);
volume = IsoTypeReader.readFixedPoint88(content);
IsoTypeReader.readUInt16(content); // 212
matrix = new double[9];
int i = 0;
matrix[i++] = IsoTypeReader.readFixedPoint1616(content);
matrix[i++] = IsoTypeReader.readFixedPoint1616(content);
matrix[i++] = IsoTypeReader.readFixedPoint0230(content);
matrix[i++] = IsoTypeReader.readFixedPoint1616(content);
matrix[i++] = IsoTypeReader.readFixedPoint1616(content);
matrix[i++] = IsoTypeReader.readFixedPoint0230(content);
matrix[i++] = IsoTypeReader.readFixedPoint1616(content);
matrix[i++] = IsoTypeReader.readFixedPoint1616(content);
matrix[i] = IsoTypeReader.readFixedPoint0230(content);
width = IsoTypeReader.readFixedPoint1616(content); // 248
height = IsoTypeReader.readFixedPoint1616(content);
|
public int | getAlternateGroup()
return alternateGroup;
|
public void | getContent(java.nio.ByteBuffer byteBuffer)
writeVersionAndFlags(byteBuffer);
if (getVersion() == 1) {
IsoTypeWriter.writeUInt64(byteBuffer, creationTime);
IsoTypeWriter.writeUInt64(byteBuffer, modificationTime);
IsoTypeWriter.writeUInt32(byteBuffer, trackId);
IsoTypeWriter.writeUInt32(byteBuffer, 0);
IsoTypeWriter.writeUInt64(byteBuffer, duration);
} else {
IsoTypeWriter.writeUInt32(byteBuffer, creationTime);
IsoTypeWriter.writeUInt32(byteBuffer, modificationTime);
IsoTypeWriter.writeUInt32(byteBuffer, trackId);
IsoTypeWriter.writeUInt32(byteBuffer, 0);
IsoTypeWriter.writeUInt32(byteBuffer, duration);
} // 196
IsoTypeWriter.writeUInt32(byteBuffer, 0);
IsoTypeWriter.writeUInt32(byteBuffer, 0);
IsoTypeWriter.writeUInt16(byteBuffer, layer);
IsoTypeWriter.writeUInt16(byteBuffer, alternateGroup);
IsoTypeWriter.writeFixedPoint88(byteBuffer, volume);
IsoTypeWriter.writeUInt16(byteBuffer, 0);
int i = 0;
IsoTypeWriter.writeFixedPoint1616(byteBuffer, matrix[i++]);
IsoTypeWriter.writeFixedPoint1616(byteBuffer, matrix[i++]);
IsoTypeWriter.writeFixedPoint0230(byteBuffer, matrix[i++]);
IsoTypeWriter.writeFixedPoint1616(byteBuffer, matrix[i++]);
IsoTypeWriter.writeFixedPoint1616(byteBuffer, matrix[i++]);
IsoTypeWriter.writeFixedPoint0230(byteBuffer, matrix[i++]);
IsoTypeWriter.writeFixedPoint1616(byteBuffer, matrix[i++]);
IsoTypeWriter.writeFixedPoint1616(byteBuffer, matrix[i++]);
IsoTypeWriter.writeFixedPoint0230(byteBuffer, matrix[i]);
IsoTypeWriter.writeFixedPoint1616(byteBuffer, width);
IsoTypeWriter.writeFixedPoint1616(byteBuffer, height);
|
protected long | getContentSize()
long contentSize = 4;
if (getVersion() == 1) {
contentSize += 32;
} else {
contentSize += 20;
}
contentSize += 60;
return contentSize;
|
public long | getCreationTime()
return creationTime;
|
public long | getDuration()
return duration;
|
public double | getHeight()
return height;
|
public int | getLayer()
return layer;
|
public double[] | getMatrix()
return matrix;
|
public long | getModificationTime()
return modificationTime;
|
public long | getTrackId()
return trackId;
|
public float | getVolume()
return volume;
|
public double | getWidth()
return width;
|
public boolean | isEnabled()
return (getFlags() & 1) > 0;
|
public boolean | isInMovie()
return (getFlags() & 2) > 0;
|
public boolean | isInPoster()
return (getFlags() & 8) > 0;
|
public boolean | isInPreview()
return (getFlags() & 4) > 0;
|
public void | setAlternateGroup(int alternateGroup)
this.alternateGroup = alternateGroup;
|
public void | setCreationTime(long creationTime)
this.creationTime = creationTime;
|
public void | setDuration(long duration)
this.duration = duration;
|
public void | setHeight(double height)
this.height = height;
|
public void | setLayer(int layer)
this.layer = layer;
|
public void | setMatrix(double[] matrix)
this.matrix = matrix;
|
public void | setModificationTime(long modificationTime)
this.modificationTime = modificationTime;
|
public void | setTrackId(long trackId)
this.trackId = trackId;
|
public void | setVolume(float volume)
this.volume = volume;
|
public void | setWidth(double width)
this.width = width;
|
public java.lang.String | toString()
StringBuilder result = new StringBuilder();
result.append("TrackHeaderBox[");
result.append("creationTime=").append(getCreationTime());
result.append(";");
result.append("modificationTime=").append(getModificationTime());
result.append(";");
result.append("trackId=").append(getTrackId());
result.append(";");
result.append("duration=").append(getDuration());
result.append(";");
result.append("layer=").append(getLayer());
result.append(";");
result.append("alternateGroup=").append(getAlternateGroup());
result.append(";");
result.append("volume=").append(getVolume());
for (int i = 0; i < matrix.length; i++) {
result.append(";");
result.append("matrix").append(i).append("=").append(matrix[i]);
}
result.append(";");
result.append("width=").append(getWidth());
result.append(";");
result.append("height=").append(getHeight());
result.append("]");
return result.toString();
|