Methods Summary |
---|
public void | _parseDetails(java.nio.ByteBuffer content)
int pos = content.position();
content.get(new byte[4]);
String isHdlr = IsoTypeReader.read4cc(content);
if ("hdlr".equals(isHdlr)) {
// this is apple bullshit - it's NO FULLBOX
content.position(pos);
version = -1;
flags = -1;
} else {
content.position(pos);
version = IsoTypeReader.readUInt8(content);
flags = IsoTypeReader.readUInt24(content);
}
while (content.remaining() >= 8) {
try {
boxes.add(boxParser.parseBox(new ByteBufferByteChannel(content), this));
} catch (IOException e) {
throw new RuntimeException("Sebastian needs to fix 7518765283");
}
}
if (content.remaining() > 0) {
throw new RuntimeException("Sebastian needs to fix it 90732r26537");
}
|
protected void | getContent(java.nio.ByteBuffer byteBuffer)
if (isMp4Box()) {
IsoTypeWriter.writeUInt8(byteBuffer, version);
IsoTypeWriter.writeUInt24(byteBuffer, flags);
}
writeChildBoxes(byteBuffer);
|
public long | getContentSize()
if (isMp4Box()) {
// it's a fullbox
return 4 + super.getContentSize();
} else {
// it's an apple metabox
return super.getContentSize();
}
|
public long | getNumOfBytesToFirstChild()
if (isMp4Box()) {
// it's a fullbox
return 12;
} else {
// it's an apple metabox
return 8;
}
|
public boolean | isMp4Box()
return version != -1 && flags != -1;
|
public void | setMp4Box(boolean mp4)
if (mp4) {
version = 0;
flags = 0;
} else {
version = -1;
flags = -1;
}
|