Table of Contents

Class HTTPMJPEGSourceBlock

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

HTTP/HTTPS MJPEG (Motion JPEG) source block for IP camera streaming and web-based video capture. Provides real-time MJPEG stream reception from web cameras, IP surveillance systems, and HTTP video sources with integrated JPEG decoding and frame rate control for security monitoring and live video streaming applications. Implements the VisioForge.Core.MediaBlocks.Sources.SourceMediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.

public class HTTPMJPEGSourceBlock : SourceMediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

HTTPMJPEGSourceBlock(HTTPMJPEGSourceSettings)

Initializes a new instance of the VisioForge.Core.MediaBlocks.Sources.HTTPMJPEGSourceBlock class with custom network settings. Configures the HTTP MJPEG source for IP camera streaming with specified URL and processing parameters.

public HTTPMJPEGSourceBlock(HTTPMJPEGSourceSettings settings)

Parameters

settings HTTPMJPEGSourceSettings

The HTTP MJPEG settings controlling URL, authentication, frame rate, and network configuration parameters.

Properties

Input

Gets the primary input pad (none for source blocks that receive network streams).

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets all input pads available on this block (none for source blocks).

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the primary video output pad for the decoded MJPEG stream.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets all output pads available on this block (single video output for MJPEG).

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Settings

Gets or sets the HTTP MJPEG configuration settings that control network parameters and stream processing options.

public HTTPMJPEGSourceSettings Settings { get; set; }

Property Value

HTTPMJPEGSourceSettings

Type

Gets the media block type identifier for HTTP MJPEG source operations.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Builds and initializes the HTTP MJPEG source within the pipeline context. Establishes network connection, configures JPEG decoding, and prepares video output for downstream processing.

public override bool Build()

Returns

bool

true if the HTTP MJPEG source was successfully built and configured; otherwise, false.

CleanUp()

Cleans up all resources associated with the HTTP MJPEG operations, including network connection and video buffers.

public void CleanUp()

Dispose(bool)

Releases unmanaged and managed resources used by the HTTP MJPEG source. Properly closes network connection and disposes of GStreamer elements and video processing 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 configuration and monitoring.

public BaseElement GetCore()

Returns

BaseElement

Always null for composite source blocks with multiple internal elements.

GetElement()

Gets the native GStreamer element for direct GStreamer pipeline integration.

public Element GetElement()

Returns

Element

The HTTP source GStreamer element.

IsAvailable()

Determines whether HTTP MJPEG support is available on the current system. Requires GStreamer HTTP source and JPEG decoder plugins to be installed and functional.

public static bool IsAvailable()

Returns

bool

true if HTTP MJPEG support is available; otherwise, false.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Sets the pipeline context for this HTTP MJPEG source, providing access to the parent pipeline and logging context.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The parent MediaBlocks pipeline containing this HTTP MJPEG source.

See Also