using System; namespace Matroska.Models; /// /// http://matroska.sourceforge.net/technical/specs/index.html#simpleblock_structure /// public sealed class SimpleBlock : Block { private const byte KeyFrameBit = 0b10000000; private const byte DiscardableBit = 0b00000001; /// /// Keyframe, set when the Block contains only keyframes /// public bool IsKeyFrame { get; private set; } /// /// Discardable, the frames of the Block can be discarded during playing if needed /// public bool IsDiscardable { get; private set; } public override void Parse(Span span) { base.Parse(span); IsKeyFrame = (Flags & KeyFrameBit) == KeyFrameBit; IsDiscardable = (Flags & DiscardableBit) == DiscardableBit; } }