The DVM_PALETTE message requests a user-mode video capture driver to store or return a logical palette.
Flag |
Definition |
VIDEO_CONFIGURE_CURRENT |
The driver sets or returns the current palette. |
VIDEO_CONFIGURE_GET |
The driver returns the requested information to the client. |
VIDEO_CONFIGURE_MAX |
The driver returns the maximum-sized palette. (Used only with VIDEO_CONFIGURE_GET.) |
VIDEO_CONFIGURE_MIN |
The driver returns the minimum-sized palette. (Used only with VIDEO_CONFIGURE_GET.) |
VIDEO_CONFIGURE_NOMINAL |
The driver returns the nominal palette. (Used only with VIDEO_CONFIGURE_GET.) |
VIDEO_CONFIGURE_QUERY |
The driver indicates whether or not it supports the specified request. |
VIDEO_CONFIGURE_QUERYSIZE |
The driver returns the size, in bytes, of the current palette. |
VIDEO_CONFIGURE_SET |
The driver sets a client-specified palette description. |
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).
A client sends the DVM_PALETTE message by calling the driver’s DriverProc entry point, passing the specified parameter values. Applications can send this message by calling the videoConfigure 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 format description. If neither of these flags is set, the driver should return an error code.
When a client sends this message, it must also include the address of a LOGPALETTE structure (unless either the VIDEO_CONFIGURE_QUERY or VIDEO_CONFIGURE_QUERYSIZE flag is set). Depending on whether the client has set VIDEO_CONFIGURE_SET or VIDEO_CONFIGURE_GET, the driver either writes or reads the contents of this structure.
If the VIDEO_CONFIGURE_QUERYSIZE flag is set, the driver just returns the size of the currently stored palette, including the palette entry array.
For more information on how drivers can handle palettes and color translation tables, see Setting Palettes.
User-mode video capture drivers using VCUser.lib can call VC_ConfigFormat when processing the DVM_PALETTE message.