protected Object(TagLib.Asf.File file, long position) { if (file == null) { throw new ArgumentNullException("file"); } if ((position < 0L) || (position > (file.Length - 0x18L))) { throw new ArgumentOutOfRangeException("position"); } file.Seek(position); this.id = file.ReadGuid(); this.size = file.ReadQWord(); }
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); }
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(); }
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; }
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; }