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, IMediaBlockInternalsInheritance
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
settingsUDPSinkSettings-
The 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 UDP sink configuration settings.
public UDPSinkSettings Settings { get; set; }Property Value
Type
Gets the type.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds the 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 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
-
trueif UDP streaming is supported; otherwise,false.
SetFilenameOrURL(string)
Sets the UDP streaming URL.
public void SetFilenameOrURL(string value)Parameters
valuestring-
The new UDP URL string.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the context.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The pipeline.