当前位置: 首页>>代码示例>>C#>>正文


C# Stream.ReadBEUInt32方法代码示例

本文整理汇总了C#中Stream.ReadBEUInt32方法的典型用法代码示例。如果您正苦于以下问题:C# Stream.ReadBEUInt32方法的具体用法?C# Stream.ReadBEUInt32怎么用?C# Stream.ReadBEUInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Stream的用法示例。


在下文中一共展示了Stream.ReadBEUInt32方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoadFromStream

        protected override void LoadFromStream(Stream stream)
        {
            base.LoadFromStream(stream);

            if (Version == 1)
            {
                CreationTime = MovieHeaderBox.Convert1904Time(stream.ReadBEUInt64());
                ModificationTime = MovieHeaderBox.Convert1904Time(stream.ReadBEUInt64());
                TrackID = stream.ReadBEUInt32();
                _Reserved1 = stream.ReadBEUInt32();
                Duration = stream.ReadBEUInt64();
            }
            else // if (Version == 0)
            {
                CreationTime = MovieHeaderBox.Convert1904Time(stream.ReadBEUInt32());
                ModificationTime = MovieHeaderBox.Convert1904Time(stream.ReadBEUInt32());
                TrackID = stream.ReadBEUInt32();
                _Reserved1 = stream.ReadBEUInt32();
                Duration = stream.ReadBEUInt32();
            }
            for (int i = 0; i < 2; i++) _Reserved2[0] = stream.ReadBEUInt32();
            Layer = stream.ReadBEInt16();
            AlternateGroup = stream.ReadBEInt16();
            Volume = stream.ReadBEInt16();
            _Reserved3 = stream.ReadBEUInt16();
            for (int i = 0; i < 9; i++) _Matrix[i] = stream.ReadBEInt32();
            Width = stream.ReadBEUInt32();
            Height = stream.ReadBEUInt32();
        }
开发者ID:heksesang,项目名称:bmff,代码行数:29,代码来源:TrackHeaderBox.cs

示例2: LoadFromStream

        protected override void LoadFromStream(Stream stream)
        {
            base.LoadFromStream(stream);

            Width = stream.ReadBEUInt32();
            Height = stream.ReadBEUInt32();
        }
开发者ID:heksesang,项目名称:bmff,代码行数:7,代码来源:TrackProductionApertureDimensionsBox.cs

示例3: LoadFromStream

        protected override void LoadFromStream(Stream stream)
        {
            base.LoadFromStream(stream);

            _Predefined = stream.ReadBEUInt32();
            HandlerType = new FourCC(stream.ReadBytes(4));
            for (int i = 0; i < _Reserved.Length; i++) _Reserved[i] = stream.ReadBEUInt32();
            Name = stream.ReadNullTerminatedUTF8String();
        }
开发者ID:heksesang,项目名称:bmff,代码行数:9,代码来源:HandlerBox.cs

示例4: LoadFromStream

        protected override void LoadFromStream(Stream stream)
        {
            base.LoadFromStream(stream);

            TrackID = stream.ReadBEUInt32();
            DefaultSampleDescriptionIndex = stream.ReadBEUInt32();
            DefaultSampleDuration = stream.ReadBEUInt32();
            DefaultSampleSize = stream.ReadBEUInt32();
            DefaultSampleFlags._flags = stream.ReadBEUInt32();
        }
开发者ID:heksesang,项目名称:bmff,代码行数:10,代码来源:TrackExtendsBox.cs

示例5: LoadFromStream

        protected override void LoadFromStream(Stream stream)
        {
            base.LoadFromStream(stream);

            MaxProtocolDataUnitSize = stream.ReadBEUInt16();
            AverageProtocolDataUnitSize = stream.ReadBEUInt16();
            MaxBitrate = stream.ReadBEUInt32();
            AverageBitrate = stream.ReadBEUInt32();
            _Reserved = stream.ReadBEUInt32();
        }
开发者ID:heksesang,项目名称:bmff,代码行数:10,代码来源:HintMediaHeaderBox.cs

示例6: LoadFromStream

        protected override void LoadFromStream(Stream stream)
        {
            base.LoadFromStream(stream);

            _Height = stream.ReadBEUInt32();
            _Width = stream.ReadBEUInt32();
            _NumberOfComponents = stream.ReadBEUInt16();
            BitsPerComponent = stream.ReadOneByte();
            _CompressionType = stream.ReadOneByte();
            _IsUnknownColorspace = stream.ReadOneByte();
            _IsIntellectualProperty = stream.ReadOneByte();
        }
开发者ID:heksesang,项目名称:bmff,代码行数:12,代码来源:ImageHeaderBox.cs

示例7: LoadFromStream

        protected override void LoadFromStream(Stream stream)
        {
            base.LoadFromStream(stream);

            MajorBrand = new FourCC(stream.ReadBEUInt32());
            MinorVersion = stream.ReadBEUInt32();

            ulong remainingBytes = EffectiveSize - CalculateSize();
            ulong numBrands =  remainingBytes / 4;
            for (ulong i = 0; i < numBrands ; i++)
            {
                _CompatibleBrands.Add(new FourCC(stream.ReadBEUInt32()));
            }
        }
开发者ID:heksesang,项目名称:bmff,代码行数:14,代码来源:FileTypeBox.cs

示例8: LoadFromStream

        protected override void LoadFromStream(Stream stream)
        {
            base.LoadFromStream(stream);

            Alias = stream.ReadNullTerminatedUTF8String();
            ResourceType = stream.ReadBEUInt32();
            Id = stream.ReadBEInt16();
        }
