Table of Contents

Class LVCVideoInput

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

Represents a video-only input source for the Live Video Compositor.

public class LVCVideoInput : LVCInput, IDisposable

Inheritance

Implements

Inherited Members

Remarks

This class handles video input streams that will be composited into the final output. It supports various features including custom positioning, resize policies, optional preview rendering, and processing blocks for applying effects or transformations to the input video stream. Video inputs can be dynamically added, removed, and repositioned during playback.

Constructors

LVCVideoInput(string, LiveVideoCompositor, MediaBlock, VideoFrameInfoX, Rect, bool, MediaBlock)

Initializes a new instance of the VisioForge.Core.LiveVideoCompositorV2.LVCVideoInput class with a compositor reference.

public LVCVideoInput(string name, LiveVideoCompositor compositor, MediaBlock mainBlock, VideoFrameInfoX info, Rect rect, bool autostart, MediaBlock processingBlock = null)

Parameters

name string

A descriptive name for this input.

compositor LiveVideoCompositor

The VisioForge.Core.LiveVideoCompositorV2.LiveVideoCompositor instance this input belongs to.

mainBlock MediaBlock

The source media block that provides the video stream.

info VideoFrameInfoX

The video frame information. Width, height, and frame rate are required.

rect Rect

The position and size of this video within the compositor output.

autostart bool

If true, the input will start automatically when the compositor starts.

processingBlock MediaBlock

An optional processing block to apply effects or transformations. Default is null.

Exceptions

ArgumentOutOfRangeException

Thrown when info is null.

LVCVideoInput(string, MediaBlock, VideoFrameInfoX, Rect, bool, MediaBlock)

Initializes a new instance of the VisioForge.Core.LiveVideoCompositorV2.LVCVideoInput class without a compositor reference.

public LVCVideoInput(string name, MediaBlock mainBlock, VideoFrameInfoX info, Rect rect, bool autostart, MediaBlock processingBlock = null)

Parameters

name string

A descriptive name for this input.

mainBlock MediaBlock

The source media block that provides the video stream.

info VideoFrameInfoX

The video frame information. Width, height, and frame rate are required.

rect Rect

The position and size of this video within the compositor output.

autostart bool

If true, the input will start automatically when added to a compositor.

processingBlock MediaBlock

An optional processing block to apply effects or transformations. Default is null.

Remarks

This constructor is typically used when creating inputs that will be added to a compositor later.

Exceptions

ArgumentOutOfRangeException

Thrown when info is null.

Properties

Info

Gets the video frame information for this input.

public VideoFrameInfoX Info { get; }

Property Value

VideoFrameInfoX

ProcessingVideoBlocks

Gets the list of video processing blocks applied to this input.

public List<MediaBlock> ProcessingVideoBlocks { get; }

Property Value

List<MediaBlock>

Remarks

Processing blocks are applied in the order they appear in the list, after the source block but before the video is sent to the compositor mixer. Common uses include color correction, deinterlacing, or other video filters.

Rectangle

Gets or sets the position and size of this video input within the compositor output.

public Rect Rectangle { get; set; }

Property Value

Rect

Remarks

Changes to this property after playback has started will not take effect automatically. To update the rectangle during playback, use the compositor's Input_VideoStream_Update method. When ResizePolicy is set to LetterboxToFill, changing this property will automatically recalculate the crop area.

ResizePolicy

Gets or sets the resize policy for this video input.

public LVCResizePolicy ResizePolicy { get; set; }

Property Value

LVCResizePolicy

Remarks

The resize policy controls how the input video is fitted into its designated rectangle, affecting whether aspect ratio is preserved and how empty space or overflow is handled.

VideoView

Gets or sets an optional video view for previewing this input.

public IVideoView VideoView { get; set; }

Property Value

IVideoView

Remarks

When set, the input video will be duplicated and rendered to this view in addition to being sent to the compositor. This is useful for monitoring individual inputs. The preview uses a tee element to split the video stream without affecting the main composition.

ZOrder

Gets or sets the z-order (layer position) of this video input.

public uint ZOrder { get; set; }

Property Value

uint

Remarks

Z-order determines the stacking order when multiple video inputs overlap. Inputs with higher z-order values will be rendered on top of those with lower values.

Methods

Dispose(bool)

Releases the unmanaged and optionally managed resources used by this video input.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Remarks

This method properly disposes of the video tee and renderer components if they were created, then calls the base class disposal logic. This method is called by the public Dispose method and the finalizer.

ToString()

Returns a string representation of this video input.

public override string ToString()

Returns

string

A string containing the input name and its rectangle dimensions in the format "Name (Rectangle)".

See Also