Class HevcDecoderOptions
How an HevcStreamDecoder decodes.
public sealed record HevcDecoderOptions : IEquatable<HevcDecoderOptions>
- Inheritance
-
HevcDecoderOptions
- Implements
- Inherited Members
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++;
}
Properties
CheckPictureHashes
Gets a value indicating whether each picture is checked against its decoded picture hash SEI message, when it has one: a picture that does not match throws CorruptDataException. Defaults to false.
public bool CheckPictureHashes { get; init; }
Property Value
ConcealErrors
Gets a value indicating whether damaged slice data is concealed rather than thrown: the picture keeps what decoded before the damage, stays a reference and comes out; damaged parameter sets and slice headers still throw. Defaults to false.
public bool ConcealErrors { get; init; }
Property Value
Default
Gets the default options.
public static HevcDecoderOptions Default { get; }