Table of Contents

Class LVCVideoAudioInput

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

Live Video Compositor combined video and audio input that feeds synchronized video/audio content into the composition pipeline. Handles sources with both video and audio streams, maintaining synchronization between streams while providing independent processing capabilities for video positioning/effects and audio mixing/effects. This is the most common input type for camera sources, media files, and streaming inputs. Implements the VisioForge.Core.LiveVideoCompositor.LVCInput.

public class LVCVideoAudioInput : LVCInput, IDisposable

Inheritance

Implements

Inherited Members

Examples

// Creating a combined video/audio input from a camera
var input = new LVCVideoAudioInput("Camera", compositor, cameraBlock, videoInfo, audioInfo,
    new Rect(0, 0, 640, 480), autostart: true);
await compositor.Input_AddAsync(input);

Remarks

Combined video/audio inputs support:

  • Synchronized video and audio stream processing
  • Independent video positioning within composition canvas via Rectangle property
  • Separate processing blocks for video effects and audio effects
  • Custom synchronization flags for latency management
  • Dynamic detection of video/audio availability from source blocks
  • Automatic format conversion to match compositor settings Most live sources (cameras, microphones, streaming inputs, media files) use this input type.

Constructors

LVCVideoAudioInput(string, LiveVideoCompositor, MediaBlock, VideoFrameInfoX, AudioInfoX, Rect, bool, MediaBlock, MediaBlock, bool, bool?)

Initializes a new instance of the VisioForge.Core.LiveVideoCompositor.LVCVideoAudioInput class with a compositor reference.

public LVCVideoAudioInput(string name, LiveVideoCompositor compositor, MediaBlock mainBlock, VideoFrameInfoX videoInfo, AudioInfoX audioInfo, Rect rect, bool autostart, MediaBlock processingVideoBlock = null, MediaBlock processingAudioBlock = null, bool live = true, bool? customSyncFlag = null)

Parameters

name string

The unique name identifying this combined video/audio input within the compositor.

compositor LiveVideoCompositor

The parent Live Video Compositor instance that will manage this input.

mainBlock MediaBlock

The primary source block that provides both video and audio content.

videoInfo VideoFrameInfoX

The video format specification including resolution, pixel format, and frame rate.

audioInfo AudioInfoX

The audio format specification including sample format, sample rate, and channel count.

rect Rect

The rectangle defining position (X, Y) and dimensions (Width, Height) within the composition canvas.

autostart bool

If set to true, the input automatically starts with the main compositor pipeline.

processingVideoBlock MediaBlock

Optional processing block for video effects or transformations before bridging.

processingAudioBlock MediaBlock

Optional processing block for audio effects or transformations before bridging.

live bool

If set to true, indicates this is a live/real-time source (affects timing behavior).

customSyncFlag bool?

Optional synchronization flag for controlling video/audio sync behavior in the bridge system.

LVCVideoAudioInput(string, MediaBlock, VideoFrameInfoX, AudioInfoX, Rect, bool, MediaBlock, MediaBlock, bool, bool?)

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

public LVCVideoAudioInput(string name, MediaBlock mainBlock, VideoFrameInfoX videoInfo, AudioInfoX audioInfo, Rect rect, bool autostart, MediaBlock processingVideoBlock = null, MediaBlock processingAudioBlock = null, bool live = true, bool? customSyncFlag = null)

Parameters

name string

The unique name identifying this combined video/audio input.

mainBlock MediaBlock

The primary source block that provides both video and audio content.

videoInfo VideoFrameInfoX

The video format specification including resolution, pixel format, and frame rate.

audioInfo AudioInfoX

The audio format specification including sample format, sample rate, and channel count.

rect Rect

The rectangle defining position (X, Y) and dimensions (Width, Height) within the composition canvas.

autostart bool

If set to true, the input automatically starts with the main compositor pipeline.

processingVideoBlock MediaBlock

Optional processing block for video effects or transformations before bridging.

processingAudioBlock MediaBlock

Optional processing block for audio effects or transformations before bridging.

live bool

If set to true, indicates this is a live/real-time source (affects timing behavior).

customSyncFlag bool?

Optional synchronization flag for controlling video/audio sync behavior in the bridge system.

Properties

AudioID

Gets the audio identifier.

public int AudioID { get; }

Property Value

int

Rectangle

Gets or sets the rectangle. 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

VideoID

Gets the video identifier.

public int VideoID { get; }

Property Value

int

Methods

Build(int, string, int, string)

Builds the input pipeline by connecting source blocks to bridge sinks with optional processing blocks.

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

Parameters

id int

The video stream identifier.

uniqueName string

The unique name for the video bridge connection.

id2 int

The audio stream identifier.

uniqueName2 string

The unique name for the audio bridge connection.

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

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

GetVideoInfo()

Gets the video information.

public VideoFrameInfoX GetVideoInfo()

Returns

VideoFrameInfoX

VideoFrameInfoX.

See Also