TVideoGrabber.OnDeviceArrivalOrRemoval

Prev

Next

TVideoGrabber

Events

 




































































































Occurs each time a video capture device is plugged-in or removed.


Declaration
property OnDeviceArrivalOrRemoval: TOnDeviceArrivalOrRemoval read FOnDeviceArrivalOrRemoval write FOnDeviceArrivalOrRemoval;


__property TOnDeviceArrivalOrRemoval OnDeviceArrivalOrRemoval=read=FOnDeviceArrivalOrRemoval, write=FOnDeviceArrivalOrRemoval


Event OnDeviceArrivalOrRemoval(IsDeviceArrival As Boolean, IsVideoDevice As Boolean, DeviceName As String, DeviceIndex As Long)

Description

This TOnDeviceArrivalOrRemoval event occurs each time a video capture device is plugged-in or removed and returns information about this device: audio or video device, connected or disconnected, device name.

The VideoDevices list or AudioDevices list is updated if a new capture device has been plugged-in.

If a video capture device has been unplugged, it remains in the list. To determine if a device is connected or not, test the IsVideoDeviceConnected (DeviceIndex: LongInt): Boolean function that will return false after the device removal.

When the video capture device is plugged-in again, IsVideoDeviceConnected (DeviceIndex: LongInt): Boolean returns true again.

(Use IsAudioDeviceConnected to test audio devices from the AudioDevices list)

Note: device arrival/removal detection works only with WDM drivers, "old" VFW capture device appear always in the device lists, even if not connected.


See Also
TOnDeviceArrivalOrRemoval OnDeviceLost RefreshDevicesAndCompressorsLists