Class MultiUDPSinkBlock
- Namespace
- VisioForge.Core.MediaBlocks.Sinks
- Assembly
- VisioForge.Core.dll
Provides a media sink for streaming raw data over UDP to multiple destinations simultaneously.
public class MultiUDPSinkBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Examples
var settings = new MultiUDPSinkSettings();
settings.AddClient("192.168.1.100", 5004);
settings.AddClient("192.168.1.101", 5004);
var multiUdpSink = new MultiUDPSinkBlock(settings);
pipeline.Connect(muxer.Output, multiUdpSink.Input);
Remarks
The MultiUDPSinkBlock enables direct streaming of any media data over UDP to one or more destinations specified as comma-separated host:port pairs. Unlike MultiUDPMPEGTSSinkBlock, this sink transmits raw data without MPEG-TS multiplexing.
Key features include:
- Multi-destination streaming
- Ultra-low latency
- Unicast and multicast support
- Configurable TTL and QoS
Constructors
MultiUDPSinkBlock(MultiUDPSinkSettings)
Initializes a new instance of the VisioForge.Core.MediaBlocks.Sinks.MultiUDPSinkBlock class with the specified settings.
public MultiUDPSinkBlock(MultiUDPSinkSettings settings)Parameters
settingsMultiUDPSinkSettings-
The multi-destination UDP sink configuration settings.
Properties
Input
Gets the first input.
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets the inputs.
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the output.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets the outputs.
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the multi-destination UDP sink configuration settings.
public MultiUDPSinkSettings Settings { get; set; }Property Value
Type
Gets the type.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds the multi-destination UDP sink block.
public override bool Build()Returns
- bool
-
trueif 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
disposingbool-
trueto release both managed and unmanaged resources;falseto 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 destination clients list.
public string GetFilenameOrURL()Returns
- string
-
The configured clients as a comma-separated string.
IsAvailable()
Determines whether the multi-destination UDP sink functionality is available in the current environment.
public static bool IsAvailable()Returns
- bool
-
trueif multi-destination UDP streaming is supported; otherwise,false.
SetFilenameOrURL(string)
Sets the destination clients list.
public void SetFilenameOrURL(string value)Parameters
valuestring-
A comma-separated list of host:port pairs.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the context.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The pipeline.