开发者ID:heksesang,项目名称:bmff,代码行数:8,代码来源:DataEntryResourceBox.cs

示例9: LoadFromStream

        protected override void LoadFromStream(Stream stream)
        {
            base.LoadFromStream(stream);

            TrackID = stream.ReadBEUInt32();

            if ((Flags & TrackFragmentFlags.BaseDataOffsetPresent) == TrackFragmentFlags.BaseDataOffsetPresent)
                BaseDataOffset = stream.ReadBEUInt64();
            if ((Flags & TrackFragmentFlags.SampleDrescriptionIndexPresent) == TrackFragmentFlags.SampleDrescriptionIndexPresent)
                SampleDescriptionIndex = stream.ReadBEUInt32();
            if ((Flags & TrackFragmentFlags.DefaultSampleDurationPresent) == TrackFragmentFlags.DefaultSampleDurationPresent)
                DefaultSampleDuration = stream.ReadBEUInt32();
            if ((Flags & TrackFragmentFlags.DefaultSampleSizePresent) == TrackFragmentFlags.DefaultSampleSizePresent)
                DefaultSampleSize = stream.ReadBEUInt32();
            if ((Flags & TrackFragmentFlags.DefaultSampleFlagsPresent) == TrackFragmentFlags.DefaultSampleFlagsPresent)
                DefaultSampleFlags = new SampleFlags(stream.ReadBEUInt32());

            if ((Flags & TrackFragmentFlags.DurationIsEmpty) == TrackFragmentFlags.DurationIsEmpty)
                DurationIsEmpty = true;
        }
开发者ID:heksesang,项目名称:bmff,代码行数:20,代码来源:TrackFragmentHeaderBox.cs

示例10: LoadFromStream

        protected override void LoadFromStream(Stream stream)
        {
            base.LoadFromStream(stream);

            SpecificationMethod = (SpecificationMethods)stream.ReadOneByte();
            Precedence = stream.ReadOneByte();
            ColorspaceApproximation = stream.ReadOneByte();
            if(SpecificationMethod == SpecificationMethods.EnumeratedColorspace)
                EnumeratedColorspace = (EnumeratedColorspaces)stream.ReadBEUInt32();
            // TODO: Read Profile?
        }
开发者ID:heksesang,项目名称:bmff,代码行数:11,代码来源:ColourSpecificationBox.cs

示例11: LoadFromStream

        protected override void LoadFromStream(Stream stream)
        {
            base.LoadFromStream(stream);

            if (Version == 1)
            {
                _CreationTime = stream.ReadBEUInt64();
                _ModificationTime = stream.ReadBEUInt64();
                TimeScale = stream.ReadBEUInt32();
                Duration = stream.ReadBEUInt64();
            }
            else // if(Version == 0)
            {
                _CreationTime = stream.ReadBEUInt32();
                _ModificationTime = stream.ReadBEUInt32();
                TimeScale = stream.ReadBEUInt32();
                Duration = stream.ReadBEUInt32();
            }
            _Rate = stream.ReadBEInt32();
            _Volume = stream.ReadBEInt16();
            Reserved = stream.ReadBytes(2 + (2 * 4));
            for (int i = 0; i < 9; i++) Matrix[i] = stream.ReadBEInt32();
            PreDefined = stream.ReadBytes(6 * 4);
            NextTrackID = stream.ReadBEUInt32();
        }
开发者ID:heksesang,项目名称:bmff,代码行数:25,代码来源:MovieHeaderBox.cs

示例12: LoadFromStream

        protected override void LoadFromStream(Stream stream)
        {
            base.LoadFromStream(stream);

            if (Version == 1)
            {
                CreationTime = MovieHeaderBox.Convert1904Time(stream.ReadBEUInt64());
                ModificationTime = MovieHeaderBox.Convert1904Time(stream.ReadBEUInt64());
                TimeScale = stream.ReadBEUInt32();
                Duration = stream.ReadBEUInt64();
            }
            else // if (Version == 0)
            {
                CreationTime = MovieHeaderBox.Convert1904Time(stream.ReadBEUInt32());
                ModificationTime = MovieHeaderBox.Convert1904Time(stream.ReadBEUInt32());
                TimeScale = stream.ReadBEUInt32();
                Duration = stream.ReadBEUInt32();
            }

            Language = ConvertThreeLetterLanguageCode(stream.ReadBEUInt16());
            Predefined = stream.ReadBEUInt16();
        }
开发者ID:heksesang,项目名称:bmff,代码行数:22,代码来源:MediaHeaderBox.cs

示例13: LoadFromStream

        protected override void LoadFromStream(Stream stream)
        {
            base.LoadFromStream(stream);

            MfraSize = stream.ReadBEUInt32();
        }
开发者ID:heksesang,项目名称:bmff,代码行数:6,代码来源:MovieFragmentRandomAccessOffsetBox.cs

示例14: LoadFromStream

        protected override void LoadFromStream(Stream stream)
        {
            base.LoadFromStream(stream);

            DataFormat = new FourCC(stream.ReadBEUInt32());
        }
开发者ID:heksesang,项目名称:bmff,代码行数:6,代码来源:OriginalFormatBox.cs

示例15: LoadFromStream

        protected override void LoadFromStream(Stream stream)
        {
            base.LoadFromStream(stream);

            _EntryCount = stream.ReadBEUInt32();
        }
开发者ID:heksesang,项目名称:bmff,代码行数:6,代码来源:DataReferenceBox.cs


注:本文中的Stream.ReadBEUInt32方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。