Table of Contents

Class ProxySinkBlock

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

Proxy sink block that enables direct element-to-element communication within the same pipeline using GStreamer's proxy elements. This block acts as a sink that pairs with a ProxySourceBlock to create an internal bridge within a single pipeline, allowing dynamic pipeline reconfiguration and data routing without traditional pad connections. The proxy mechanism provides a way to decouple pipeline sections, making it easier to implement dynamic pipeline topologies, switchable processing paths, and modular pipeline designs. Unlike InterPipe which works across pipelines, proxy elements work within the same pipeline with minimal overhead. The sink automatically registers itself in a global cache for discovery by its paired source. Common use cases include implementing switchable effects chains, creating reusable processing modules within a pipeline, and building dynamic routing systems. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals.

public class ProxySinkBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

ProxySinkBlock(string)

Initializes a new instance of the VisioForge.Core.MediaBlocks.Bridge.ProxySinkBlock class with specified pair ID. Creates a proxy sink that will forward data to the ProxySourceBlock with matching pair ID. The sink is automatically registered in the global bridge cache for discovery by sources.

public ProxySinkBlock(string pairID)

Parameters

pairID string

The unique identifier that pairs this sink with its corresponding proxy source.

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 that accepts any media type.

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

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

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

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

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

PairID

Gets or sets the unique pair identifier that links this sink to its corresponding proxy source. Both sink and source must use the same pair ID for successful connection within the pipeline.

public string PairID { get; set; }

Property Value

string

Type

Gets the block type identifier for this proxy sink.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Builds and initializes the proxy sink within the pipeline. Creates the proxysink element and establishes pad connections. The sink will be ready to forward data to its paired ProxySourceBlock once both are built.

public override bool Build()

Returns

bool

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

CleanUp()

Performs cleanup operations for the proxy sink. Note: The actual element disposal is handled in the Dispose method to ensure proper removal from the bridge cache before releasing 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 proxy sink.

public BaseElement GetCore()

Returns

BaseElement

The ProxySink element that manages the proxy connection.

GetElement()

Gets the underlying GStreamer element for this proxy sink.

public Element GetElement()

Returns

Element

The GStreamer proxysink 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 proxy 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 proxy sink.

See Also