Class VP8DecoderBlock
- Assembly
- VisioForge.Core.dll
VP8 video decoder block that converts compressed VP8 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. VP8 is an open-source video codec commonly used in WebM containers and WebRTC video communications.
Supported features: All VP8 profiles, real-time video conferencing support
Performance: Hardware decoders can achieve real-time decoding for HD video calls
Use cases: WebRTC video calls, WebM video playback, YouTube content, video conferencing
Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.public class VP8DecoderBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
VP8DecoderBlock(IVP8DecoderSettings)
Initializes a new instance of the VisioForge.Core.MediaBlocks.VideoDecoders.VP8DecoderBlock class with specific decoder settings. This constructor allows you to specify exactly which VP8 decoder implementation to use and configure its parameters according to your application's requirements.
public VP8DecoderBlock(IVP8DecoderSettings settings)Parameters
settingsIVP8DecoderSettings-
The VP8 decoder settings that define which decoder to use and how to configure it.
VP8DecoderBlock()
Initializes a new instance of the VisioForge.Core.MediaBlocks.VideoDecoders.VP8DecoderBlock class with automatic decoder selection. This constructor automatically detects and selects the best available VP8 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 VP8DecoderBlock()Properties
Input
Gets the primary input pad for receiving VP8 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 VP8 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 IVP8DecoderSettings Settings { get; set; }Property Value
Type
Gets the media block type identifier for this VP8 decoder.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the VP8 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 VP8 decoder element instance.
GetElement()
Gets the native GStreamer element for direct manipulation and advanced use cases.
public Element GetElement()Returns
- Element
-
The underlying GStreamer VP8 decoder element.
IsAvailable(VP8DecoderType)
Determines whether the specified VP8 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(VP8DecoderType decoder)Parameters
decoderVP8DecoderType-
The specific VP8 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.