public void readChildren(MP4InputStream inStream, int len) { for (int i = 0; i < len; i++) { var box = BoxFactory.parseBox(this, inStream); children.Add(box); } }
public void readChildren(MP4InputStream inStream) { while (inStream.getOffset() < (offset + size)) { var box = BoxFactory.parseBox(this, inStream); children.Add(box); } }
void readContent() { // --- read all boxes --- while (inStream.hasLeft()) { var box = BoxFactory.parseBox(null, inStream); if (boxes.Count == 0 && box.getType() != BoxType.FILE_TYPE_BOX) { throw new MP4Exception("no MP4 signature found"); } boxes.Add(box); var type = box.getType(); if (type == BoxType.FILE_TYPE_BOX) { if (ftyp == null) { ftyp = (FileTypeBox)box; } } else if (type == BoxType.MOVIE_BOX) { if (movie == null) { moov = box; } } else if (type == BoxType.PROGRESSIVE_DOWNLOAD_INFORMATION_BOX) { if (pdin == null) { pdin = (ProgressiveDownloadInformationBox)box; } } } }