public SampleFlags(ByteBuffer bb) { long a = IsoTypeReader.readUInt32(bb); reserved = (byte) ((a & 0xF0000000) >> 28); isLeading = (byte) ((a & 0x0C000000) >> 26); sampleDependsOn = (byte) ((a & 0x03000000) >> 24); sampleIsDependedOn = (byte) ((a & 0x00C00000) >> 22); sampleHasRedundancy = (byte) ((a & 0x00300000) >> 20); samplePaddingValue = (byte) ((a & 0x000e0000) >> 17); sampleIsDifferenceSample = ((a & 0x00010000) >> 16) > 0; sampleDegradationPriority = (int) (a & 0x0000ffff); }
/** * 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 getContent(ByteBuffer byteBuffer) { IsoTypeWriter.writeFixedPoint1616(byteBuffer, a); IsoTypeWriter.writeFixedPoint1616(byteBuffer, b); IsoTypeWriter.writeFixedPoint0230(byteBuffer, u); IsoTypeWriter.writeFixedPoint1616(byteBuffer, c); IsoTypeWriter.writeFixedPoint1616(byteBuffer, d); IsoTypeWriter.writeFixedPoint0230(byteBuffer, v); IsoTypeWriter.writeFixedPoint1616(byteBuffer, tx); IsoTypeWriter.writeFixedPoint1616(byteBuffer, ty); IsoTypeWriter.writeFixedPoint0230(byteBuffer, w); }
public void parse(ByteBuffer bb) { fontId = IsoTypeReader.readUInt16(bb); int length = IsoTypeReader.readUInt8(bb); fontname = IsoTypeReader.readString(bb, length); }
@Override protected void getContent(ByteBuffer byteBuffer) { IsoTypeWriter.writeUInt32(byteBuffer, bufferSizeDb); IsoTypeWriter.writeUInt32(byteBuffer, maxBitrate); IsoTypeWriter.writeUInt32(byteBuffer, avgBitrate); }
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); }
protected long getContentSize() { if (zeroTerm) { return 25 + Utf8.utf8StringLengthInBytes(name); } else { return 24 + Utf8.utf8StringLengthInBytes(name); } }
@Override protected void getContent(ByteBuffer byteBuffer) { IsoTypeWriter.writeUInt16(byteBuffer, tierID); IsoTypeWriter.writeUInt8(byteBuffer, profileIndication); IsoTypeWriter.writeUInt8(byteBuffer, profile_compatibility); IsoTypeWriter.writeUInt8(byteBuffer, levelIndication); IsoTypeWriter.writeUInt8(byteBuffer, reserved1); IsoTypeWriter.writeUInt16(byteBuffer, visualWidth); IsoTypeWriter.writeUInt16(byteBuffer, visualHeight); IsoTypeWriter.writeUInt8(byteBuffer, (discardable << 6) + (constantFrameRate << 4) + reserved2); IsoTypeWriter.writeUInt16(byteBuffer, frameRate); }
public void parse(ByteBuffer in) { top = IsoTypeReader.readUInt16(in); left = IsoTypeReader.readUInt16(in); bottom = IsoTypeReader.readUInt16(in); right = IsoTypeReader.readUInt16(in); }
@Override protected void getContent(ByteBuffer byteBuffer) { IsoTypeWriter.writeUInt8(byteBuffer, (reserved1 << 6) + min_priorityId); IsoTypeWriter.writeUInt8(byteBuffer, (reserved2 << 6) + max_priorityId); }
public static void writeUInt32BE(ByteBuffer bb, long u) { assert u >= 0 && u <= 1L << 32 : "The given long is not in the range of uint32 (" + u + ")"; writeUInt16BE(bb, (int) u & 0xFFFF); writeUInt16BE(bb, (int) ((u >> 16) & 0xFFFF)); }
@Override public SampleEntry getSampleEntry() { return sampleEntries.get(index); } }
public static boolean isIgnore(Container ref, Box b, String[] ignores) { for (String ignore : ignores) { if (Path.isContained(ref, b, ignore)) { return true; } } return false; }
public void getContent(ByteBuffer bb) { IsoTypeWriter.writeUInt16(bb, top); IsoTypeWriter.writeUInt16(bb, left); IsoTypeWriter.writeUInt16(bb, bottom); IsoTypeWriter.writeUInt16(bb, right); }
@Override protected void getContent(ByteBuffer byteBuffer) { for (long trackId : trackIds) { IsoTypeWriter.writeUInt32(byteBuffer, trackId); } }
@Override public void _parseDetails(ByteBuffer content) { a = IsoTypeReader.readUInt32(content); b = IsoTypeReader.readUInt32(content); c = IsoTypeReader.readUInt32(content); d = IsoTypeReader.readUInt32(content); }
/** * 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 int getSize() { return 3 + Utf8.utf8StringLengthInBytes(namespace) + Utf8.utf8StringLengthInBytes(profileLevelIdc) + Utf8.utf8StringLengthInBytes(assetId); } }
public static void writeUInt16(ByteBuffer bb, int i) { i = i & 0xFFFF; writeUInt8(bb, i >> 8); writeUInt8(bb, i & 0xFF); }
@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); }