Class VideoCaptureSourceDialog
- Assembly
- VisioForge.Core.dll
Dialog window for configuring video capture sources.
public class VideoCaptureSourceDialog : Window, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild, IDisposable, IComponentConnectorInheritance
Implements
Inherited Members
Remarks
This dialog provides a user interface for selecting and configuring video capture devices such as webcams, capture cards, and other video input sources. It supports device enumeration, format selection, and frame rate configuration.
Key features: - Automatic enumeration of available video capture devices - Support for multiple video formats (resolutions, pixel formats) - Frame rate selection based on device capabilities - Cross-platform device discovery through DeviceEnumerator - Disposable pattern implementation for proper resource cleanup
Supported device types: - USB/UVC cameras (webcams, camcorders) - Capture cards (HDMI, SDI, composite) - Virtual cameras and software sources - Network cameras (through appropriate drivers) - Professional video equipment
Common use cases: - Video conferencing and streaming applications - Security and surveillance systems - Video recording and editing software - Machine vision and industrial applications - Medical imaging and diagnostic equipment
Constructors
VideoCaptureSourceDialog()
Initializes a new instance of the VisioForge.Core.UI.WPF.Dialogs.Sources.VideoCaptureSourceDialog class.
public VideoCaptureSourceDialog()Properties
Device
Gets the selected video capture device name.
public string Device { get; }Property Value
Format
Gets the selected video capture format.
public string Format { get; }Property Value
FrameRate
Gets the selected video frame rate.
public VideoFrameRate FrameRate { get; }Property Value
Methods
Dispose(bool)
Releases unmanaged and optionally managed resources.
protected virtual void Dispose(bool disposing)Parameters
disposingbool-
trueto release both managed and unmanaged resources;falseto release only unmanaged resources.
Remarks
This method is called by both the Dispose() method and the finalizer. When disposing is true, the method has been called directly or indirectly by user code and managed objects can be safely disposed.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()Remarks
This method implements the IDisposable pattern and should be called when the dialog is no longer needed to ensure proper cleanup of resources. After calling this method, the object should not be used.
~VideoCaptureSourceDialog()
Finalizes an instance of the VisioForge.Core.UI.WPF.Dialogs.Sources.VideoCaptureSourceDialog class. This finalizer will run only if the Dispose method is not called.
protected ~VideoCaptureSourceDialog()Remarks
This finalizer is provided as a safety net in case the dialog is not properly disposed. It's recommended to always call Dispose() explicitly or use the dialog within a using statement.
GetDeviceSettingsAsync()
Retrieves the complete device settings configuration asynchronously.
public Task<VideoCaptureDeviceSourceSettings> GetDeviceSettingsAsync()Returns
- Task<VideoCaptureDeviceSourceSettings>
-
A Task containing VideoCaptureDeviceSourceSettings with the selected device, format, and frame rate configuration. Returns null if no valid selection is made.
Remarks
This method creates a comprehensive settings object that includes:
- Device information and capabilities
- Selected video format with resolution and pixel format
- Frame rate configuration
- Additional device-specific parameters
InitializeComponent()
InitializeComponent
public void InitializeComponent()