Table of Contents

Class D3D11VP9DecoderBlock

Namespace
VisioForge.Core.MediaBlocks.Sources
Assembly
VisioForge.Core.dll

Direct3D 11/DXVA VP9 hardware-accelerated video decoder block.

public class D3D11VP9DecoderBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Remarks

This decoder block provides hardware-accelerated VP9 video decoding using Direct3D 11 and DirectX Video Acceleration (DXVA) 2.0 on Windows platforms. VP9 is Google's successor to VP8, offering better compression efficiency than H.264 while competing with H.265/HEVC. It's widely used in YouTube, WebM containers, and is a mandatory codec for WebRTC.

Key Features:

  • Hardware-accelerated VP9 Profile 0 and Profile 2 decoding
  • Support for 8-bit and 10-bit color depths (HDR support with Profile 2)
  • 4K, 8K, and beyond resolution support (hardware dependent)
  • YouTube HDR and 4K/8K video playback
  • Extremely efficient compression with low CPU usage
  • Direct3D 11 surface output for zero-copy rendering
  • Royalty-free alternative to HEVC

Use Cases:

  • YouTube and streaming platform video playback (4K/8K/HDR)
  • WebRTC video conferencing with high quality
  • WebM video playback and editing
  • Next-generation video streaming applications
  • HDR video playback systems
  • Open-source video platforms

Requirements:

  • Windows 10 version 1709 or later (for full VP9 support)
  • GPU with VP9 DXVA2 decoding capabilities (Intel Kaby Lake+, NVIDIA GTX 1050+, AMD RX 400+)
  • Compatible graphics drivers with VP9 decode support
  • GStreamer VP9 plugins properly installed

Performance Considerations:

VP9 provides excellent compression efficiency but requires modern GPU hardware for acceleration. Intel 7th gen and newer CPUs provide excellent VP9 support. NVIDIA and AMD GPUs from 2016 onwards typically include VP9 hardware decoding. The decoder supports both SDR and HDR content, automatically handling 10-bit decoding when Profile 2 content is detected. For optimal YouTube playback performance, ensure your GPU drivers are up to date.

Constructors

D3D11VP9DecoderBlock()

Initializes a new instance of the VisioForge.Core.MediaBlocks.Sources.D3D11VP9DecoderBlock class.

public D3D11VP9DecoderBlock()

Remarks

Creates a new VP9 hardware decoder block with default settings. The decoder is configured with one input pad for receiving VP9 encoded data and one output pad for providing decoded video frames as D3D11 surfaces. Supports both SDR and HDR content decoding.

Properties

Input

Gets the input.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets the inputs.

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the output.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets the outputs.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Settings

Gets or sets the decoder configuration settings.

public D3D11DecoderSettings Settings { get; set; }

Property Value

D3D11DecoderSettings

Type

Gets the type.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Builds and initializes the D3D11 VP9 decoder element within the pipeline.

public override bool Build()

Returns

bool

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

Remarks

This method performs the following operations:

  1. Creates the underlying D3D11VP9Decoder element
  2. Initializes the decoder with the specified DXGI device settings
  3. Configures the output pad for D3D11 surface output (8-bit/10-bit)
  4. Sets up the input pad for VP9 stream reception
The method is idempotent and will return immediately if already built.

CleanUp()

Performs cleanup of the decoder resources and resets the build state.

public void CleanUp()

Remarks

This method releases the underlying D3D11 VP9 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

disposing bool

true to release both managed and unmanaged resources; false to 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 VP9 decoder.

GetElement()

Gets the underlying GStreamer element for direct GStreamer API access.

public Element GetElement()

Returns

Element

The native GStreamer d3d11vp9dec element.

IsAvailable()

Determines whether hardware-accelerated VP9 decoding is available on the current system.

public static bool IsAvailable()

Returns

bool

true if D3D11 VP9 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
  • VP9 DXVA2 decoder support in the GPU
  • Required GStreamer D3D11 plugins
  • VP9 codec support in graphics drivers
  • Windows 10 version 1709+ for full VP9 Profile 2 support
Note: VP9 hardware support requires relatively modern GPUs (2016+). Check GPU specifications for VP9 support.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Sets the media pipeline context for this decoder block.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

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.

See Also