Class JPEGDecoderBlock
- Assembly
- VisioForge.Core.dll
JPEG image decoder block that converts compressed JPEG/MJPEG streams into raw video frames. This software-based decoder handles both still JPEG images and Motion JPEG (MJPEG) video streams, supporting baseline and progressive JPEG encoding. Commonly used for IP cameras, webcams, and applications requiring frame-by-frame image decoding.
Supported formats: JPEG baseline, JPEG progressive, MJPEG streams
Performance: Software-based decoding suitable for moderate frame rates and resolutions
Use cases: IP camera streams, webcam capture, image sequence processing, MJPEG playback
Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.public class JPEGDecoderBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
JPEGDecoderBlock()
Initializes a new instance of the VisioForge.Core.MediaBlocks.VideoDecoders.JPEGDecoderBlock class. The decoder automatically configures itself for optimal JPEG/MJPEG decoding based on the system capabilities.
public JPEGDecoderBlock()Properties
Input
Gets the primary input pad for receiving JPEG encoded 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
Type
Gets the media block type identifier for this JPEG decoder.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the JPEG 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 JPEG decoder element instance.
GetElement()
Gets the native GStreamer element for direct manipulation and advanced use cases.
public Element GetElement()Returns
- Element
-
The underlying GStreamer JPEG decoder element.
IsAvailable()
Determines whether the JPEG decoder is available on the current system. This method checks for the presence of required libraries and dependencies. Ensure the appropriate NuGet SDK redistribution packages are included in your project.
public static bool IsAvailable()Returns
- bool
-
trueif the JPEG 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.