Table of Contents

Class RTSPSourceSettings

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

RTSP source settings.

public class RTSPSourceSettings : IMediaPlayerBaseSourceSettings, IVideoCaptureBaseVideoSourceSettings, IVideoMixerSource, IVideoSourceSettings, IMediaBlockSettings

Inheritance

Implements

Inherited Members

Properties

AllowedProtocols

Gets or sets the allowed protocols.

public RTSPSourceProtocol AllowedProtocols { get; set; }

Property Value

RTSPSourceProtocol

AudioEnabled

Gets or sets a value indicating whether audio stream is enabled.

public bool AudioEnabled { get; set; }

Property Value

bool

BufferMode

Gets or sets the buffer mode for the jitter buffer. Controls how incoming RTP packets are buffered and reordered. Note: This property is currently only used internally when LowLatencyMode is enabled. For normal operation, GStreamer's default buffering is used.

public RTSPBufferMode BufferMode { get; set; }

Property Value

RTSPBufferMode

CompatibilityMode

Gets or sets a value indicating whether to use compatibility mode. In compatibility mode, the SDK will not try to read camera information, but will still try to open and play the stream inside the RTSPSourceBlock.

public bool CompatibilityMode { get; set; }

Property Value

bool

CustomVideoDecoder

Gets or sets the custom video decoder to use.

public string CustomVideoDecoder { get; set; }

Property Value

string

DoRTCP

Gets or sets a value indicating whether do RTCP.

public bool DoRTCP { get; set; }

Property Value

bool

DropOnLatency

Gets or sets a value indicating whether to drop frames that arrive later than the configured latency. When true, late frames are dropped to maintain the target latency. Note: This property is currently only used internally when LowLatencyMode is enabled. For normal operation, GStreamer's default behavior is used.

public bool DropOnLatency { get; set; }

Property Value

bool

EnableRAWVideoAudioEvents

Gets or sets a value indicating whether to enable RAW audio/video events.

public bool EnableRAWVideoAudioEvents { get; set; }

Property Value

bool

FallbackSwitch

Gets or sets the fallback switch settings for automatic failover. When configured, the source will automatically switch to a fallback (static text, image, or media) when the main RTSP stream fails.

public FallbackSwitchSettings FallbackSwitch { get; set; }

Property Value

FallbackSwitchSettings

Latency

Gets or sets the latency (buffer size). For low latency mode, set this to a lower value (e.g., 0-200ms).

public TimeSpan Latency { get; set; }

Property Value

TimeSpan

Login

Gets or sets IP camera login, if required.

public string Login { get; set; }

Property Value

string

LowLatencyMode

Gets or sets a value indicating whether to enable low latency mode. When enabled, configures the RTSP source for minimal buffering and latency. This sets buffer-mode to None and drop-on-latency to true automatically.

public bool LowLatencyMode { get; set; }

Property Value

bool

NTPSync

Gets or sets a value indicating whether to synchronize RTP timestamps with NTP timestamps. Improves timestamp accuracy for synchronized multi-stream playback. Default is false.

public bool NTPSync { get; set; }

Property Value

bool

NTPTimeSource

Gets or sets the NTP time source for timestamp synchronization. Only used when NTPSync is enabled. Default is NTP.

public RTSPNTPTimeSource NTPTimeSource { get; set; }

Property Value

RTSPNTPTimeSource

Password

Gets or sets IP camera password, if required.

public string Password { get; set; }

Property Value

string

RTPBlockSize

Gets or sets the size of the RTP block.

public int RTPBlockSize { get; set; }

Property Value

int

UDPBufferSize

Gets or sets the size of the UDP buffer.

public int UDPBufferSize { get; set; }

Property Value

int

Uri

Gets or sets the URI.

public Uri Uri { get; set; }

Property Value

Uri

UseGPUDecoder

Gets or sets a value indicating whether to use GPU decoder.

public bool UseGPUDecoder { get; set; }

Property Value

bool

Methods

CreateAsync(Uri, string, string, bool, bool)

Create as an asynchronous operation.

public static Task<RTSPSourceSettings> CreateAsync(Uri uri, string login, string password, bool audioEnabled, bool readInfo = true)

Parameters

uri Uri

The URI.

login string

The login.

password string

The password.

audioEnabled bool

if set to true audio is enabled.

readInfo bool

if set to true to read information. Disable only if you have some issues.

Returns

Task<RTSPSourceSettings>

A Task<RTSPSourceSettings> representing the asynchronous operation.

CreateBlock()

Creates the block.

public MediaBlock CreateBlock()

Returns

MediaBlock

MediaBlock.

GetInfo()

Gets the information. Call the ReadInfoAsync method to get the information first.

public MediaFileInfo GetInfo()

Returns

MediaFileInfo

MediaFileInfo.

GetVideoURLByONVIFAsync()

Get video URL by onvif as an asynchronous operation.

public Task<bool> GetVideoURLByONVIFAsync()

Returns

Task<bool>

A Task<System.Boolean> representing the asynchronous operation.

IsAudioAvailable()

Determines whether audio available.

public bool IsAudioAvailable()

Returns

bool

true if audio available; otherwise, false.

IsVideoAvailable()

Determines whether video available.

public bool IsVideoAvailable()

Returns

bool

true if video available; otherwise, false.

ReadInfo()

Reads the information.

public MediaFileInfo ReadInfo()

Returns

MediaFileInfo

MediaFileInfo.

ReadInfoAsync()

Reads the information asynchronous.

public Task<MediaFileInfo> ReadInfoAsync()

Returns

Task<MediaFileInfo>

Task<MediaFileInfo>.