Example #1
0
 public override void Read(BoxReader reader)
 {
     using (new SizeChecker(this, reader)) {
         base.Read(reader);
         Name     = reader.ReadNullTerminatedString();
         Location = reader.ReadNullTerminatedString();
     }
 }
Example #2
0
 public override void Read(BoxReader reader)
 {
     using (new SizeChecker(this, reader)) {
     base.Read(reader);
     Name = reader.ReadNullTerminatedString();
     Location = reader.ReadNullTerminatedString();
       }
 }
Example #3
0
 public override void Read(BoxReader reader)
 {
     using (new SizeChecker(this, reader)) {
     long pos = reader.BaseStream.Position;
     base.Read(reader);
     //        if (reader.BaseStream.Position - pos == this.Size) {
       // BUG!!!, Microsoft says the size is X, but it needs one more byte for the null terminated string!!!
     //          this.Size += 1;
     //          bBug = true;
     //        }
     if (EnumUtils.IsBitSet<DataEntryFlags>((DataEntryFlags)base.Flags, DataEntryFlags.MediaDataSameFile) == false)
       Location = reader.ReadNullTerminatedString();
       }
 }
Example #4
0
        public override void Read(BoxReader reader)
        {
            using (new SizeChecker(this, reader)) {
                long pos = reader.BaseStream.Position;
                base.Read(reader);
//        if (reader.BaseStream.Position - pos == this.Size) {
                // BUG!!!, Microsoft says the size is X, but it needs one more byte for the null terminated string!!!
//          this.Size += 1;
//          bBug = true;
//        }
                if (EnumUtils.IsBitSet <DataEntryFlags>((DataEntryFlags)base.Flags, DataEntryFlags.MediaDataSameFile) == false)
                {
                    Location = reader.ReadNullTerminatedString();
                }
            }
        }
 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);
     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);
     }
       }
 }