Table of Contents

Class LiveVideoCompositorSettings

Namespace
VisioForge.Core.LiveVideoCompositorV2
Assembly
VisioForge.Core.dll

Contains configuration settings for the Live Video Compositor. This class defines all the parameters needed to initialize and configure a live video compositing session, including video dimensions, frame rate, audio settings, and output destinations.

public class LiveVideoCompositorSettings

Inheritance

Inherited Members

Remarks

The settings control both video and audio parameters for the compositor, as well as specify the mixer type and output targets. Video parameters are immutable once set through the constructor, while audio settings and output destinations can be modified after initialization.

Constructors

LiveVideoCompositorSettings(int, int, VideoFrameRate)

Initializes a new instance of the VisioForge.Core.LiveVideoCompositorV2.LiveVideoCompositorSettings class with the specified video dimensions and frame rate.

public LiveVideoCompositorSettings(int width, int height, VideoFrameRate frameRate)

Parameters

width int

The width of the output video in pixels.

height int

The height of the output video in pixels.

frameRate VideoFrameRate

The frame rate for the output video.

Remarks

The constructor sets the video parameters which are immutable after initialization. The mixer type is automatically set to OpenGL for cross-platform compatibility. Audio settings are initialized to default values but can be modified after construction.

Fields

MaxInputFrameHoldTimeout

Maximum safe value for VisioForge.Core.LiveVideoCompositorV2.LiveVideoCompositorSettings.InputFrameHoldTimeout — 100 days. The underlying intervideosrc timeout is stored as a UInt64 nanosecond count, so the theoretical overflow point is ulong.MaxValue ns ≈ 584 years. The 100-day cap is an intentional sanity limit, not an overflow guard — no realistic compositor scenario needs a hold longer than that.

public static readonly TimeSpan MaxInputFrameHoldTimeout

Field Value

TimeSpan

Properties

AudioChannels

Gets or sets the number of audio channels.

public int AudioChannels { get; set; }

Property Value

int

AudioEnabled

Gets or sets a value indicating whether audio stream processing is enabled in the compositor.

public bool AudioEnabled { get; set; }

Property Value

bool

AudioFormat

Gets or sets the audio sample format for the compositor's audio output.

public AudioFormatX AudioFormat { get; set; }

Property Value

AudioFormatX

AudioOutput

Gets or sets the audio renderer block for audio playback.

public AudioRendererBlock AudioOutput { get; set; }

Property Value

AudioRendererBlock

AudioSampleRate

Gets or sets the audio sample rate in Hz.

public int AudioSampleRate { get; set; }

Property Value

int

InputFrameHoldTimeout

Gets or sets the timeout after which an input's bridge switches from repeating its last received frame to producing black frames when no new buffers arrive.

public TimeSpan InputFrameHoldTimeout { get; set; }

Property Value

TimeSpan

Remarks

Applied to the intervideosrc element in each input's bridge. While the input pipeline is paused, intervideosrc continues to output the last received buffer at the configured framerate until this timeout elapses, after which it begins emitting black frames.

This timeout is not pause-aware. The underlying intervideosrc timeout fires on ANY absence of incoming buffers for longer than the configured value — a network stall on an RTSP input, a crashed decoder, a slow source, or a file EOS will all trigger the same "frozen last frame until timeout, then black" behavior as an explicit pause. Large values therefore mask genuine source failures as a frozen picture instead of a visible black transition.

If the input pauses or stalls before the first frame has reached the bridge (for example a slow source that hasn't negotiated caps yet), intervideosrc has no cached frame to hold and emits black frames regardless of this timeout — the hold behavior requires at least one frame to have been received on the bridge.

The value is captured when each input's bridge is built (during VisioForge.Core.LiveVideoCompositorV2.LiveVideoCompositor.StartAsync / input registration). Changes made after the compositor has started do not retroactively affect bridges that were already built — they only apply to bridges constructed afterwards.

This property is not thread-safe. Configure it before VisioForge.Core.LiveVideoCompositorV2.LiveVideoCompositor.StartAsync; concurrent reads and writes against a TimeSpan (8 bytes) are not guaranteed atomic on 32-bit runtimes.

The setter throws ArgumentOutOfRangeException for zero / negative values and for values greater than VisioForge.Core.LiveVideoCompositorV2.LiveVideoCompositorSettings.MaxInputFrameHoldTimeout. Zero is rejected because its behavior is implementation-defined across GStreamer versions (some treat it as "disabled", others emit black frames on every boundary); use VisioForge.Core.LiveVideoCompositorV2.LiveVideoCompositorSettings.MaxInputFrameHoldTimeout if you want an effectively-infinite hold.

MixerType

Gets or sets the type of video mixer to use for compositing.

public LVCMixerType MixerType { get; set; }

Property Value

LVCMixerType

VideoFrameRate

Gets the frame rate for the output video.

public VideoFrameRate VideoFrameRate { get; }

Property Value

VideoFrameRate

VideoHeight

Gets the height of the output video in pixels.

public int VideoHeight { get; }

Property Value

int

VideoView

Gets or sets the video view control for direct rendering output.

public IVideoView VideoView { get; set; }

Property Value

IVideoView

VideoWidth

Gets the width of the output video in pixels.

public int VideoWidth { get; }

Property Value

int