DVM_SRC_RECT

The DVM_SRC_RECT message requests a user-mode video capture driver to set or return a video channel’s source rectangle.

Parameters
dwDriverID
Video channel identifier. One of VIDEO_EXTERNALIN, VIDEO_IN, VIDEO_OUT, VIDEO_EXTERNALOUT. (For details, see Opening Video Channels.)
hDriver
Driver handle.
uMsg
DVM_SRC_RECT
lParam1
Pointer to a RECT structure. For more information on the RECT structure, see the Win32 SDK.
lParam2
Contains flags. The following flags are defined.

Flag

Definition

VIDEO_CONFIGURE_CURRENT

The driver sets or returns the current source rectangle description.

VIDEO_CONFIGURE_GET

The driver returns the current rectangle description to the client.

VIDEO_CONFIGURE_MAX

The driver returns the maximum allowable source rectangle size. (Used only with VIDEO_CONFIGURE_GET.)

VIDEO_CONFIGURE_MIN

The driver returns the minimum allowable source rectangle size. (Used only with VIDEO_CONFIGURE_GET.)

VIDEO_CONFIGURE_QUERY

The driver indicates whether or not it supports the specified request.

VIDEO_CONFIGURE_SET

The driver receives a client-specified rectangle description.

Return Value

The driver should return DV_ERR_OK if the operation succeeds. Otherwise, it should return one of the DV_ERR error codes defined in msvideo.h. Custom error codes are also allowed (see DVM_GETERRORTEXT).

Comments

A client sends the DVM_SRC_RECT message by calling the driver’s DriverProc entry point, passing the specified parameter values. Applications can send this message by calling the videoMessage function, which is described in the Video for Windows Development Kit.

The driver should test the VIDEO_CONFIGURE_SET and VIDEO_CONFIGURE_GET flags to determine whether to set or to return a rectangle description. If neither of these flags is set, the driver should return an error code.

The meaning of a source rectangle is dependent on the specified video channel, as explained in Setting Source and Destination Rectangles.

User-mode video capture drivers using VCUser.lib can call VC_SetOverlayOffset when processing the DVM_SRC_RECT message on the VIDEO_EXTERNALIN channel.