public void ReadChildren(Mp4Stream stream, Mp4BoxFactory factory, long size) { this.Children = new List <Mp4Box>(); Mp4Box item = null; long bytesAvailable = size; factory.PushContext(base.Type); while ((bytesAvailable > 0L) && ((item = factory.Read(stream, ref bytesAvailable)) != null)) { item.Parent = this; this.Children.Add(item); } factory.PopContext(); }
public Mp4StsdBox(uint size, Mp4Stream stream, Mp4BoxFactory factory) : base(size, Mp4BoxType.STSD, 0L, stream) { uint num = stream.ReadUInt32(); factory.PushContext(base.Type); long bytesAvailable = (size - 12) - 4; this.Entries = new List <Mp4Box>((int)num); for (int i = 0; i < num; i++) { Mp4Box item = factory.Read(stream, ref bytesAvailable); if (item != null) { this.Entries.Add(item); } } factory.PopContext(); }