GrabberListener::deviceListChanged Method

This method is called when the list of available video capture devices has changed.
Syntax:
virtual void    deviceListChanged( Grabber& caller, const DeviceListChangeData& reserved );
Parameter Description
caller

Identifies the Grabber object that called this method.

reserved

Reserved for future use.

Remarks:

This callback method is called when a video capture device becomes available for IC Imaging Control to use, e.g. because the user plugged it in, or a driver has been successfully installed. It is also called when a device has been removed from the system and is no longer available.

This callback method is only called, if the GrabberListener object was registered by a call to Grabber::addListener with the parameter eDEVICELISTCHANGED or eALL.

Exceptions that occur in the deviceListChanged event will get lost in the system. Therefore, bugs in the code that cause an exception cannot be recognized. To avoid this, all code in the event handler should be enclosed by a try ... catch block. If you need to display error messages, do not use a message box. Use a "debug trace" instead (e.g. TRACE(...) ). This is very important, because otherwise the system may run into a deadlock which will cause the application to hang.

Information:

Introduced in version 3.4

See also: GrabberListener, Grabber::addListener, GrabberListener::tListenerType, GrabberListener::deviceLost, Grabber::getAvailableVideoCaptureDevices

<< GrabberListener