Class VP9DecoderBlock
- Assembly
- VisioForge.Core.dll
VP9 video decoder block that converts compressed VP9 bitstreams into raw video frames. This block supports multiple decoder implementations including software (VPX, FFmpeg), hardware-accelerated (NVIDIA NVDEC, VAAPI on Linux, D3D11 on Windows), and can automatically select the best available decoder for optimal performance. VP9 is an open-source video codec developed by Google as the successor to VP8, offering better compression efficiency.
Supported features: All VP9 profiles including 10-bit and 12-bit color depths
Performance: Hardware decoders can achieve 4K@60fps or higher depending on GPU capabilities
Use cases: YouTube 4K/8K content, WebM video playback, modern web video streaming
Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.public class VP9DecoderBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
VP9DecoderBlock(IVP9DecoderSettings)
Initializes a new instance of the VisioForge.Core.MediaBlocks.VideoDecoders.VP9DecoderBlock class with specific decoder settings. This constructor allows you to specify exactly which VP9 decoder implementation to use and configure its parameters according to your application's requirements.
public VP9DecoderBlock(IVP9DecoderSettings settings)Parameters
settingsIVP9DecoderSettings-
The VP9 decoder settings that define which decoder to use and how to configure it.
VP9DecoderBlock()
Initializes a new instance of the VisioForge.Core.MediaBlocks.VideoDecoders.VP9DecoderBlock class with automatic decoder selection. This constructor automatically detects and selects the best available VP9 decoder on the system, prioritizing hardware-accelerated decoders when available, then falling back to software decoders. The selection order is: VPX → FFmpeg → NVIDIA NVDEC → VAAPI (Linux) → D3D11 (Windows) → Error if none available.
public VP9DecoderBlock()Properties
Input
Gets the primary input pad for receiving VP9 encoded video data.
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets all input pads available on this decoder block.
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the primary output pad that provides decoded raw video frames.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets all output pads available on this decoder block.
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the VP9 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 IVP9DecoderSettings Settings { get; set; }Property Value
Type
Gets the media block type identifier for this VP9 decoder.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the VP9 decoder element within the pipeline, creating the necessary GStreamer elements and configuring the pads.
public override bool Build()Returns
- bool
-
trueif the decoder was successfully built and initialized;falseif 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
disposingbool-
trueto release both managed and unmanaged resources;falseto release only unmanaged resources.
GetCore()
Gets the underlying GStreamer element for advanced configuration and control.
public BaseElement GetCore()Returns
- BaseElement
-
The core VP9 decoder element instance.
GetElement()
Gets the native GStreamer element for direct manipulation and advanced use cases.
public Element GetElement()Returns
- Element
-
The underlying GStreamer VP9 decoder element.
IsAvailable(VP9DecoderType)
Determines whether the specified VP9 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(VP9DecoderType decoder)Parameters
decoderVP9DecoderType-
The specific VP9 decoder type to check for availability (VPX, FFmpeg, NVDEC, VAAPI, etc.).
Returns
- bool
-
trueif 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
pipelineMediaBlocksPipeline-
The parent MediaBlocksPipeline that contains this decoder.