Table of Contents

Class SourceConnectedEventArgs

Namespace
VisioForge.Core.Types.Events
Assembly
VisioForge.Core.dll

Provides data for the source connected event that occurs when a media source (camera, file, stream, etc.) successfully connects and provides its media properties.

public class SourceConnectedEventArgs : EventArgs

Inheritance

Inherited Members

Remarks

This event is crucial for:

  • Detecting when a media source is ready for processing
  • Obtaining source video dimensions for UI layout
  • Validating source compatibility with processing requirements
  • Triggering automatic adjustments based on source properties
The event fires after the source negotiates its format and before the first frame is rendered.

Constructors

SourceConnectedEventArgs(int, int, TimeSpan)

Initializes a new instance of the VisioForge.Core.Types.Events.SourceConnectedEventArgs class.

public SourceConnectedEventArgs(int width, int height, TimeSpan startTime)

Parameters

width int

Video width.

height int

Video height.

startTime TimeSpan

Start time.

Properties

Height

Gets the height of the connected video source in pixels.

public int Height { get; }

Property Value

int

Remarks

This represents the native height of the source before any scaling or transformation. Common values include 480, 720, 1080, 2160 for standard resolutions.

TimeStamp

Gets the start timestamp of the media source.

public TimeSpan TimeStamp { get; }

Property Value

TimeSpan

Remarks

For live sources (cameras, streams), this is typically TimeSpan.Zero. For file sources, this may indicate the position from which playback will begin, especially useful when resuming playback or starting from a specific position.

Width

Gets the width of the connected video source in pixels.

public int Width { get; }

Property Value

int

Remarks

This represents the native width of the source before any scaling or transformation. Common values include 640, 1280, 1920, 3840 for standard resolutions.