Class D3D11H265DecoderBlock
- Namespace
- VisioForge.Core.MediaBlocks.Sources
- Assembly
- VisioForge.Core.dll
Direct3D 11/DXVA H.265/HEVC hardware-accelerated video decoder block.
public class D3D11H265DecoderBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Remarks
This decoder block provides hardware-accelerated H.265/HEVC video decoding using Direct3D 11 and DirectX Video Acceleration (DXVA) 2.0 on Windows platforms. It leverages the GPU for efficient decoding of H.265/HEVC video streams, offering superior compression efficiency compared to H.264 while maintaining low CPU usage.
Key Features:
- Hardware-accelerated H.265/HEVC Main and Main 10 profile decoding
- Support for 8-bit and 10-bit color depths
- Ultra HD 4K, 8K resolution support (hardware dependent)
- HDR video support with Main 10 profile
- Extremely low CPU usage through GPU offloading
- Direct3D 11 surface output for zero-copy rendering
Use Cases:
- 4K/8K video playback applications
- HDR video streaming and playback
- Professional video editing with HEVC footage
- Digital signage and video wall applications
- Next-generation video surveillance systems
- VR/AR applications with high-resolution video
Requirements:
- Windows 10 or later (recommended for full HEVC support)
- GPU with H.265/HEVC DXVA2 decoding capabilities (Intel 6th gen+, NVIDIA GTX 960+, AMD RX 400+)
- HEVC Video Extensions from Microsoft Store (for some Windows versions)
- Latest graphics drivers with HEVC decode support
Performance Considerations:
HEVC decoding is more computationally intensive than H.264, requiring newer GPU hardware for smooth playback. The decoder automatically utilizes GPU resources and outputs D3D11 surfaces for efficient rendering. For 4K/8K content, ensure your GPU has sufficient video memory and decode capabilities.Constructors
D3D11H265DecoderBlock()
Initializes a new instance of the VisioForge.Core.MediaBlocks.Sources.D3D11H265DecoderBlock class.
public D3D11H265DecoderBlock()Remarks
Creates a new H.265/HEVC hardware decoder block with default settings. The decoder is configured with one input pad for receiving HEVC encoded data and one output pad for providing decoded video frames as D3D11 surfaces.
Properties
Input
Gets the input.
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets the inputs.
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the output.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets the outputs.
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the decoder configuration settings.
public D3D11DecoderSettings Settings { get; set; }Property Value
Type
Gets the type.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the D3D11 H.265/HEVC decoder element within the pipeline.
public override bool Build()Returns
- bool
-
trueif the decoder was successfully built and initialized;falseif an error occurred.
Remarks
This method performs the following operations:
- Creates the underlying D3D11H265Decoder element
- Initializes the decoder with the specified DXGI device settings
- Configures the output pad for D3D11 surface output (8-bit/10-bit)
- Sets up the input pad for H.265/HEVC stream reception
CleanUp()
Performs cleanup of the decoder resources and resets the build state.
public void CleanUp()Remarks
This method releases the underlying D3D11 HEVC decoder element and associated GPU resources. It is called during disposal to ensure proper cleanup of hardware acceleration resources.
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
protected override void Dispose(bool disposing)Parameters
disposingbool-
trueto release both managed and unmanaged resources;falseto release only unmanaged resources.
GetCore()
Gets the core GStreamer element wrapper for advanced pipeline integration.
public BaseElement GetCore()Returns
- BaseElement
-
The base element wrapper containing the D3D11 H.265/HEVC decoder.
GetElement()
Gets the underlying GStreamer element for direct GStreamer API access.
public Element GetElement()Returns
- Element
-
The native GStreamer d3d11h265dec element.
IsAvailable()
Determines whether hardware-accelerated H.265/HEVC decoding is available on the current system.
public static bool IsAvailable()Returns
- bool
-
trueif D3D11 H.265/HEVC hardware decoding is supported; otherwise,false. This depends on GPU capabilities, driver support, and proper SDK redistribution.
Remarks
This method checks for:
- Direct3D 11 runtime availability
- H.265/HEVC DXVA2 decoder support in the GPU
- Required GStreamer D3D11 plugins
- HEVC Video Extensions installation (Windows 10+)
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the media pipeline context for this decoder block.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The parent media pipeline that contains this decoder block.
Remarks
This internal method is called by the pipeline during initialization to establish the connection between the decoder block and its parent pipeline context.