Table of Contents

Class VideoStreamCaptureSourceOptions

Namespace
CapCognition.Net.CaptureSources.VideoStream
Assembly
CapCognition.Net.dll
public class VideoStreamCaptureSourceOptions : CaptureControl.CaptureSourceOptions
Inheritance
VideoStreamCaptureSourceOptions
Inherited Members

Constructors

VideoStreamCaptureSourceOptions(Uri, string?, string?, Size?, bool)

public VideoStreamCaptureSourceOptions(Uri url, string? username, string? password, Size? requestedResultingFrameSize = null, bool enableAudioStream = false)

Parameters

url Uri
username string
password string
requestedResultingFrameSize Size?
enableAudioStream bool

Properties

AdditionalStreamingOptionsToSet

Additional input options to set for the FFMPEG streaming library. If a key already exists, it will be overwritten. All options available at https://ffmpeg.org/ffmpeg-formats.html#Options-20

public Dictionary<string, string>? AdditionalStreamingOptionsToSet { get; set; }

Property Value

Dictionary<string, string>

DecoderPreference

Controls which hardware video-decoder backends are attempted and in which order. A failing backend automatically falls back to the next backend and ultimately to CPU decoding.

public VideoStreamCaptureSourceOptions.HardwareDecoderPreference DecoderPreference { get; set; }

Property Value

VideoStreamCaptureSourceOptions.HardwareDecoderPreference

EnableAudioStream

Set to true to enable the audio streaming from the source.

public bool EnableAudioStream { get; set; }

Property Value

bool

HardwareDevice

Optional FFmpeg device identifier passed to the selected hardware backend, for example "0" for the first CUDA device. The accepted syntax depends on the selected FFmpeg hardware backend.

public string? HardwareDevice { get; set; }

Property Value

string

Password

The password used to authenticate with the stream. Can be null if no authentication is required or the password is given in the url (see URL).

public string? Password { get; }

Property Value

string

Protocol

RTSP Protocol to use for the stream

public VideoStreamCaptureSourceOptions.ProtocolType Protocol { get; set; }

Property Value

VideoStreamCaptureSourceOptions.ProtocolType

RequestedResultingFrameSize

The requested frame size of the resulting frames. If null, the source frame size will be used.

public Size? RequestedResultingFrameSize { get; set; }

Property Value

Size?

Source

The url of the source as string

public override string? Source { get; }

Property Value

string

Url

The URL of the source. If the url contains the credentials, no username and password are needed in the properties below. Example: rtsp://{username}:{password}@{FQDN or IP}:{Port}/{Parameters}

public Uri? Url { get; }

Property Value

Uri

Username

The username used to authenticate with the stream. Can be null if no authentication is required or the username is given in the url (see URL).

public string? Username { get; }

Property Value

string

Methods

VideoStreamCaptureSourceFactory(CaptureSourceOptions)

Factory method to create a VideoStreamCaptureSource from the options.

public static IVideoStreamCaptureSource? VideoStreamCaptureSourceFactory(CaptureControl.CaptureSourceOptions options)

Parameters

options CaptureControl.CaptureSourceOptions

Returns

IVideoStreamCaptureSource