protected long getContentSize() { long contentSize = 4; if (getVersion() == 1) { contentSize += 32; } else { contentSize += 20; } contentSize += 60; return contentSize; }
protected long getContentSize() { long contentSize = 4; if (getVersion() == 1) { contentSize += 32; } else { contentSize += 20; } contentSize += 60; return contentSize; }
protected long getContentSize() { long contentSize = 4; if (getVersion() == 1) { contentSize += 32; } else { contentSize += 20; } contentSize += 60; return contentSize; }
public void getContent(ByteBuffer byteBuffer) { writeVersionAndFlags(byteBuffer); if (getVersion() == 1) { IsoTypeWriter.writeUInt64(byteBuffer, DateHelper.convert(creationTime)); IsoTypeWriter.writeUInt64(byteBuffer, DateHelper.convert(modificationTime)); IsoTypeWriter.writeUInt32(byteBuffer, trackId); IsoTypeWriter.writeUInt32(byteBuffer, 0); byteBuffer.putLong(duration); } else { IsoTypeWriter.writeUInt32(byteBuffer, DateHelper.convert(creationTime)); IsoTypeWriter.writeUInt32(byteBuffer, DateHelper.convert(modificationTime)); IsoTypeWriter.writeUInt32(byteBuffer, trackId); IsoTypeWriter.writeUInt32(byteBuffer, 0); byteBuffer.putInt((int) 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; matrix.getContent(byteBuffer); IsoTypeWriter.writeFixedPoint1616(byteBuffer, width); IsoTypeWriter.writeFixedPoint1616(byteBuffer, height); }
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); if (getVersion() == 1) { creationTime = DateHelper.convert(IsoTypeReader.readUInt64(content)); modificationTime = DateHelper.convert(IsoTypeReader.readUInt64(content)); trackId = IsoTypeReader.readUInt32(content); IsoTypeReader.readUInt32(content); duration = content.getLong(); } else { creationTime = DateHelper.convert(IsoTypeReader.readUInt32(content)); modificationTime = DateHelper.convert(IsoTypeReader.readUInt32(content)); trackId = IsoTypeReader.readUInt32(content); IsoTypeReader.readUInt32(content); duration = content.getInt(); } // 196 if (duration < -1) { LOG.logWarn("tkhd duration is not in expected range"); } IsoTypeReader.readUInt32(content); IsoTypeReader.readUInt32(content); layer = IsoTypeReader.readUInt16(content); // 204 alternateGroup = IsoTypeReader.readUInt16(content); volume = IsoTypeReader.readFixedPoint88(content); IsoTypeReader.readUInt16(content); // 212 matrix = Matrix.fromByteBuffer(content); width = IsoTypeReader.readFixedPoint1616(content); // 248 height = IsoTypeReader.readFixedPoint1616(content); }
public void getContent(ByteBuffer byteBuffer) { writeVersionAndFlags(byteBuffer); if (getVersion() == 1) { IsoTypeWriter.writeUInt64(byteBuffer, DateHelper.convert(creationTime)); IsoTypeWriter.writeUInt64(byteBuffer, DateHelper.convert(modificationTime)); IsoTypeWriter.writeUInt32(byteBuffer, trackId); IsoTypeWriter.writeUInt32(byteBuffer, 0); IsoTypeWriter.writeUInt64(byteBuffer, duration); } else { IsoTypeWriter.writeUInt32(byteBuffer, DateHelper.convert(creationTime)); IsoTypeWriter.writeUInt32(byteBuffer, DateHelper.convert(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.writeFixedPont88(byteBuffer, volume); IsoTypeWriter.writeUInt16(byteBuffer, 0); matrix.getContent(byteBuffer); IsoTypeWriter.writeFixedPoint1616(byteBuffer, width); IsoTypeWriter.writeFixedPoint1616(byteBuffer, height); }
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); if (getVersion() == 1) { creationTime = DateHelper.convert(IsoTypeReader.readUInt64(content)); modificationTime = DateHelper.convert(IsoTypeReader.readUInt64(content)); trackId = IsoTypeReader.readUInt32(content); IsoTypeReader.readUInt32(content); duration = IsoTypeReader.readUInt64(content); } else { creationTime = DateHelper.convert(IsoTypeReader.readUInt32(content)); modificationTime = DateHelper.convert(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 = Matrix.fromByteBuffer(content); width = IsoTypeReader.readFixedPoint1616(content); // 248 height = IsoTypeReader.readFixedPoint1616(content); }
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); if (getVersion() == 1) { creationTime = DateHelper.convert(IsoTypeReader.readUInt64(content)); modificationTime = DateHelper.convert(IsoTypeReader.readUInt64(content)); trackId = IsoTypeReader.readUInt32(content); IsoTypeReader.readUInt32(content); duration = IsoTypeReader.readUInt64(content); } else { creationTime = DateHelper.convert(IsoTypeReader.readUInt32(content)); modificationTime = DateHelper.convert(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 = Matrix.fromByteBuffer(content); width = IsoTypeReader.readFixedPoint1616(content); // 248 height = IsoTypeReader.readFixedPoint1616(content); }
public void getContent(ByteBuffer byteBuffer) { writeVersionAndFlags(byteBuffer); if (getVersion() == 1) { IsoTypeWriter.writeUInt64(byteBuffer, DateHelper.convert(creationTime)); IsoTypeWriter.writeUInt64(byteBuffer, DateHelper.convert(modificationTime)); IsoTypeWriter.writeUInt32(byteBuffer, trackId); IsoTypeWriter.writeUInt32(byteBuffer, 0); IsoTypeWriter.writeUInt64(byteBuffer, duration); } else { IsoTypeWriter.writeUInt32(byteBuffer, DateHelper.convert(creationTime)); IsoTypeWriter.writeUInt32(byteBuffer, DateHelper.convert(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.writeFixedPont88(byteBuffer, volume); IsoTypeWriter.writeUInt16(byteBuffer, 0); matrix.getContent(byteBuffer); IsoTypeWriter.writeFixedPoint1616(byteBuffer, width); IsoTypeWriter.writeFixedPoint1616(byteBuffer, height); }