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


C# TagLib.ReadDWord方法代码示例

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


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

示例1: HeaderExtensionObject

 public HeaderExtensionObject(TagLib.Asf.File file, long position) : base(file, position)
 {
     this.children = new List<TagLib.Asf.Object>();
     if (!base.Guid.Equals(TagLib.Asf.Guid.AsfHeaderExtensionObject))
     {
         throw new CorruptFileException("Object GUID incorrect.");
     }
     if (file.ReadGuid() != TagLib.Asf.Guid.AsfReserved1)
     {
         throw new CorruptFileException("Reserved1 GUID expected.");
     }
     if (file.ReadWord() != 6)
     {
         throw new CorruptFileException("Invalid reserved WORD. Expected '6'.");
     }
     uint num = file.ReadDWord();
     position += 0x2eL;
     while (num > 0)
     {
         TagLib.Asf.Object item = file.ReadObject(position);
         position += (long) item.OriginalSize;
         num -= (uint) item.OriginalSize;
         this.children.Add(item);
     }
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:25,代码来源:HeaderExtensionObject.cs

示例2: StreamPropertiesObject

 public StreamPropertiesObject(TagLib.Asf.File file, long position) : base(file, position)
 {
     if (!base.Guid.Equals(TagLib.Asf.Guid.AsfStreamPropertiesObject))
     {
         throw new CorruptFileException("Object GUID incorrect.");
     }
     if (base.OriginalSize < 0x4eL)
     {
         throw new CorruptFileException("Object size too small.");
     }
     this.stream_type = file.ReadGuid();
     this.error_correction_type = file.ReadGuid();
     this.time_offset = file.ReadQWord();
     int length = (int) file.ReadDWord();
     int num2 = (int) file.ReadDWord();
     this.flags = file.ReadWord();
     this.reserved = file.ReadDWord();
     this.type_specific_data = file.ReadBlock(length);
     this.error_correction_data = file.ReadBlock(num2);
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:20,代码来源:StreamPropertiesObject.cs

示例3: FilePropertiesObject

 public FilePropertiesObject(TagLib.Asf.File file, long position) : base(file, position)
 {
     if (!base.Guid.Equals(TagLib.Asf.Guid.AsfFilePropertiesObject))
     {
         throw new CorruptFileException("Object GUID incorrect.");
     }
     if (base.OriginalSize < 0x68L)
     {
         throw new CorruptFileException("Object size too small.");
     }
     this.file_id = file.ReadGuid();
     this.file_size = file.ReadQWord();
     this.creation_date = file.ReadQWord();
     this.data_packets_count = file.ReadQWord();
     this.send_duration = file.ReadQWord();
     this.play_duration = file.ReadQWord();
     this.preroll = file.ReadQWord();
     this.flags = file.ReadDWord();
     this.minimum_data_packet_size = file.ReadDWord();
     this.maximum_data_packet_size = file.ReadDWord();
     this.maximum_bitrate = file.ReadDWord();
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:22,代码来源:FilePropertiesObject.cs

示例4: HeaderObject

 public HeaderObject(TagLib.Asf.File file, long position) : base(file, position)
 {
     if (!base.Guid.Equals(TagLib.Asf.Guid.AsfHeaderObject))
     {
         throw new CorruptFileException("Object GUID incorrect.");
     }
     if (base.OriginalSize < 0x1aL)
     {
         throw new CorruptFileException("Object size too small.");
     }
     this.children = new List<TagLib.Asf.Object>();
     uint count = file.ReadDWord();
     this.reserved = file.ReadBlock(2);
     this.children.AddRange(file.ReadObjects(count, file.Tell));
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:15,代码来源:HeaderObject.cs

示例5: Parse

        protected bool Parse(TagLib.Asf.File file)
        {
            int length = file.ReadWord();
            this.name = file.ReadUnicode(length);
            this.type = (DataType) file.ReadWord();
            int num2 = file.ReadWord();
            switch (this.type)
            {
                case DataType.Unicode:
                    this.strValue = file.ReadUnicode(num2);
                    break;

                case DataType.Bytes:
                    this.byteValue = file.ReadBlock(num2);
                    break;

                case DataType.Bool:
                    this.longValue = file.ReadDWord();
                    break;

                case DataType.DWord:
                    this.longValue = file.ReadDWord();
                    break;

                case DataType.QWord:
                    this.longValue = file.ReadQWord();
                    break;

                case DataType.Word:
                    this.longValue = file.ReadWord();
                    break;

                default:
                    return false;
            }
            return true;
        }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:37,代码来源:ContentDescriptor.cs

示例6: Parse

        protected bool Parse(TagLib.Asf.File file)
        {
            this.lang_list_index = file.ReadWord();
            this.stream_number = file.ReadWord();
            ushort length = file.ReadWord();
            this.type = (DataType) file.ReadWord();
            int num2 = (int) file.ReadDWord();
            this.name = file.ReadUnicode(length);
            switch (this.type)
            {
                case DataType.Unicode:
                    this.strValue = file.ReadUnicode(num2);
                    break;

                case DataType.Bytes:
                    this.byteValue = file.ReadBlock(num2);
                    break;

                case DataType.Bool:
                case DataType.DWord:
                    this.longValue = file.ReadDWord();
                    break;

                case DataType.QWord:
                    this.longValue = file.ReadQWord();
                    break;

                case DataType.Word:
                    this.longValue = file.ReadWord();
                    break;

                case DataType.Guid:
                    this.guidValue = file.ReadGuid();
                    break;

                default:
                    return false;
            }
            return true;
        }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:40,代码来源:DescriptionRecord.cs


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