Ejemplo n.º 1
0
        public int ReadPointer(int offset)
        {
            Seek(offset);
            int k = Br.ReadInt32() - 0x8000000;

            if (k < 0)
            {
                throw new NullReferenceException(Convert.ToString(offset, 16));
            }
            return(k);
        }
Ejemplo n.º 2
0
        public override void ReadData()
        {
            var count = Br.ReadUInt32();

            for (int i = 0; i < count; i++)
            {
                Entry entry;
                entry.SampleCount  = Br.ReadUInt32();
                entry.SampleOffset = Br.ReadInt32();
                Entries.Add(entry);
            }
        }
Ejemplo n.º 3
0
        public override void ReadData()
        {
            var sampleCount = Br.ReadUInt32();

            if (HasDataOffset)
            {
                DataOffset = Br.ReadInt32();
            }
            if (HasFirstSampleFlags)
            {
                _firstSampleFlags = Br.ReadUInt32();
            }
            for (var i = 0; i < sampleCount; i++)
            {
                TRUNSample sample;
                sample.Duration = HasSampleDuration ? Br.ReadUInt32() : 0;
                sample.Size     = HasSampleSize ? Br.ReadUInt32() : 0;
                sample.Flags    = HasSampleFlags? Br.ReadUInt32():0;
                sample.CompositionTimeOffset = HasSampleCompositionTimeOffsets?Br.ReadUInt32():0;
                sample.AbsoluteOffset        = 0;
                Samples.Add(sample);
            }
        }
Ejemplo n.º 4
0
 public override void ReadData()
 {
     TrackId = Br.ReadInt32();
     if (HasBaseDataOffset)
     {
         _baseDataOffset = Br.ReadInt64();
     }
     if (HasSampleDescriptionIndex)
     {
         _sampleDescriptionIndex = Br.ReadInt32();
     }
     if (HasDefaultSampleDuration)
     {
         _defaultSampleDuration = Br.ReadInt32();
     }
     if (HasDefaultSampleSize)
     {
         _defaultSampleSize = Br.ReadInt32();
     }
     if (HasDefaultSampleFlags)
     {
         _defaultSampleFlags = Br.ReadInt32();
     }
 }