Table of Contents

Class LVCFileVideoAudioInput

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

Live Video Compositor file-based video and audio input specifically optimized for media file playback within compositions. Handles video and audio content from file sources with specialized buffering and synchronization for non-live content. Uses BridgeBufferSinkBlock for video to provide optimal file-based media integration with the live composition pipeline. Implements the VisioForge.Core.LiveVideoCompositor.LVCInput.

public class LVCFileVideoAudioInput : LVCInput, IDisposable

Inheritance

Implements

Inherited Members

Examples

// Creating a file input for background video
var fileInput = new LVCFileVideoAudioInput("Background", compositor, fileSourceBlock,
    videoInfo, audioInfo, new Rect(0, 0, 1920, 1080), autostart: true);
await compositor.Input_AddAsync(fileInput);

Remarks

File-based inputs provide:

  • Optimized buffering for file sources via BridgeBufferSinkBlock
  • Synchronized video and audio playback from media files
  • Support for seeking, looping, and playback control
  • Independent processing blocks for video and audio effects
  • Custom synchronization flags for file-to-live timing alignment
  • Automatic format detection and conversion from file sources Designed specifically for integrating pre-recorded media into live compositions.

Constructors

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

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

public LVCFileVideoAudioInput(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 file-based input within the compositor.

compositor LiveVideoCompositor

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

mainBlock MediaBlock

The file source block that provides video and audio content from media files.

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, treats the file source with live source timing (typically false for files).

customSyncFlag bool?

Optional synchronization flag for controlling file-to-live timing alignment.

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

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

public LVCFileVideoAudioInput(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 file-based input.

mainBlock MediaBlock

The file source block that provides video and audio content from media files.

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, treats the file source with live source timing (typically false for files).

customSyncFlag bool?

Optional synchronization flag for controlling file-to-live timing alignment.

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 file input pipeline using BridgeBufferSinkBlock for video and BridgeAudioSinkBlock for audio.

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