Table of Contents

Class SRTSinkSettings

Namespace
VisioForge.Core.Types.X.Sinks
Assembly
VisioForge.Core.dll

SRT (Secure Reliable Transport) sink settings for low-latency video streaming.

public class SRTSinkSettings : IMediaBlockSettings

Inheritance

Implements

Inherited Members

Properties

Authentication

Boolean to authenticate a connection. If true, the incoming connection is authenticated. Defaults to true.

public bool Authentication { get; set; }

Property Value

bool

AutoReconnect

Automatically reconnect when the connection fails. Defaults to true.

public bool AutoReconnect { get; set; }

Property Value

bool

Latency

Gets or sets the latency. Defaults to 125 milliseconds.

public TimeSpan Latency { get; set; }

Property Value

TimeSpan

LocalAddress

Local address to bind. Defaults to null.

public string LocalAddress { get; set; }

Property Value

string

LocalPort

Local port to bind. Defaults to 7001, which in listener and rendezvous mode means the port of VisioForge.Core.Types.X.Sinks.SRTSinkSettings.Uri.

public uint LocalPort { get; set; }

Property Value

uint

Mode

SRT connection mode. Defaults to GstSRTConnectionMode.GST_SRT_CONNECTION_MODE_CALLER.

public SRTConnectionMode Mode { get; set; }

Property Value

SRTConnectionMode

MuxerLatency

Gets or sets the MPEG-TS muxer aggregator latency. Controls how long mpegtsmux waits for all streams before producing output. Higher values improve A/V sync but increase startup delay. Defaults to 1000 milliseconds.

public TimeSpan MuxerLatency { get; set; }

Property Value

TimeSpan

Passphrase

Password for the encrypted transmission.

public string Passphrase { get; set; }

Property Value

string

PbKeyLen

Crypto key length in bytes. Defaults to GstSRTKeyLength.GST_SRT_KEY_LENGTH_NO_KEY.

public SRTKeyLength PbKeyLen { get; set; }

Property Value

SRTKeyLength

PollTimeout

Return poll wait after timeout. A value of null keeps the default of 1000 milliseconds: an infinite wait would keep StopAsync from returning while the receiver is stalled. Defaults to 1000 milliseconds.

public TimeSpan? PollTimeout { get; set; }

Property Value

TimeSpan?

PreResolveHostname

When true, the SDK pre-resolves any DNS hostname in VisioForge.Core.Types.X.Sinks.SRTSinkSettings.Uri to a literal IPv4 address on the managed side (via System.Net.Dns) before handing the URI to the native srtsink. This is a workaround for a race in GLib's threaded DNS resolver (gthreadedresolver.ccancelled_cb assertion → abort()) that crashes the host process when several SRT sinks with VisioForge.Core.Types.X.Sinks.SRTSinkSettings.AutoReconnect lose connectivity at the same time and cancel their in-flight DNS lookups concurrently. Defaults to false — opt in only when you hit the crash, since pre-resolving freezes the connection onto a single IP for the pipeline's lifetime (no re-resolution on reconnect, no load-balancer rotation).

public bool PreResolveHostname { get; set; }

Property Value

bool

SCTE35PID

Gets or sets the PID SCTE-35 splice sections are written on; 0 (the default) writes none.

public int SCTE35PID { get; set; }

Property Value

int

Remarks

With a PID set, the stream carries a SCTE-35 stream (stream type 0x86) with a splice_null heartbeat every 5 minutes, the sections SRTMPEGTSSinkBlock.InsertSpliceOut and InsertSpliceIn add (for an SRTOutput, VideoCaptureCoreX.Outputs_InsertSpliceOut and Outputs_InsertSpliceIn), and those read by an upstream MPEGTSDemuxBlock with MPEGTSDemuxSettings.EnableSCTE35 set. Pick a PID in 0x50-0x1FFE that no other stream uses, for example 500; a PID outside that range is reported as an error and writes nothing. Set it before the pipeline is built: a later change does not reach the muxer. Used by SRTMPEGTSSinkBlock and the SRTOutput of VideoCaptureCoreX; SRTSinkBlock sends the stream unchanged.

StreamID

Stream ID for the SRT access control.

public string StreamID { get; set; }

Property Value

string

Uri

URI in the form of srt://address:port. Defaults to "srt://:8888".

public string Uri { get; set; }

Property Value

string

WaitForConnection

Boolean to block streaming until a client connects. If true, streaming only starts when a client is connected. Defaults to false.

public bool WaitForConnection { get; set; }

Property Value

bool

Methods

CreateBlock()

Creates the media block instance for SRT sink.

public MediaBlock CreateBlock()

Returns

MediaBlock

A new instance of VisioForge.Core.MediaBlocks.Sinks.SRTMPEGTSSinkBlock configured with these settings.