CHANNEL_CAPS

typedef struct {

DWORD dwFlags;

DWORD dwSrcRectXMod;

DWORD dwSrcRectYMod;

DWORD dwSrcRectWidthMod;

DWORD dwSrcRectHeightMod;

DWORD dwDstRectXMod;

DWORD dwDstRectYMod;

DWORD dwDstRectWidthMod;

DWORD dwDstRectHeightMod;

} CHANNEL_CAPS;

The CHANNEL_CAPS structure is used by user-mode video capture drivers to return the capabilities of a video channel. Clients request channel capabilities by sending a DVM_GET_CHANNEL_CAPS message. The structure is defined in msvideo.h.

Members

dwFlags

Returns flags providing information about the channel. The following flags are defined.

Flag Definition
VCAPS_OVERLAY Indicates the channel is capable of overlay. This flag is used only for VIDEO_EXTERNALOUT channels.
VCAPS_SRC_CAN_CLIP Indicates the source rectangle can be set smaller than the maximum dimensions.
VCAPS_DST_CAN_CLIP Indicates the destination rectangle can be set smaller than the maximum dimensions.
VCAPS_CAN_SCALE Indicates the source rectangle can be a different size than the destination rectangle.

dwSrcRectXMod

Returns the granularity allowed when positioning the source rectangle in the horizontal direction.

dwSrcRectYMod

Returns the granularity allowed when positioning the source rectangle in the vertical direction.

dwSrcRectWidthMod

Returns the granularity allowed when setting the width of the source rectangle.

dwSrcRectHeightMod

Returns the granularity allowed when setting the height of the source rectangle.

dwDstRectXMod

Returns the granularity allowed when positioning the destination rectangle in the horizontal direction.

dwDstRectYMod

Returns the granularity allowed when positioning the destination rectangle in the vertical direction.

dwDstRectWidthMod

Returns the granularity allowed when setting the width of the destination rectangle.

dwDstRectHeightMod

Returns the granularity allowed when setting the height of the source rectangle.

Comments

For the video channel specified with the DVM_GET_CHANNEL_CAPS message, the driver fills in the CHANNEL_CAPS structure with the granularity, in number of pixels, of the positioning points, heights, and widths of source and destination rectangles. If, for example, the device only allows source rectangle positioning on 8-bit x-coordinate boundaries, the value returned for dwSrcRectXMod should be eight. If the device allows arbitrarily positioned rectangles, with arbitrary sizes, the structure members should all be set to one.

Rectangle dimensions indicated by modulus operators are considered advisory. When an application tries to set a rectangle size with a DVM_SRC_RECT or DVM_DST_RECT message, you can assume it will check the return value to ensure that the driver accepted the request. For example, if dwDstRectWidthMod is set to 64, the application might try to set destination rectangles with pixel widths of 64, 128, 192, 256, and so on. The driver might support only a subset of these sizes. If the application tries to specify an unsupported size, the driver should return DV_ERR_NOTSUPPORTED.