コード例 #1
0
 protected override void LoadFromStream(System.IO.Stream stream)
 {
     base.LoadFromStream(stream);
     if (Version == 1)
     {
         BaseMediaDecodeTime   = stream.ReadBEUInt64();
         TrackFragmentDuration = stream.ReadBEUInt64();
     }
     else   /* Version == 0 */
     {
         BaseMediaDecodeTime   = stream.ReadBEUInt32();
         TrackFragmentDuration = stream.ReadBEUInt32();
     }
     if (HasNTP())
     {
         NtpTimestampInteger  = stream.ReadBEUInt32();
         NtpTimestampFraction = stream.ReadBEUInt32();
     }
 }
コード例 #2
0
            protected override void LoadFromStream(System.IO.Stream stream)
            {
                base.LoadFromStream(stream);
                stream.ReadBEUInt32();
                stream.ReadBEUInt16();
                stream.ReadBEUInt16();
                CodecStreamVersion  = stream.ReadBEUInt16(); // 2 == uncompressed YCbCr
                CodecStreamRevision = stream.ReadBEUInt16();
                stream.ReadBEUInt32();                       // Reserved
                stream.ReadBEUInt32();                       // Reserved
                stream.ReadBEUInt32();                       // Reserved
                VideoWidth  = stream.ReadBEUInt16();
                VideoHeight = stream.ReadBEUInt16();
                HorzDPI     = stream.ReadBEUInt32();
                VertDPI     = stream.ReadBEUInt32();
                DataSize    = stream.ReadBEUInt32();
                FrameCount  = stream.ReadBEUInt16();
                byte count = (byte)stream.ReadByte();

                if (count > 31)
                {
                    count = 0;
                }
                if (count == 0)
                {
                    CompressorName = null;
                }
                else
                {
                    byte[] data = stream.ReadBytes(count);
                    CompressorName = Encoding.UTF8.GetString(data);
                }
                if (count != 31)
                {
                    stream.ReadBytes(31 - count);
                }
                stream.ReadBEUInt16(); // Depth?
                stream.ReadBEUInt16(); // pre_defined?
            }
コード例 #3
0
 protected override void LoadFromStream(System.IO.Stream stream)
 {
     base.LoadFromStream(stream);
     Numerator   = stream.ReadBEUInt32();
     Denominator = stream.ReadBEUInt32();
 }