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 : EventArgsInheritance
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
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
Properties
Height
Gets the height of the connected video source in pixels.
public int Height { get; }Property Value
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
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
Remarks
This represents the native width of the source before any scaling or transformation. Common values include 640, 1280, 1920, 3840 for standard resolutions.