@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); if (getVersion() == 1) { creationTime = IsoTypeReader.readUInt64(content); modificationTime = IsoTypeReader.readUInt64(content); timescale = IsoTypeReader.readUInt32(content); duration = IsoTypeReader.readUInt64(content); } else { creationTime = IsoTypeReader.readUInt32(content); modificationTime = IsoTypeReader.readUInt32(content); timescale = IsoTypeReader.readUInt32(content); duration = IsoTypeReader.readUInt32(content); } rate = IsoTypeReader.readFixedPoint1616(content); volume = IsoTypeReader.readFixedPoint88(content); IsoTypeReader.readUInt16(content); IsoTypeReader.readUInt32(content); IsoTypeReader.readUInt32(content); matrix = new long[9]; for (int i = 0; i < 9; i++) { matrix[i] = IsoTypeReader.readUInt32(content); } previewTime = content.getInt(); previewDuration = content.getInt(); posterTime = content.getInt(); selectionTime = content.getInt(); selectionDuration = content.getInt(); currentTime = content.getInt(); nextTrackId = IsoTypeReader.readUInt32(content); }
public void _parseDetails(ByteBuffer paramByteBuffer) { parseVersionAndFlags(paramByteBuffer); int i = CastUtils.l2i(IsoTypeReader.readUInt32(paramByteBuffer)); this.entries = new ArrayList(i); for (int j = 0; j < i; ++j) { Entry localEntry = new Entry( CastUtils.l2i(IsoTypeReader.readUInt32(paramByteBuffer)), paramByteBuffer.getInt()); this.entries.add(localEntry); } }
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); sampleSize = IsoTypeReader.readUInt32(content); sampleCount = l2i(IsoTypeReader.readUInt32(content)); if (sampleSize == 0) { sampleSizes = new long[(int) sampleCount]; for (int i = 0; i < sampleCount; i++) { sampleSizes[i] = IsoTypeReader.readUInt32(content); } } }
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); maxSamplePerFrame = IsoTypeReader.readUInt32(content); unknown1 = IsoTypeReader.readUInt8(content); sampleSize = IsoTypeReader.readUInt8(content); historyMult = IsoTypeReader.readUInt8(content); initialHistory = IsoTypeReader.readUInt8(content); kModifier = IsoTypeReader.readUInt8(content); channels = IsoTypeReader.readUInt8(content); unknown2 = IsoTypeReader.readUInt16(content); maxCodedFrameSize = IsoTypeReader.readUInt32(content); bitRate = IsoTypeReader.readUInt32(content); sampleRate = IsoTypeReader.readUInt32(content); }
/** * Parses the FileChannel, in the range [start, end) and prints the elements found * * <p>Elements are printed, indented by "level" number of spaces. If an element is a container, * then its contents will be, recursively, printed, with a greater indentation. * * @param fc * @param level * @param start * @param end * @throws IOException */ private void print(FileChannel fc, int level, long start, long end) throws IOException { fc.position(start); if (end <= 0) { end = start + fc.size(); System.out.println("Setting END to " + end); } while (end - fc.position() > 8) { long begin = fc.position(); ByteBuffer bb = ByteBuffer.allocate(8); fc.read(bb); bb.rewind(); long size = IsoTypeReader.readUInt32(bb); String type = IsoTypeReader.read4cc(bb); long fin = begin + size; // indent by the required number of spaces for (int i = 0; i < level; i++) { System.out.print(" "); } System.out.println(type + "@" + (begin) + " size: " + size); if (containers.contains(type)) { print(fc, level + 1, begin + 8, fin); if (fc.position() != fin) { System.out.println("End of container contents at " + fc.position()); System.out.println(" FIN = " + fin); } } else { } fc.position(fin); } }
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); int fragmentCount = IsoTypeReader.readUInt8(content); for (int i = 0; i < fragmentCount; i++) { Entry entry = new Entry(); if (getVersion() == 0x01) { entry.fragmentAbsoluteTime = IsoTypeReader.readUInt64(content); entry.fragmentAbsoluteDuration = IsoTypeReader.readUInt64(content); } else { entry.fragmentAbsoluteTime = IsoTypeReader.readUInt32(content); entry.fragmentAbsoluteDuration = IsoTypeReader.readUInt32(content); } entries.add(entry); } }
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); entryCount = IsoTypeReader.readUInt32(content); for (int i = 0; i < entryCount; i++) { SampleEntry sampleEntry = new SampleEntry(); sampleEntry.setSampleDelta(IsoTypeReader.readUInt32(content)); int subsampleCount = IsoTypeReader.readUInt16(content); for (int j = 0; j < subsampleCount; j++) { SampleEntry.SubsampleEntry subsampleEntry = new SampleEntry.SubsampleEntry(); subsampleEntry.setSubsampleSize( getVersion() == 1 ? IsoTypeReader.readUInt32(content) : IsoTypeReader.readUInt16(content)); subsampleEntry.setSubsamplePriority(IsoTypeReader.readUInt8(content)); subsampleEntry.setDiscardable(IsoTypeReader.readUInt8(content)); subsampleEntry.setReserved(IsoTypeReader.readUInt32(content)); sampleEntry.addSubsampleEntry(subsampleEntry); } entries.add(sampleEntry); } }