The ICM_COMPRESS message is sent to a video compression driver to compress a frame of data into an application-supplied buffer.
Parameters
dwParam1
Specifies a pointer to an ICCOMPRESS data structure. The following members of ICCOMPRESS specify the compression parameters:
The lpbiInput member contains the format of the uncompressed data; the data itself is in a buffer pointed to by lpInput.
The lpbiOutput member contains a pointer to the output (compressed) format, and lpOutput contains a pointer to a buffer used for the compressed data.
The lpbiPrev member contains a pointer to the format of the previous frame, and lpPrev contains a pointer to a buffer used for the previous data. These members are used by drivers that do temporal compression.
The driver should use the biSizeImage member of the BITMAPINFOHEADER structure associated with lpbiOutput to return the size of the compressed frame.
The lpckid member points to a DWORD. If the pointer is not NULL, the driver should specify a two-character code for the chunk ID in the DWORD. The chunk ID should correspond to the chunk ID used in the AVI file.
The lpdwFlags member points to a DWORD. The driver should fill the DWORD with the flags that should go in the AVI index. In particular, if the returned frame is a key frame, your driver should set the AVIIF_KEYFRAME flag.
The dwFrameSize member contains the size into which the compressor should try to make the frame fit. The size value is used for compression methods that can make tradeoffs between compressed image size and image quality.
The dwQuality member contains the specific quality the compressor should use, if it supports quality.
dwParam2
Specifies the size of the ICCOMPRESS structure.
Return Value
Returns ICERR_OK if successful. Otherwise, returns an error number.