Exemplo n.º 1
0
 public override void ReadData()
 {
     TrackID = Br.ReadUInt32();
     DefaultSampleDescriptionIndex = Br.ReadUInt32();
     DefaultSampleDuration         = Br.ReadUInt32();
     DefaultSampleSize             = Br.ReadUInt32();
     DefaultSampleFlags            = Br.ReadUInt32();
 }
Exemplo n.º 2
0
        public override void ReadData()
        {
            var count = Br.ReadUInt32();

            for (int i = 0; i < count; i++)
            {
                Entries.Add(Br.ReadUInt32());
            }
        }
Exemplo n.º 3
0
 public override void ReadData()
 {
     ComonentType          = new string(new [] { Br.ReadChar(), Br.ReadChar(), Br.ReadChar(), Br.ReadChar() });
     ComponentSubType      = Br.ReadUInt32();
     ComponentManufacturer = Br.ReadUInt32();
     ComponentFlags        = Br.ReadUInt32();
     ComponentFlagsMask    = Br.ReadUInt32();
     ComponentName         = Encoding.ASCII.GetString(Br.ReadBytes((int)(Size - 32)));
 }
Exemplo n.º 4
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);
            }
        }
Exemplo n.º 5
0
        public override void ReadData()
        {
            var entryCount = Br.ReadUInt32();

            for (int i = 0; i < entryCount; i++)
            {
                SttsEntries.Add(new Entry()
                {
                    Count = Br.ReadUInt32(),
                    Delta = Br.ReadUInt32()
                });
            }
        }
Exemplo n.º 6
0
 public override void ReadData()
 {
     CreationTime     = Br.ReadUInt32();
     ModificationTime = Br.ReadUInt32();
     TrackId          = Br.ReadUInt32();
     _reserved1       = Br.ReadBytes(4);
     Duration         = Br.ReadUInt32();
     _reserved2       = Br.ReadBytes(8);
     Layer            = Br.ReadUInt16();
     AlternateGroup   = Br.ReadUInt16();
     Volume           = Br.ReadInt16();
     _reserved3       = Br.ReadBytes(2);
     Matrix           = Matrix.FromByteBuffer(Br.BaseStream);
     Width            = Br.ReadUInt32();
     Height           = Br.ReadUInt32();
 }
Exemplo n.º 7
0
 public override void ReadData()
 {
     SampleSize   = Br.ReadUInt32();
     _sampleCount = Br.ReadUInt32();
     if (SampleSize != 0)
     {
         Entries[0] = SampleSize;
     }
     else
     {
         for (var i = 0; i < _sampleCount; i++)
         {
             Entries[i] = Br.ReadUInt32();
         }
     }
 }
Exemplo n.º 8
0
 public override void Read()
 {
     if (Size >= 8)
     {
         Document.MediaFile.SeekAhead(4);
         var type = Br.ReadUInt32();
         if (type == DATA)
         {
             Document.MediaFile.SeekBehind(4);
             _stringData = Br.ReadBytes((int)(Size - 8 - 4)).BytesToString();
         }
         else
         {
             Document.MediaFile.SeekBehind(8);
             base.Read();
         }
     }
     base.Read();
 }
Exemplo n.º 9
0
 public override void ReadData()
 {
     _creationTime     = Br.ReadUInt32();
     _modificationTime = Br.ReadUInt32();
     TimeScale         = Br.ReadUInt32();
     Duration          = Br.ReadUInt32();
     _preferredRate    = Br.ReadUInt32();
     _preferredVolume  = Br.ReadUInt32();
     _reserved         = Br.ReadBytes(10);
     Matrix.FromByteBuffer(Br.BaseStream);
     //_matrixStructure = Br.ReadBytes(36);
     _previewTime       = Br.ReadUInt32();
     _previewDuration   = Br.ReadUInt32();
     _posterTime        = Br.ReadUInt32();
     _selectionTime     = Br.ReadUInt32();
     _selectionDuration = Br.ReadUInt32();
     _currentTime       = Br.ReadUInt32();
     NextTrackId        = Br.ReadUInt32();
 }
Exemplo n.º 10
0
        public override void ReadData()
        {
            var count = Br.ReadUInt32();

            if (count == 0)
            {
                return;
            }
            for (int i = 0; i < count; i++)
            {
                Entry entry = new Entry
                {
                    FirstChunk             = Br.ReadUInt32(),
                    SamplesPerChunk        = Br.ReadUInt32(),
                    SampleDescriptionIndex = Br.ReadUInt32()
                };
                Entries.Add(entry);
            }
        }
