Table of Contents

Class BridgeVideoSinkBlock

Namespace
VisioForge.Core.MediaBlocks.Bridge
Assembly
VisioForge.Core.dll

Video sink block that bridges video data between different pipelines or applications using a channel-based communication system. This block acts as an endpoint that receives video data and makes it available to other pipelines or processes through a named channel. It enables inter-pipeline communication for video streams, allowing complex architectures where video processing is distributed across multiple pipelines. The bridge uses an efficient in-memory transport mechanism with minimal latency and supports real-time video streaming at high resolutions and frame rates. Common use cases include splitting video processing across multiple pipelines, implementing modular video processing chains, creating video distribution systems, and enabling multi-view applications. The sink can handle various video formats and color spaces with automatic format negotiation. Pair this sink with a BridgeVideoSourceBlock using the same channel name to establish a complete video bridge connection. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.

public class BridgeVideoSinkBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals, IMediaBlocksBridge

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

BridgeVideoSinkBlock(BridgeVideoSinkSettings)

Initializes a new instance of the VisioForge.Core.MediaBlocks.Bridge.BridgeVideoSinkBlock class with specified settings. Creates a bridge video sink that will send video data to the specified channel name.

public BridgeVideoSinkBlock(BridgeVideoSinkSettings settings)

Parameters

settings BridgeVideoSinkSettings

The bridge settings including channel name and buffer configuration.

Properties

Input

Gets the single video input pad for this sink block.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets all input pads. This sink has a single video input.

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the output pad. Bridge sinks do not have outputs as they are terminal blocks.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets all output pads. Bridge sinks have no outputs as they are terminal blocks.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Settings

Gets or sets the bridge video sink settings, including the channel name and buffer configuration. The channel name must match the corresponding BridgeVideoSourceBlock for successful connection.

public BridgeVideoSinkSettings Settings { get; set; }

Property Value

BridgeVideoSinkSettings

Type

Gets the block type identifier for this bridge video sink.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Builds and initializes the bridge video sink within the pipeline. Creates the bridge element with the specified channel settings and establishes pad connections.

public override bool Build()

Returns

bool

true if the bridge sink was successfully built; false if an error occurred.

CleanUp()

Releases all internal resources and disposes of the bridge video sink element. This disconnects from the bridge channel and frees associated resources.

public void CleanUp()

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 BaseElement wrapper for the bridge video sink.

public BaseElement GetCore()

Returns

BaseElement

The BridgeVideoSink element that manages the channel communication.

GetElement()

Gets the underlying GStreamer element for this bridge sink.

public Element GetElement()

Returns

Element

The GStreamer element that handles video bridging.

IsAvailable()

Determines whether this media block is available. Correct NuGet SDK redist should be included into your project.

public static bool IsAvailable()

Returns

bool

true if this media block is available; otherwise, false.

UpdateChannel(string)

Updates the channel name for this bridge sink dynamically. This allows changing the bridge destination without rebuilding the pipeline. The new channel must exist or be created by a corresponding source.

public bool UpdateChannel(string channel)

Parameters

channel string

The new channel name to bridge video to.

Returns

bool

true if the channel was successfully updated; false otherwise.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Sets the pipeline context for this bridge sink, providing access to shared resources. This method is called internally during pipeline construction.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The MediaBlocksPipeline that owns this bridge sink.

See Also