protected long getContentSize() { long contentSize = 4; if (getVersion() == 1) { contentSize += 8 + 8 + 4 + 8; } else { contentSize += 4 + 4 + 4 + 4; } contentSize += 2; contentSize += 2; return contentSize; }
protected long getContentSize() { long contentSize = 4; if (getVersion() == 1) { contentSize += 8 + 8 + 4 + 8; } else { contentSize += 4 + 4 + 4 + 4; } contentSize += 2; contentSize += 2; return contentSize; }
protected long getContentSize() { long contentSize = 4; if (getVersion() == 1) { contentSize += 8 + 8 + 4 + 8; } else { contentSize += 4 + 4 + 4 + 4; } contentSize += 2; contentSize += 2; return contentSize; }
protected void getContent(ByteBuffer byteBuffer) { writeVersionAndFlags(byteBuffer); if (getVersion() == 1) { IsoTypeWriter.writeUInt64(byteBuffer, DateHelper.convert(creationTime)); IsoTypeWriter.writeUInt64(byteBuffer, DateHelper.convert(modificationTime)); IsoTypeWriter.writeUInt32(byteBuffer, timescale); byteBuffer.putLong(duration); } else { IsoTypeWriter.writeUInt32(byteBuffer, DateHelper.convert(creationTime)); IsoTypeWriter.writeUInt32(byteBuffer, DateHelper.convert(modificationTime)); IsoTypeWriter.writeUInt32(byteBuffer, timescale); byteBuffer.putInt((int) duration); } IsoTypeWriter.writeIso639(byteBuffer, language); IsoTypeWriter.writeUInt16(byteBuffer, 0); } }
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); if (getVersion() == 1) { creationTime = DateHelper.convert(IsoTypeReader.readUInt64(content)); modificationTime = DateHelper.convert(IsoTypeReader.readUInt64(content)); timescale = IsoTypeReader.readUInt32(content); duration = content.getLong(); } else { creationTime = DateHelper.convert(IsoTypeReader.readUInt32(content)); modificationTime = DateHelper.convert(IsoTypeReader.readUInt32(content)); timescale = IsoTypeReader.readUInt32(content); duration = IsoTypeReader.readUInt32(content); } if (duration < -1) { LOG.logWarn("mdhd duration is not in expected range"); } language = IsoTypeReader.readIso639(content); IsoTypeReader.readUInt16(content); }
protected void getContent(ByteBuffer byteBuffer) { writeVersionAndFlags(byteBuffer); if (getVersion() == 1) { IsoTypeWriter.writeUInt64(byteBuffer, DateHelper.convert(creationTime)); IsoTypeWriter.writeUInt64(byteBuffer, DateHelper.convert(modificationTime)); IsoTypeWriter.writeUInt32(byteBuffer, timescale); IsoTypeWriter.writeUInt64(byteBuffer, duration); } else { IsoTypeWriter.writeUInt32(byteBuffer, DateHelper.convert(creationTime)); IsoTypeWriter.writeUInt32(byteBuffer, DateHelper.convert(modificationTime)); IsoTypeWriter.writeUInt32(byteBuffer, timescale); IsoTypeWriter.writeUInt32(byteBuffer, duration); } IsoTypeWriter.writeIso639(byteBuffer, language); IsoTypeWriter.writeUInt16(byteBuffer, 0); } }
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); if (getVersion() == 1) { creationTime = DateHelper.convert(IsoTypeReader.readUInt64(content)); modificationTime = DateHelper.convert(IsoTypeReader.readUInt64(content)); timescale = IsoTypeReader.readUInt32(content); duration = IsoTypeReader.readUInt64(content); } else { creationTime = DateHelper.convert(IsoTypeReader.readUInt32(content)); modificationTime = DateHelper.convert(IsoTypeReader.readUInt32(content)); timescale = IsoTypeReader.readUInt32(content); duration = IsoTypeReader.readUInt32(content); } language = IsoTypeReader.readIso639(content); IsoTypeReader.readUInt16(content); }
protected void getContent(ByteBuffer byteBuffer) { writeVersionAndFlags(byteBuffer); if (getVersion() == 1) { IsoTypeWriter.writeUInt64(byteBuffer, DateHelper.convert(creationTime)); IsoTypeWriter.writeUInt64(byteBuffer, DateHelper.convert(modificationTime)); IsoTypeWriter.writeUInt32(byteBuffer, timescale); IsoTypeWriter.writeUInt64(byteBuffer, duration); } else { IsoTypeWriter.writeUInt32(byteBuffer, DateHelper.convert(creationTime)); IsoTypeWriter.writeUInt32(byteBuffer, DateHelper.convert(modificationTime)); IsoTypeWriter.writeUInt32(byteBuffer, timescale); IsoTypeWriter.writeUInt32(byteBuffer, duration); } IsoTypeWriter.writeIso639(byteBuffer, language); IsoTypeWriter.writeUInt16(byteBuffer, 0); } }
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); if (getVersion() == 1) { creationTime = DateHelper.convert(IsoTypeReader.readUInt64(content)); modificationTime = DateHelper.convert(IsoTypeReader.readUInt64(content)); timescale = IsoTypeReader.readUInt32(content); duration = IsoTypeReader.readUInt64(content); } else { creationTime = DateHelper.convert(IsoTypeReader.readUInt32(content)); modificationTime = DateHelper.convert(IsoTypeReader.readUInt32(content)); timescale = IsoTypeReader.readUInt32(content); duration = IsoTypeReader.readUInt32(content); } language = IsoTypeReader.readIso639(content); IsoTypeReader.readUInt16(content); }