Class RTSPSourceSettings
- Namespace
- VisioForge.Core.Types.X.Sources
- Assembly
- VisioForge.Core.dll
RTSP source settings.
public class RTSPSourceSettings : IMediaPlayerBaseSourceSettings, IVideoCaptureBaseVideoSourceSettings, IVideoMixerSource, IVideoSourceSettings, IMediaBlockSettingsInheritance
Implements
Inherited Members
Properties
AllowedProtocols
Gets or sets the allowed protocols.
public RTSPSourceProtocol AllowedProtocols { get; set; }Property Value
AudioEnabled
Gets or sets a value indicating whether audio stream is enabled.
public bool AudioEnabled { get; set; }Property Value
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
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
CustomVideoDecoder
Gets or sets the custom video decoder to use.
public string CustomVideoDecoder { get; set; }Property Value
DoRTCP
Gets or sets a value indicating whether do RTCP.
public bool DoRTCP { get; set; }Property Value
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
EnableRAWVideoAudioEvents
Gets or sets a value indicating whether to enable RAW audio/video events.
public bool EnableRAWVideoAudioEvents { get; set; }Property Value
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
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
Login
Gets or sets IP camera login, if required.
public string Login { get; set; }Property Value
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
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
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
Password
Gets or sets IP camera password, if required.
public string Password { get; set; }Property Value
RTPBlockSize
Gets or sets the size of the RTP block.
public int RTPBlockSize { get; set; }Property Value
UDPBufferSize
Gets or sets the size of the UDP buffer.
public int UDPBufferSize { get; set; }Property Value
Uri
Gets or sets the URI.
public Uri Uri { get; set; }Property Value
UseGPUDecoder
Gets or sets a value indicating whether to use GPU decoder.
public bool UseGPUDecoder { get; set; }Property Value
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
uriUri-
The URI.
loginstring-
The login.
passwordstring-
The password.
audioEnabledbool-
if set to
trueaudio is enabled. readInfobool-
if set to
trueto 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
IsAudioAvailable()
Determines whether audio available.
public bool IsAudioAvailable()Returns
- bool
-
trueif audio available; otherwise,false.
IsVideoAvailable()
Determines whether video available.
public bool IsVideoAvailable()Returns
- bool
-
trueif 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>.