public static GetCodec ( ByteVector packet ) : Codec | ||
packet | ByteVector |
/// A |
Résultat | Codec |
public Bitstream(Page page) { if (page == null) { throw new ArgumentNullException("page"); } codec = Codec.GetCodec(page.Packets[0]); first_absolute_granular_position = page.Header.AbsoluteGranularPosition; }
/// <summary> /// Constructs and initializes a new instance of <see /// cref="Bitstream" /> capable of processing a specified /// page. /// </summary> /// <param name="page"> /// The first <see cref="Page" /> object of the stream to be /// processed by the new instance. /// </param> /// <remarks> /// The constructor only sets the new instance up to read the /// packet, but doesn't actually read it. /// </remarks> /// <exception cref="ArgumentNullException"> /// <paramref name="page" /> is <see langword="null" />. /// </exception> /// <exception cref="UnsupportedFormatException"> /// No registered codec capable of processing <paramref /// name="page" /> could be found. /// </exception> public Bitstream(Page page) { if (page == null) { throw new ArgumentNullException(nameof(page)); } // Assume that the first packet is completely enclosed. // This should be sufficient for codec recognition. Codec = Codec.GetCodec(page.Packets[0]); first_absolute_granular_position = page.Header.AbsoluteGranularPosition; }