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, IMediaBlocksBridgeInheritance
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
settingsBridgeVideoSinkSettings-
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
Inputs
Gets all input pads. This sink has a single video input.
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the output pad. Bridge sinks do not have outputs as they are terminal blocks.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets all output pads. Bridge sinks have no outputs as they are terminal blocks.
public override MediaBlockPad[] Outputs { get; }Property Value
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
Type
Gets the block type identifier for this bridge video sink.
public override MediaBlockType Type { get; }Property Value
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
-
trueif the bridge sink was successfully built;falseif 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
disposingbool-
trueto release both managed and unmanaged resources;falseto 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
-
trueif 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
channelstring-
The new channel name to bridge video to.
Returns
- bool
-
trueif the channel was successfully updated;falseotherwise.
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
pipelineMediaBlocksPipeline-
The MediaBlocksPipeline that owns this bridge sink.