public AddComment ( uint streamSerialNumber, ByteVector data ) : void | ||
streamSerialNumber | uint |
/// A |
data | ByteVector |
/// A |
Результат | void |
/// <summary> /// Reads the file with a specified read style. /// </summary> /// <param name="propertiesStyle"> /// A <see cref="ReadStyle" /> value specifying at what level /// of accuracy to read the media properties, or <see /// cref="ReadStyle.None" /> to ignore the properties. /// </param> private void Read(ReadStyle propertiesStyle) { long end; Dictionary <uint, Bitstream> streams = ReadStreams(null, out end); List <ICodec> codecs = new List <ICodec> (); InvariantStartPosition = end; InvariantEndPosition = Length; foreach (uint id in streams.Keys) { tag.AddComment(id, streams [id].Codec.CommentData); codecs.Add(streams [id].Codec); } if (propertiesStyle == ReadStyle.None) { return; } PageHeader last_header = LastPageHeader; TimeSpan duration = streams [last_header .StreamSerialNumber].GetDuration( last_header.AbsoluteGranularPosition); properties = new Properties(duration, codecs); }
/// <summary> /// Reads the file with a specified read style. /// </summary> /// <param name="propertiesStyle"> /// A <see cref="ReadStyle" /> value specifying at what level /// of accuracy to read the media properties, or <see /// cref="ReadStyle.None" /> to ignore the properties. /// </param> void Read(ReadStyle propertiesStyle) { var streams = ReadStreams(null, out var end); var codecs = new List <ICodec> (); InvariantStartPosition = end; InvariantEndPosition = Length; foreach (uint id in streams.Keys) { tag.AddComment(id, streams[id].Codec.CommentData); codecs.Add(streams[id].Codec); } if ((propertiesStyle & ReadStyle.Average) == 0) { return; } var last_header = LastPageHeader; var duration = streams[last_header.StreamSerialNumber].GetDuration(last_header.AbsoluteGranularPosition); properties = new Properties(duration, codecs); }