Table of Contents

Class LVCVideoInput

Namespace
VisioForge.Core.LiveVideoCompositor
Assembly
VisioForge.Core.dll

Live Video Compositor video input that feeds video content into the composition pipeline. Handles video-only sources with positioning, scaling, and transformation capabilities within the composition canvas. Each video input maintains its own rectangle position, resize policy, and optional processing chain for effects or transformations. Implements the VisioForge.Core.LiveVideoCompositor.LVCInput.

public class LVCVideoInput : LVCInput, IDisposable

Inheritance

Implements

Inherited Members

Examples

// Creating a video input with custom positioning
var videoInput = new LVCVideoInput("Camera 1", compositor, sourceBlock, videoInfo, 
    new Rect(100, 100, 640, 480), autostart: true);
videoInput.ResizePolicy = LVCResizePolicy.LetterBox;
await compositor.Input_AddAsync(videoInput);

Remarks

Video inputs support:

  • Positioning within the composition canvas via Rectangle property
  • Resize policies (Stretch, LetterBox, Crop, etc.)
  • Optional processing blocks for effects, color correction, or transformations
  • Dynamic rectangle updates during playback via Input_VideoStream_Update method
  • Independent lifecycle management from the main compositor

Constructors

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

Initializes a new instance of the VisioForge.Core.LiveVideoCompositor.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

The unique name identifying this video input.

compositor LiveVideoCompositor

The compositor instance that will manage this input.

mainBlock MediaBlock

The main media block that provides the video source content.

info VideoFrameInfoX

The video frame info (width, height and frame rate are required).

rect Rect

The rectangle defining position and size within the composition.

autostart bool

if set to true, automatically starts the input when added to compositor.

processingBlock MediaBlock

The optional processing block for video effects or transformations.

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

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

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

Parameters

name string

The unique name identifying this video input.

mainBlock MediaBlock

The main media block that provides the video source content.

info VideoFrameInfoX

The video frame info (width, height and frame rate are required).

rect Rect

The rectangle defining position and size within the composition.

autostart bool

if set to true, automatically starts the input when added to compositor.

processingBlock MediaBlock

The optional processing block for video effects or transformations.

Properties

Rectangle

Gets or sets the rectangle position and size for this video input within the composition canvas. This property is ignored if the playback is started. Use the Input_VideoStream_Update method to update the rectangle during the playback.

public Rect Rectangle { get; set; }

Property Value

Rect

ResizePolicy

Gets or sets the resize policy that determines how the video input is scaled to fit its rectangle.

public LVCResizePolicy ResizePolicy { get; set; }

Property Value

LVCResizePolicy

Methods

Build(int, string, int, string)

Builds the video input pipeline by creating bridge connections and linking media blocks.

public override void Build(int id, string uniqueName, int id2 = -1, string uniqueName2 = null)

Parameters

id int

The primary identifier for this input.

uniqueName string

The unique name for the bridge connection.

id2 int

The secondary identifier (optional, default is -1).

uniqueName2 string

The secondary unique name (optional).

Exceptions

ArgumentOutOfRangeException

Thrown when media type is invalid.

GetVideoInfo()

Gets the video frame information.

public VideoFrameInfoX GetVideoInfo()

Returns

VideoFrameInfoX

The video frame info.

See Also