Allows you to configure the video capture driver. This configuration can be performed by the user (via a dialog box) or through programming (configuration of resolution).
Caution: This function can only be used with the Camera controls in compatible mode ("Use the former 'Video for Windows' APIs (compatibility)" checked in the control description).
// Displays the standard dialog box for configuring the driver for video capture
// used for the "CAM_MyVideo" control
// Specifies a resolution of 640 by 480
VideoConfigure(CAM_VIDEO1, viResolution, 640, 480)
<Result> = VideoConfigure(<Camera control> [, <Type of configuration> [, <Width resolution> , <Height resolution>]])
- True if the standard dialog box was displayed,
- False if an error occurred. The corresponding error message is returned by ErrorInfo.
<Camera control>: Control name
Name of the Camera control to be used.
<Type of configuration>: Optional integer constant
Type of configuration to perform:
|viConfigureFormat||Display a dialog box (if it exists) allowing the user to specify the camera resolution, the number of colors used, etc. |
|Display a dialog box (if it exists) allowing the user to specify the name of camera to use and the parameters of this camera (saturation for example).|
This dialog box depends on the driver used by the Camera control.
|viResolution||Used to specify a resolution for the camera, via <Width resolution> and <Height resolution>.|
<Width resolution>: Optional integer
Width of camera resolution (in pixels). This parameter must be specified if <Type of configuration> is set to viResolution.
<Height resolution>: Optional integer
Height of the camera resolution (in pixels). This parameter must be specified if <Type of configuration> is set to viResolution.
Operating mode of the Camera control when displaying dialog boxes
- If the panel for configuring the format is displayed, the Camera control is frozen.
- If the configuration panel is displayed by the viConfigureSource constant, the Camera control continues to operate. The modifications of the parameters are immediately taken into account and applied to the Camera control in "direct live".