The DVM_PALETTE message requests a user-mode video capture driver to store or return a logical palette.
Parameters
dwDriverID
Video channel identifier. One of VIDEO_EXTERNALIN, VIDEO_IN, VIDEO_OUT, VIDEO_EXTERNALOUT. (For details, see Opening Video Channels.) Typically, drivers only allow VIDEO_IN for this message.
hDriver
Driver handle.
uMsg
DVM_PALETTE
lParam1
Contains flags. The following flags are defined.
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. |
lParam2
Pointer to a VIDEOCONFIGPARMS structure. For the DVM_PALETTE message, the structure members are used as follows:
lpdwReturn
Pointer to a DWORD in which the driver returns the size, in bytes, of the currently stored palette, if the VIDEO_CONFIGURE_QUERYSIZE flag is set.
lpData1
Pointer to a client-supplied LOGPALETTE structure. (For more information about the LOGPALETTE structure, see the Win32 SDK.)
dwSize1
Size, in bytes, of the LOGPALETTE structure.
lpData2
Not used.
dwSize2
Not used.
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_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.
See Also