예제 #1
0
        //////////////////////////////////////////////////////////////////////////
        // public methods
        //////////////////////////////////////////////////////////////////////////
        public AsfStreamPropertiesObject(AsfFile file, long position) : base(file, position)
        {
            if (file != null)
            {
                if (!Guid.Equals(AsfGuid.AsfStreamPropertiesObject))
                {
                    throw new TagLibException(TagLibError.AsfObjectGuidIncorrect);
                }

                if (OriginalSize < 78)
                {
                    throw new TagLibException(TagLibError.AsfObjectSizeTooSmall);
                }

                stream_type           = file.ReadGuid();
                error_correction_type = file.ReadGuid();
                time_offset           = file.ReadQWord();
                int type_specific_data_length    = (int)file.ReadDWord();
                int error_correction_data_length = (int)file.ReadDWord();
                flags                 = file.ReadWord();
                reserved              = file.ReadDWord();
                type_specific_data    = file.ReadBlock(type_specific_data_length);
                error_correction_data = file.ReadBlock(error_correction_data_length);
            }
        }
        public AsfFilePropertiesObject(AsfFile file, long position) : base(file, position)
        {
            if (file != null)
            {
                if (!Guid.Equals(AsfGuid.AsfFilePropertiesObject))
                {
                    throw new TagLibException(TagLibError.AsfObjectGuidIncorrect);
                }

                if (OriginalSize < 104)
                {
                    throw new TagLibException(TagLibError.AsfObjectSizeTooSmall);
                }

                fileId                = file.ReadGuid();
                fileSize              = file.ReadQWord();
                creationDate          = file.ReadQWord();
                dataPacketsCount      = file.ReadQWord();
                playDuration          = file.ReadQWord();
                sendDuration          = file.ReadQWord();
                preRoll               = file.ReadQWord();
                flags                 = file.ReadDWord();
                minimumDataPacketSize = file.ReadDWord();
                maximumDataPacketSize = file.ReadDWord();
                maximumBitrate        = file.ReadDWord();
            }
        }
      //////////////////////////////////////////////////////////////////////////
      // public methods
      //////////////////////////////////////////////////////////////////////////
		public AsfStreamPropertiesObject (AsfFile file, long position) : base (file, position)
		{
			if (file != null)
			{
				if (!Guid.Equals (AsfGuid.AsfStreamPropertiesObject))
					throw new TagLibException(TagLibError.AsfObjectGuidIncorrect);
         
				if (OriginalSize < 78)
					throw new TagLibException(TagLibError.AsfObjectSizeTooSmall);
         
				stream_type = file.ReadGuid();
				error_correction_type = file.ReadGuid();
				time_offset = file.ReadQWord ();
				int type_specific_data_length = (int)file.ReadDWord();
				int error_correction_data_length = (int)file.ReadDWord();
				flags = file.ReadWord();
				reserved = file.ReadDWord();
				type_specific_data = file.ReadBlock(type_specific_data_length);
				error_correction_data = file.ReadBlock(error_correction_data_length);
			}
		}
		public AsfFilePropertiesObject(AsfFile file, long position) : base(file, position)
		{
			if (file != null)
			{
				if (!Guid.Equals(AsfGuid.AsfFilePropertiesObject))
					throw new TagLibException(TagLibError.AsfObjectGuidIncorrect);

				if (OriginalSize < 104)
					throw new TagLibException(TagLibError.AsfObjectSizeTooSmall);

				fileId = file.ReadGuid();
				fileSize = file.ReadQWord();
				creationDate = file.ReadQWord();
				dataPacketsCount = file.ReadQWord();
				playDuration = file.ReadQWord();
				sendDuration = file.ReadQWord();
				preRoll = file.ReadQWord();
				flags = file.ReadDWord();
				minimumDataPacketSize = file.ReadDWord();
				maximumDataPacketSize = file.ReadDWord();
				maximumBitrate = file.ReadDWord();
			}
		}