Пример #1
0
 public override void Read()
 {
     _configurationVersion = Br.ReadByte();
     _profile = Br.ReadByte();
     _profileCompatibility = Br.ReadByte();
     _level          = Br.ReadByte();
     _naluLengthSize = Br.ReadByte();
     _naluLengthSize = (byte)(1 + (_naluLengthSize & 0x03));
     _seqCount       = Br.ReadByte();
     _seqCount       = (byte)(_seqCount & 0x1f);
     for (int i = 0; i < _seqCount; i++)
     {
         AVCCParameter parameter;
         parameter.Size = Br.ReadUInt16();
         parameter.Data = null;
         if (parameter.Size > 0)
         {
             parameter.Data = Br.ReadBytes(parameter.Size);
         }
         _seqParameters.Add(parameter);
     }
     _picCount = Br.ReadByte();
     for (int i = 0; i < _seqCount; i++)
     {
         AVCCParameter parameter;
         parameter.Size = Br.ReadUInt16();
         parameter.Data = null;
         if (parameter.Size > 0)
         {
             parameter.Data = Br.ReadBytes(parameter.Size);
         }
         _picParameters.Add(parameter);
     }
 }
Пример #2
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();
 }
Пример #3
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();
        }
Пример #4
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();
     }
 }
Пример #5
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;
            }
        }
Пример #6
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);
                    }
                }
            }
        }
Пример #7
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();
 }
Пример #8
0
 public override void ReadData()
 {
     _graphicsMode = Br.ReadUInt16();
     _opcolor      = Br.ReadBytes(6);
 }
Пример #9
0
 public override void ReadData()
 {
     _balance  = Br.ReadUInt16();
     _reserved = Br.ReadUInt16();
 }