Configuring Video Channels

User-mode video capture drivers can allow users to specify configuration parameters for each video channel. After a client opens a channel, it can send a DVM_DIALOG message for the opened channel. In response to the message, the driver displays a dialog box that allows the user to specify parameters for the channel type. Typically, the driver provides a different dialog box for each channel type. If the driver does not support a channel type, or the driver does not allow user modification to the channel’s parameters, it can return the DV_ERR_NOTSUPPORTED error code.

The sample video capture driver, bravado.dll, uses dialog boxes to obtain the following channel configuration information.

Channel

Information Obtained

VIDEO_EXTERNALIN

Hue, video source standard, connector number, cable format.

VIDEO_IN

Data format, destination image size. (Also see Setting the Video Data Format.)

VIDEO_OUT

Not supported.

VIDEO_EXTERNALOUT

Saturation, brightness, contrast, red, green, blue.

User-mode drivers should store channel configuration parameters for each user by writing them into the registry, under the path HKEY_CURRENT_USER \Software \Microsoft \Multimedia \Video Capture \DriverName, where DriverName represents the name of your driver. For more information about obtaining and storing channel configuration parameters, see Configuring Video Channels, Using VCUser.lib.

The driver should provide default values for all channel configuration parameters, and it should use the default values if it has not stored values for the current user in the previously listed registry path.

Changing the format can alter the dimensions of the active portion of the frame buffer, and can also affect bit depth and color space representation. Additionally, changing between NTSC and PAL video standards can affect image dimensions. Therefore, clients typically send a DVM_FORMAT message to request the current format after they have sent a DVM_DIALOG message for the VIDEO_EXTERNALIN channel.

Clients can also request a driver to store a channel’s configuration parameters in a file, or to restore the parameters from a previously created file, by sending a DVM_CONFIGURESTORAGE message.