while (moovBuffer.position() < ((startPos + parentBoxHeader.getDataLength()) - Mp4BoxHeader.HEADER_LENGTH)) {
boxHeader = new Mp4BoxHeader(moovBuffer);
if (boxHeader != null) {
boxHeader.setFilePos(moovHeader.getFilePos() + moovBuffer.position());//logger.finest("Atom " + boxHeader.getId() + " @ " + boxHeader.getFilePos() + " of size:" + boxHeader.getLength() + " ,ends @ " + (boxHeader.getFilePos() + boxHeader.getLength()));
DefaultMutableTreeNode newAtom = new DefaultMutableTreeNode(boxHeader);
parentNode.add(newAtom);
if (boxHeader.getId().equals(Mp4NotMetaFieldKey.UDTA.getFieldName())) {
udtaNode = newAtom;
}
//only interested in metaNode that is child of udta node
else if (boxHeader.getId().equals(Mp4NotMetaFieldKey.META.getFieldName()) && parentBoxHeader.getId().equals(Mp4NotMetaFieldKey.UDTA.getFieldName())) {
metaNode = newAtom;
} else if (boxHeader.getId().equals(Mp4NotMetaFieldKey.HDLR.getFieldName()) && parentBoxHeader.getId().equals(Mp4NotMetaFieldKey.META.getFieldName())) {
hdlrWithinMetaNode = newAtom;
} else if (boxHeader.getId().equals(Mp4NotMetaFieldKey.HDLR.getFieldName())) {
hdlrWithinMdiaNode = newAtom;
} else if (boxHeader.getId().equals(Mp4NotMetaFieldKey.TAGS.getFieldName())) {
tagsNode = newAtom;
} else if (boxHeader.getId().equals(Mp4NotMetaFieldKey.STCO.getFieldName())) {
if (stco == null) {
stco = new Mp4StcoBox(boxHeader, moovBuffer);
stcoNode = newAtom;
}
} else if (boxHeader.getId().equals(Mp4NotMetaFieldKey.ILST.getFieldName())) {
DefaultMutableTreeNode parent = (DefaultMutableTreeNode) parentNode.getParent();
if (parent != null) {
Mp4BoxHeader parentsParent = (Mp4BoxHeader) (parent).getUserObject();
if (parentsParent != null) {
if (parentBoxHeader.getId().equals(Mp4NotMetaFieldKey.META.getFieldName()) && parentsParent.getId().equals(Mp4NotMetaFieldKey.UDTA.getFieldName())) {
ilstNode = newAtom;