Table of Contents

Class HEVCDecoderBlock

Namespace
VisioForge.Core.MediaBlocks.VideoDecoders
Assembly
VisioForge.Core.dll

H.265/HEVC video decoder block that converts compressed HEVC bitstreams into raw video frames. This block supports multiple decoder implementations including software (FFmpeg), hardware-accelerated (NVIDIA NVDEC, Intel QSV, AMD AMF, VAAPI on Linux, DXVA on Windows), and can automatically select the best available decoder for optimal performance. Essential for decoding HEVC content from files, streams, and live sources in media processing pipelines.

Supported profiles: Main, Main 10, Main Still Picture

Performance: Hardware decoders can achieve 4K@60fps or higher depending on GPU capabilities

Use cases: Video playback, transcoding, streaming, video editing, surveillance systems

Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class HEVCDecoderBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

HEVCDecoderBlock(IHEVCDecoderSettings)

Initializes a new instance of the VisioForge.Core.MediaBlocks.VideoDecoders.HEVCDecoderBlock class with specific decoder settings. This constructor allows you to specify exactly which HEVC decoder implementation to use and configure its parameters according to your application's requirements.

public HEVCDecoderBlock(IHEVCDecoderSettings settings)

Parameters

settings IHEVCDecoderSettings

The HEVC decoder settings that define which decoder to use and how to configure it.

HEVCDecoderBlock()

Initializes a new instance of the VisioForge.Core.MediaBlocks.VideoDecoders.HEVCDecoderBlock class with automatic decoder selection. This constructor automatically detects and selects the best available HEVC decoder on the system, prioritizing hardware-accelerated decoders when available, then falling back to software decoders. The selection order is: NVIDIA NVDEC → Intel QSV → AMD AMF → D3D11 (Windows) → VAAPI (Linux) → FFmpeg → Error if none available.

public HEVCDecoderBlock()

Properties

Input

Gets the primary input pad for receiving HEVC encoded video data.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets all input pads available on this decoder block.

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the primary output pad that provides decoded raw video frames.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets all output pads available on this decoder block.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Settings

Gets or sets the HEVC decoder configuration settings that control decoder selection, performance options, and hardware acceleration preferences. These settings determine which decoder implementation will be used and how it will be configured.

public IHEVCDecoderSettings Settings { get; set; }

Property Value

IHEVCDecoderSettings

Type

Gets the media block type identifier for this HEVC decoder.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Builds and initializes the HEVC decoder element within the pipeline, creating the necessary GStreamer elements and configuring the pads.

public override bool Build()

Returns

bool

true if the decoder was successfully built and initialized; false if an error occurred.

CleanUp()

Performs cleanup of internal resources, disposing of the decoder element and resetting the build state.

public void CleanUp()

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

GetCore()

Gets the underlying GStreamer element for advanced configuration and control.

public BaseElement GetCore()

Returns

BaseElement

The core HEVC decoder element instance.

GetElement()

Gets the native GStreamer element for direct manipulation and advanced use cases.

public Element GetElement()

Returns

Element

The underlying GStreamer HEVC decoder element.

IsAvailable(HEVCDecoderType)

Determines whether the specified HEVC decoder implementation is available on the current system. This method checks for the presence of required libraries, drivers, and hardware support for the requested decoder type. Ensure the appropriate NuGet SDK redistribution packages are included in your project for the decoder types you intend to use.

public static bool IsAvailable(HEVCDecoderType decoder)

Parameters

decoder HEVCDecoderType

The specific HEVC decoder type to check for availability (FFmpeg, NVDEC, QSV, AMF, VAAPI, etc.).

Returns

bool

true if the specified decoder is available and can be used; otherwise, false.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Sets the pipeline context for this decoder block, establishing the connection to the parent pipeline and enabling access to shared resources.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The parent MediaBlocksPipeline that contains this decoder.

See Also