Table of Contents

Class RSInterSinkBlock

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

RS (Rust) inter sink block that enables high-performance inter-pipeline communication using Rust-based GStreamer elements. This block acts as a sink that publishes data to a named channel, making it available to RSInterSourceBlock instances with the same channel name. RS inter elements provide optimized performance through Rust implementations while maintaining compatibility with standard GStreamer pipelines. The sink supports zero-copy data transfer, multiple listeners, dynamic connection/disconnection, and automatic format negotiation. Unlike standard InterPipe elements, RS inter elements may offer better performance characteristics and additional features through their Rust implementation. Common use cases include high-throughput data distribution, low-latency pipeline communication, implementing scalable media processing architectures, and building performance-critical applications. The media type parameter ensures proper type safety and format negotiation. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.

public class RSInterSinkBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

RSInterSinkBlock(MediaBlockPadMediaType, string)

Initializes a new instance of the VisioForge.Core.MediaBlocks.Bridge.RSInterSinkBlock class with specified media type and channel ID. Creates an RS inter sink that will publish data to the named channel for consumption by RSInterSourceBlock instances. The media type ensures proper format negotiation and type safety.

public RSInterSinkBlock(MediaBlockPadMediaType mediaType, string pairID)

Parameters

mediaType MediaBlockPadMediaType

The type of media this sink will accept (video, audio, subtitle, or auto).

pairID string

The unique identifier for the named channel that sources will connect to.

Properties

Input

Gets the single input pad for this sink block.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets all input pads. This sink has a single input with the specified media type.

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

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

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

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

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

PairID

Gets or sets the unique channel identifier that links this sink to its corresponding sources. All RSInterSourceBlock instances with the same PairID will receive data from this sink.

public string PairID { get; set; }

Property Value

string

Type

Gets the block type identifier for this RS inter sink.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Builds and initializes the RS inter sink within the pipeline. Creates the Rust-based inter sink element with the specified channel name and establishes pad connections. The sink will immediately begin accepting data for distribution to connected sources.

public override bool Build()

Returns

bool

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

CleanUp()

Performs cleanup operations for the RS inter sink. Note: The actual element disposal is commented out, likely to maintain the named channel for other pipelines that may still be connected.

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 RS inter sink.

public BaseElement GetCore()

Returns

BaseElement

The RSInterSink element that manages the named channel.

GetElement()

Gets the underlying GStreamer element for this RS inter sink.

public Element GetElement()

Returns

Element

The Rust-based GStreamer inter sink element.

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.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Sets the pipeline context for this RS inter 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 RS inter sink.

See Also