setVideoDevice
Top  Previous  Next

setVideoDevice ( int Index )

Use this function to select the current video device by its index in the device list of the current video driver.

Depending on the video driver, the function performs the following actions:

 
Simulation
No action

BitFlow Camera Interface
Selects among multiple BitFlow boards in the order they appear in the Board list of the Video Source dialog

FireWire (IEEE-1394)
Selects among multiple FireWire cameras in the order they appear in the Camera list of the Video Source dialog

Video for Windows (VFW)
Selects among multiple VFW devices in the order they appear in the Select Device list of the Video Preferences dialog

DirectShow (WDM)
Selects among multiple WDM devices in the order they appear in the Select Device list of the Video Preferences dialog




Parameters
 
 
Index  
 
An integer specifying the zero-based device index.  
 
Error flags

ERR_OK  
 
The flag set if successful.  
 
ERR_NOTFOUND  
 
Video device not found.  
 
ERR_FAILED  
 
The flag set if failed.  
 
Example

This set of statements switches between two video devices every 10 seconds:  
 
showVideo(TRUE)  
Do  
 setVideoDevice(0)  
 wait(10000)  
 setVideoDevice(1)  
 wait(10000)  
Loop