public override void Read(BoxReader reader) { using (new SizeChecker(this, reader)) { base.Read(reader); reader.ReadInt32(); reader.Read(handler_type, 0, 4); for (int i = 0; i < 3; i++) { reader.ReadUInt32(); } Name = reader.ReadNullTerminatedString(); // special case to take care of Apple's bug // (Apple and GoPro prepends the string with char count, but then adds one byte too many to the box size.) if (reader.BaseStream.Position != (long)(this.Size + this.Offset)) { reader.BaseStream.Position = (long)(this.Size + this.Offset); Name = Name.Substring(1); } } }
public override void Read(BoxReader reader) { using (new SizeChecker(this, reader)) { base.Read(reader); entryCount = reader.ReadUInt32(); editList = new EditList[entryCount]; for (int i = 0; i < entryCount; i++) { if (Version == 0) { editList[i].segmentDuration = reader.ReadUInt32(); editList[i].mediaTime = reader.ReadInt32(); } else // must be 1 { editList[i].segmentDuration = reader.ReadUInt64(); editList[i].mediaTime = reader.ReadInt64(); } editList[i].mediaRateInteger = (short)reader.ReadInt16(); editList[i].mediaRateFraction = (short)reader.ReadInt16(); } } }
public override void Read(BoxReader reader) { using (new SizeChecker(this, reader)) { base.Read(reader); reader.ReadInt32(); reader.Read(handler_type, 0, 4); for (int i = 0; i < 3; i++) reader.ReadUInt32(); Name = reader.ReadNullTerminatedString(); // special case to take care of Apple's bug // (Apple and GoPro prepends the string with char count, but then adds one byte too many to the box size.) if (reader.BaseStream.Position != (long)(this.Size + this.Offset)) { reader.BaseStream.Position = (long)(this.Size + this.Offset); Name = Name.Substring(1); } } }
public override void Read(BoxReader reader) { using (new SizeChecker(this, reader)) { base.Read(reader); entryCount = reader.ReadUInt32(); editList = new EditList[entryCount]; for (int i = 0; i < entryCount; i++) { if (Version == 0) { editList[i].segmentDuration = reader.ReadUInt32(); editList[i].mediaTime = reader.ReadInt32(); } else // must be 1 { editList[i].segmentDuration = reader.ReadUInt64(); editList[i].mediaTime = reader.ReadInt64(); } editList[i].mediaRateInteger = (short)reader.ReadInt16(); editList[i].mediaRateFraction = (short)reader.ReadInt16(); } } }