Exemplo n.º 11
0
        public override void ReadData()
        {
            _dataReferenceIndex = Br.ReadUInt16();


            _innerVersion = Br.ReadUInt16();


            _revisionLevel = Br.ReadUInt16();


            _vendor = Br.ReadUInt32();

            _numberOfChannels = Br.ReadUInt16();


            _sampleSizeInBits = Br.ReadUInt16();


            _compressionId = Br.ReadInt16();

            _packetSize = Br.ReadUInt16();

            _sampleRate = Br.ReadUInt32();


            if (_innerVersion == 0)
            {
                return;
            }


            _samplesPerPacket = Br.ReadUInt32();


            _bytesPerPacket = Br.ReadUInt32();

            _bytesPerFrame = Br.ReadUInt32();


            _bytesPerSample = Br.ReadUInt32();
        }
Exemplo n.º 12
0
 public override void ReadData()
 {
     if (Version == 1)
     {
         CreationTime     = Br.ReadUInt64();
         ModificationTime = Br.ReadUInt64();
         TimeScale        = Br.ReadUInt32();
         Duration         = Br.ReadUInt64();
         Language         = Br.ReadIso639();
         _quality         = Br.ReadUInt16();
     }
     else
     {
         CreationTime     = Br.ReadUInt32();
         ModificationTime = Br.ReadUInt32();
         TimeScale        = Br.ReadUInt32();
         Duration         = Br.ReadUInt32();
         Language         = Br.ReadIso639();
         _quality         = Br.ReadUInt16();
     }
 }
Exemplo n.º 13
0
        public override void Read()
        {
            _type    = Br.ReadUInt32();
            _unknown = Br.ReadUInt32();
            switch (_type)
            {
            case 1:
                _dataString = ReadString((int)(Size - 8 - 8));
                return;

            case 0:
                var count = (Size - 8 - 8) / 2;
                for (int i = 0; i < count; i++)
                {
                    _dataUI16.Add(Br.ReadUInt16());
                }
                return;

            case 21:
                return;
            }
        }
Exemplo n.º 14
0
        public override void ReadData()
        {
            byte   tagType          = 0;
            uint   length           = 0;
            Action ReadTagAndLength = () =>
            {
                tagType = Br.ReadByte();
                length  = Br.ReadUInt32();
            };

            ReadTagAndLength();
            _MP4ESDescrTag_ID = Br.ReadUInt16();
            if (tagType == MP4ESDescrTag)
            {
                _MP4ESDescrTag_Priority = Br.ReadByte();
            }
            ReadTagAndLength();
            if (tagType == MP4DecConfigDescrTag)
            {
                _MP4DecConfigDescrTag_ObjectTypeID = Br.ReadByte();
                _MP4DecConfigDescrTag_StreamType   = Br.ReadByte();
                _MP4DecConfigDescrTag_BufferSizeDB = Br.ReadU24();
                _MP4DecConfigDescrTag_MaxBitRate   = Br.ReadUInt32();
                _MP4DecConfigDescrTag_AvgBitRate   = Br.ReadUInt32();
                ReadTagAndLength();
                if (tagType == MP4UnknownTag)
                {
                    if (tagType == MP4DecSpecificDescrTag)
                    {
                        //iso14496-3
                        //http://wiki.multimedia.cx/index.php?title=MPEG-4_Audio
                        ExtraDataStart  = Br.BaseStream.Position;
                        ExtraDataLength = length;
                        SkipRead(false);
                    }
                }
            }
        }
Exemplo n.º 15
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);
            }
        }
Exemplo n.º 16
0
 public override void ReadData()
 {
     _reserved                     = Br.ReadUInt16();
     _referenceIndex               = Br.ReadUInt16();
     _qtVideoEncodingVersion       = Br.ReadUInt16();
     _qtVideoEncodingRevisionLevel = Br.ReadUInt16();
     _qtVideoEncodingVendor        = Br.ReadUInt32();
     _qtVideoTemporalQuality       = Br.ReadUInt32();
     _qtVideoSpatialQuality        = Br.ReadUInt32();
     _videoFramePixelSize          = Br.ReadUInt32();
     _horizontalDpi                = Br.ReadUInt32();
     _verticalDpi                  = Br.ReadUInt32();
     _qtVideoDataSize              = Br.ReadUInt32();
     _videoFrameCount              = Br.ReadUInt16();
     _videoEncoderNameLength       = Br.ReadByte();
     if (_videoEncoderNameLength < 31)
     {
         _videoEncoderNameLength = 31;
     }
     _videoEncoderName    = ReadString(_videoEncoderNameLength);
     _videoPixelDepth     = Br.ReadUInt16();
     _qtVideoColorTableId = Br.ReadUInt16();
 }
Exemplo n.º 17
0
 public override void ReadData()
 {
     Br.ReadUInt32();
 }
Exemplo n.º 18
0
 public override void ReadData()
 {
     _sequenceNumber = Br.ReadUInt32();
 }