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.
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. |
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.