@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); shouldBeZeroButAppleWritesHereSomeValue = IsoTypeReader.readUInt32(content); handlerType = IsoTypeReader.read4cc(content); a = IsoTypeReader.readUInt32(content); b = IsoTypeReader.readUInt32(content); c = IsoTypeReader.readUInt32(content); if (content.remaining() > 0) { name = IsoTypeReader.readString(content, content.remaining()); if (name.endsWith("\0")) { name = name.substring(0, name.length() - 1); zeroTerm = true; } else { zeroTerm = false; } } else { zeroTerm = false; //No string at all, not even zero term char } }
@Override protected void _parseDetails(ByteBuffer content) { content.position(6);// ignore 6 reserved bytes; dataReferenceIndex = IsoTypeReader.readUInt16(content); // 8 reserved1 = content.getInt(); flags = IsoTypeReader.readUInt32(content); timeScale = content.getInt(); frameDuration = content.getInt(); numberOfFrames = IsoTypeReader.readUInt8(content); reserved2 = IsoTypeReader.readUInt24(content); rest = new byte[content.remaining()]; content.get(rest); }
public static int readUInt24(ByteBuffer bb) { int result = 0; result += readUInt16(bb) << 8; result += byte2int(bb.get()); return result; }
public void parse(ByteBuffer in) { startChar = IsoTypeReader.readUInt16(in); endChar = IsoTypeReader.readUInt16(in); fontId = IsoTypeReader.readUInt16(in); faceStyleFlags = IsoTypeReader.readUInt8(in); fontSize = IsoTypeReader.readUInt8(in); textColor = new int[4]; textColor[0] = IsoTypeReader.readUInt8(in); textColor[1] = IsoTypeReader.readUInt8(in); textColor[2] = IsoTypeReader.readUInt8(in); textColor[3] = IsoTypeReader.readUInt8(in); }
/** * Parses the version/flags header and returns the remaining box size. * * @param content the <code>ByteBuffer</code> that contains the version & flag * @return number of bytes read */ protected final long parseVersionAndFlags(ByteBuffer content) { version = IsoTypeReader.readUInt8(content); flags = IsoTypeReader.readUInt24(content); return 4; }
public void parse(ByteBuffer bb) { fontId = IsoTypeReader.readUInt16(bb); int length = IsoTypeReader.readUInt8(bb); fontname = IsoTypeReader.readString(bb, length); }
@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.warn("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); }
@Override public void _parseDetails(ByteBuffer content) { majorBrand = IsoTypeReader.read4cc(content); minorVersion = IsoTypeReader.readUInt32(content); int compatibleBrandsCount = content.remaining() / 4; compatibleBrands = new LinkedList<String>(); for (int i = 0; i < compatibleBrandsCount; i++) { compatibleBrands.add(IsoTypeReader.read4cc(content)); } }
@Override protected void _parseDetails(ByteBuffer content) { baseBitRate = IsoTypeReader.readUInt32(content); maxBitRate = IsoTypeReader.readUInt32(content); avgBitRate = IsoTypeReader.readUInt32(content); tierBaseBitRate = IsoTypeReader.readUInt32(content); tierMaxBitRate = IsoTypeReader.readUInt32(content); tierAvgBitRate = IsoTypeReader.readUInt32(content); }
dataSource.read(content); content.position(6); dataReferenceIndex = IsoTypeReader.readUInt16(content); long tmp = IsoTypeReader.readUInt16(content); assert 0 == tmp : "reserved byte not 0"; tmp = IsoTypeReader.readUInt16(content); assert 0 == tmp : "reserved byte not 0"; predefined[0] = IsoTypeReader.readUInt32(content); // should be zero predefined[1] = IsoTypeReader.readUInt32(content); // should be zero predefined[2] = IsoTypeReader.readUInt32(content); // should be zero width = IsoTypeReader.readUInt16(content); height = IsoTypeReader.readUInt16(content); horizresolution = IsoTypeReader.readFixedPoint1616(content); vertresolution = IsoTypeReader.readFixedPoint1616(content); tmp = IsoTypeReader.readUInt32(content); assert 0 == tmp : "reserved byte not 0"; frameCount = IsoTypeReader.readUInt16(content); int compressornameDisplayAbleData = IsoTypeReader.readUInt8(content); if (compressornameDisplayAbleData > 31) { depth = IsoTypeReader.readUInt16(content); tmp = IsoTypeReader.readUInt16(content); assert 0xFFFF == tmp;
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); if ((getFlags() & 1) == 1) { auxInfoType = IsoTypeReader.read4cc(content); auxInfoTypeParameter = IsoTypeReader.read4cc(content); } defaultSampleInfoSize = (short) IsoTypeReader.readUInt8(content); sampleCount = CastUtils.l2i(IsoTypeReader.readUInt32(content)); if (defaultSampleInfoSize == 0) { sampleInfoSizes = new short[sampleCount]; for (int i = 0; i < sampleCount; i++) { sampleInfoSizes[i] = (short) IsoTypeReader.readUInt8(content); } } }
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); if ((getFlags() & 1) == 1) { auxInfoType = IsoTypeReader.read4cc(content); auxInfoTypeParameter = IsoTypeReader.read4cc(content); } int entryCount = CastUtils.l2i(IsoTypeReader.readUInt32(content)); offsets = new long[entryCount]; for (int i = 0; i < entryCount; i++) { if (getVersion() == 0) { offsets[i] = IsoTypeReader.readUInt32(content); } else { offsets[i] = IsoTypeReader.readUInt64(content); } } }
@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 = content.getInt(); } if (duration < -1) { LOG.warn("mdhd duration is not in expected range"); } language = IsoTypeReader.readIso639(content); IsoTypeReader.readUInt16(content); }
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); maxPduSize = IsoTypeReader.readUInt16(content); avgPduSize = IsoTypeReader.readUInt16(content); maxBitrate = IsoTypeReader.readUInt32(content); avgBitrate = IsoTypeReader.readUInt32(content); IsoTypeReader.readUInt32(content); // reserved! }
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); language = IsoTypeReader.readIso639(content); name = IsoTypeReader.readString(content); role = IsoTypeReader.readUInt8(content); longitude = IsoTypeReader.readFixedPoint1616(content); latitude = IsoTypeReader.readFixedPoint1616(content); altitude = IsoTypeReader.readFixedPoint1616(content); astronomicalBody = IsoTypeReader.readString(content); additionalNotes = IsoTypeReader.readString(content); }
public Entry(EditListBox editListBox, ByteBuffer bb) { if (editListBox.getVersion() == 1) { segmentDuration = IsoTypeReader.readUInt64(bb); mediaTime = bb.getLong(); mediaRate = IsoTypeReader.readFixedPoint1616(bb); } else { segmentDuration = IsoTypeReader.readUInt32(bb); mediaTime = bb.getInt(); mediaRate = IsoTypeReader.readFixedPoint1616(bb); } this.editListBox = editListBox; }
public void parse(ByteBuffer in) { top = IsoTypeReader.readUInt16(in); left = IsoTypeReader.readUInt16(in); bottom = IsoTypeReader.readUInt16(in); right = IsoTypeReader.readUInt16(in); }
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); language = IsoTypeReader.readIso639(content); int keywordCount = IsoTypeReader.readUInt8(content); keywords = new String[keywordCount]; for (int i = 0; i < keywordCount; i++) { IsoTypeReader.readUInt8(content); keywords[i] = IsoTypeReader.readString(content); } }
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); byte[] cE = new byte[4]; content.get(cE); classificationEntity = IsoFile.bytesToFourCC(cE); classificationTableIndex = IsoTypeReader.readUInt16(content); language = IsoTypeReader.readIso639(content); classificationInfo = IsoTypeReader.readString(content); }
@Override public void _parseDetails(ByteBuffer content) { parseVersionAndFlags(content); ratingEntity = IsoTypeReader.read4cc(content); ratingCriteria = IsoTypeReader.read4cc(content); language = IsoTypeReader.readIso639(content); ratingInfo = IsoTypeReader.readString(content); }