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, IDisposableInheritance
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
namestring-
The unique name identifying this file-based input within the compositor.
compositorLiveVideoCompositor-
The parent Live Video Compositor instance that will manage this input.
mainBlockMediaBlock-
The file source block that provides video and audio content from media files.
videoInfoVideoFrameInfoX-
The video format specification including resolution, pixel format, and frame rate.
audioInfoAudioInfoX-
The audio format specification including sample format, sample rate, and channel count.
rectRect-
The rectangle defining position (X, Y) and dimensions (Width, Height) within the composition canvas.
autostartbool-
If set to
true, the input automatically starts with the main compositor pipeline. processingVideoBlockMediaBlock-
Optional processing block for video effects or transformations before bridging.
processingAudioBlockMediaBlock-
Optional processing block for audio effects or transformations before bridging.
livebool-
If set to
true, treats the file source with live source timing (typically false for files). customSyncFlagbool?-
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
namestring-
The unique name identifying this file-based input.
mainBlockMediaBlock-
The file source block that provides video and audio content from media files.
videoInfoVideoFrameInfoX-
The video format specification including resolution, pixel format, and frame rate.
audioInfoAudioInfoX-
The audio format specification including sample format, sample rate, and channel count.
rectRect-
The rectangle defining position (X, Y) and dimensions (Width, Height) within the composition canvas.
autostartbool-
If set to
true, the input automatically starts with the main compositor pipeline. processingVideoBlockMediaBlock-
Optional processing block for video effects or transformations before bridging.
processingAudioBlockMediaBlock-
Optional processing block for audio effects or transformations before bridging.
livebool-
If set to
true, treats the file source with live source timing (typically false for files). customSyncFlagbool?-
Optional synchronization flag for controlling file-to-live timing alignment.
Properties
AudioID
Gets the audio identifier.
public int AudioID { get; }Property Value
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
VideoID
Gets the video identifier.
public int VideoID { get; }Property Value
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
idint-
The video stream identifier.
uniqueNamestring-
The unique name for the video bridge connection.
id2int-
The audio stream identifier.
uniqueName2string-
The unique name for the audio bridge connection.
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
protected override void Dispose(bool disposing)Parameters
disposingbool-
trueto release both managed and unmanaged resources;falseto release only unmanaged resources.
GetVideoInfo()
Gets the video information.
public VideoFrameInfoX GetVideoInfo()Returns
- VideoFrameInfoX
-
VideoFrameInfoX.