Enum HevcPictureKind
What an HEVC picture's coded slice NAL units are (nal_unit_type, H.265 Table 7-1).
public enum HevcPictureKind
Fields
Bla = 2A BLA picture: a CRA picture where a stream was spliced, whose skipped leading pictures are left out.
Cra = 1A CRA picture: decodes on its own; its leading pictures may refer to pictures before it.
DecodableLeading = 4A leading picture that decodes from the IRAP picture before it on (RADL).
Idr = 0An IDR picture: decodes on its own and starts a coded video sequence.
SkippedLeading = 5A leading picture that may refer to pictures before the IRAP picture (RASL).
Trailing = 3A trailing picture (TRAIL, TSA or STSA): after the IRAP picture before it in both decoding and output order.
Examples
// An HEVC stream from any source: Annex B here, or SetConfiguration with an MP4 track's hvcC and its samples.
using HevcStreamDecoder decoder = new(context: heic);
decoder.Send(File.ReadAllBytes("clip.h265"));
decoder.Flush(); // the end of the stream: the last pictures come out
int shown = 0;
while (decoder.NextFrame is HevcFrameInfo next)
{
using YuvRaster<byte> frame = YuvRaster.Create(next.Width, next.Height, next.Chroma, YuvColor.Bt709Limited);
decoder.TryReceiveFrame(frame, out HevcFrameInfo info); // info.Poc, info.Kind, info.Color
shown++;
}