Table of Contents

Class D3D11VP8DecoderBlock

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

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

public class D3D11VP8DecoderBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Remarks

This decoder block provides hardware-accelerated VP8 video decoding using Direct3D 11 and DirectX Video Acceleration (DXVA) 2.0 on Windows platforms. VP8 is an open-source video codec developed by Google, primarily used in WebM containers and WebRTC video communications.

Key Features:

  • Hardware-accelerated VP8 decoding for WebM and WebRTC content
  • Support for resolutions up to Full HD (1920x1080) and beyond
  • Low CPU usage through GPU offloading
  • Direct3D 11 surface output for efficient rendering
  • Real-time decoding capabilities for video conferencing
  • Royalty-free codec implementation

Use Cases:

  • WebRTC video conferencing applications
  • WebM video playback in browsers and media players
  • YouTube and streaming platform video playback
  • Video chat and collaboration tools
  • Open-source video streaming solutions
  • Cross-platform video applications

Requirements:

  • Windows 10 or later (VP8 hardware support is limited on older versions)
  • GPU with VP8 DXVA2 decoding capabilities (Intel HD Graphics 4000+, NVIDIA GTX 600+, AMD GCN+)
  • Compatible graphics drivers with VP8 decode support
  • GStreamer VP8 plugins properly installed

Performance Considerations:

VP8 hardware acceleration support varies significantly across GPU vendors and models. Intel GPUs generally provide the best VP8 hardware support due to WebRTC requirements. The decoder automatically falls back to software decoding if hardware support is unavailable. For WebRTC applications, this decoder provides low-latency decoding suitable for real-time communication.

Constructors

D3D11VP8DecoderBlock()

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

public D3D11VP8DecoderBlock()

Remarks

Creates a new VP8 hardware decoder block with default settings. The decoder is configured with one input pad for receiving VP8 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

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 VP8 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 D3D11VP8Decoder element
  2. Initializes the decoder with the specified DXGI device settings
  3. Configures the output pad for D3D11 surface output
  4. Sets up the input pad for VP8 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 VP8 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 VP8 decoder.

GetElement()

Gets the underlying GStreamer element for direct GStreamer API access.

public Element GetElement()

Returns

Element

The native GStreamer d3d11vp8dec element.

IsAvailable()

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

public static bool IsAvailable()

Returns

bool

true if D3D11 VP8 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
  • VP8 DXVA2 decoder support in the GPU (limited availability)
  • Required GStreamer D3D11 plugins
  • VP8 codec support in graphics drivers
Note: VP8 hardware support is less common than H.264/H.265. Intel GPUs typically provide the best 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