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


C# Stream.WriteBEUInt32方法代码示例

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


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

示例1: SaveToStream

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

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

示例2: SaveToStream

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

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

示例3: SaveToStream

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

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

示例4: SaveToStream

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

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

示例5: SaveToStream

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

            stream.WriteBEUInt32(_Predefined);
            stream.WriteBEUInt32(HandlerType);
            for (int i = 0; i < _Reserved.Length; i++) stream.WriteBEUInt32(_Reserved[i]);
            if(Name != null)
                stream.WriteUTF8String(Name);
        }
开发者ID:heksesang,项目名称:bmff,代码行数:10,代码来源:HandlerBox.cs

示例6: SaveToStream

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

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

示例7: SaveToStream

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

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

示例8: SaveToStream

        protected override void SaveToStream(Stream stream)
        {
            if(FragmentDuration > UInt32.MaxValue) Version = 1;

            base.SaveToStream(stream);

            if (Version == 1) stream.WriteBEUInt64(FragmentDuration);
            else stream.WriteBEUInt32((uint)FragmentDuration);
        }
开发者ID:heksesang,项目名称:bmff,代码行数:9,代码来源:MovieExtendsHeaderBox.cs

示例9: SaveToStream

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

            stream.WriteOneByte((byte)SpecificationMethod);
            stream.WriteOneByte(Precedence);
            stream.WriteOneByte(ColorspaceApproximation);
            if (SpecificationMethod == SpecificationMethods.EnumeratedColorspace)
                stream.WriteBEUInt32((uint)EnumeratedColorspace);
            // TODO: Write Profile
        }
开发者ID:heksesang,项目名称:bmff,代码行数:11,代码来源:ColourSpecificationBox.cs

示例10: SaveToStream

        protected override void SaveToStream(Stream stream)
        {
            base.SaveToStream(stream);
            stream.WriteBytes(MajorBrand.GetBytes());
            stream.WriteBEUInt32(MinorVersion);

            foreach (FourCC compatibleBrand in _CompatibleBrands)
            {
                stream.WriteBytes(compatibleBrand.GetBytes());
            }
        }
开发者ID:heksesang,项目名称:bmff,代码行数:11,代码来源:FileTypeBox.cs

示例11: SaveToStream

        protected override void SaveToStream(Stream stream)
        {
            TrackFragmentFlags newFlags = 0;
            if (BaseDataOffset.HasValue) newFlags |= TrackFragmentFlags.BaseDataOffsetPresent;
            if (SampleDescriptionIndex.HasValue) newFlags |= TrackFragmentFlags.SampleDrescriptionIndexPresent;
            if (DefaultSampleDuration.HasValue) newFlags |= TrackFragmentFlags.DefaultSampleDurationPresent;
            if (DefaultSampleSize.HasValue) newFlags |= TrackFragmentFlags.DefaultSampleSizePresent;
            if (DefaultSampleFlags != null) newFlags |= TrackFragmentFlags.DefaultSampleFlagsPresent;
            if (DurationIsEmpty) newFlags |= TrackFragmentFlags.DurationIsEmpty;

            Flags = newFlags;

            base.SaveToStream(stream);

            stream.WriteBEUInt32(TrackID);
            if (BaseDataOffset.HasValue) stream.WriteBEUInt64(BaseDataOffset.Value);
            if (SampleDescriptionIndex.HasValue) stream.WriteBEUInt32(SampleDescriptionIndex.Value);
            if (DefaultSampleDuration.HasValue) stream.WriteBEUInt32(DefaultSampleDuration.Value);
            if (DefaultSampleSize.HasValue) stream.WriteBEUInt32(DefaultSampleSize.Value);
            if (DefaultSampleFlags!=null) stream.WriteBEUInt32(DefaultSampleFlags._flags);
        }
开发者ID:heksesang,项目名称:bmff,代码行数:21,代码来源:TrackFragmentHeaderBox.cs

示例12: SaveToStream

        protected override void SaveToStream(Stream stream)
        {
            if (Version==0 && 
                (_CreationTime > uint.MaxValue || 
                _ModificationTime > uint.MaxValue || 
                Duration > uint.MaxValue)) Version = 1;

            base.SaveToStream(stream);

            if (Version == 1)
            {
                stream.WriteBEUInt64(_CreationTime);
                stream.WriteBEUInt64(_ModificationTime);
                stream.WriteBEUInt32(TimeScale);
                stream.WriteBEUInt64(Duration);
            }
            else // if(Version == 0)
            {
                stream.WriteBEUInt32(checked((uint)_CreationTime));
                stream.WriteBEUInt32(checked((uint)_ModificationTime));
                stream.WriteBEUInt32(TimeScale);
                stream.WriteBEUInt32(checked((uint)Duration));
            }
            stream.WriteBEInt32(_Rate);
            stream.WriteBEInt16(_Volume);
            stream.WriteBytes(Reserved);
            for (int i = 0; i < 9; i++) stream.WriteBEInt32(Matrix[i]);
            stream.WriteBytes(PreDefined);
            stream.WriteBEUInt32(NextTrackID);
        }
开发者ID:heksesang,项目名称:bmff,代码行数:30,代码来源:MovieHeaderBox.cs

示例13: SaveToStream

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

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

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

示例14: SaveToStream

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

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

示例15: SaveToStream

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

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


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