Table of Contents

Class UDPSinkBlock

Namespace
VisioForge.Core.MediaBlocks.Sinks
Assembly
VisioForge.Core.dll

Provides a media sink for streaming raw data over UDP to a single destination.

public class UDPSinkBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Examples

var settings = new UDPSinkSettings
{
    Host = "192.168.1.100",
    Port = 5004
};

var udpSink = new UDPSinkBlock(settings);
pipeline.Connect(muxer.Output, udpSink.Input);

Remarks

The UDPSinkBlock enables direct streaming of any media data over UDP protocol. Unlike UDPMPEGTSSinkBlock, this sink transmits raw data without MPEG-TS multiplexing.

Key features include:

  • Ultra-low latency streaming
  • Unicast and multicast support
  • Configurable TTL and QoS
  • Multicast group auto-join

Constructors

UDPSinkBlock(UDPSinkSettings)

Initializes a new instance of the VisioForge.Core.MediaBlocks.Sinks.UDPSinkBlock class with the specified settings.

public UDPSinkBlock(UDPSinkSettings settings)

Parameters

settings UDPSinkSettings

The UDP sink configuration settings.

Properties

Input

Gets the first input.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets the inputs.

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the output.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets the outputs.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Settings

Gets or sets the UDP sink configuration settings.

public UDPSinkSettings Settings { get; set; }

Property Value

UDPSinkSettings

Type

Gets the type.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Builds the UDP sink block.

public override bool Build()

Returns

bool

true if the block was successfully built; otherwise, false.

CleanUp()

Cleans up.

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 core.

public BaseElement GetCore()

Returns

BaseElement

VisioForge.Core.GStreamer.Base.BaseElement.

GetElement()

Gets the element.

public Element GetElement()

Returns

Element

Gst.Element.

GetFilenameOrURL()

Gets the UDP streaming URL.

public string GetFilenameOrURL()

Returns

string

The configured UDP URL as a string.

IsAvailable()

Determines whether the UDP sink functionality is available in the current environment.

public static bool IsAvailable()

Returns

bool

true if UDP streaming is supported; otherwise, false.

SetFilenameOrURL(string)

Sets the UDP streaming URL.

public void SetFilenameOrURL(string value)

Parameters

value string

The new UDP URL string.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Sets the context.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The pipeline.

See Also