When the client application is ready to start compressing data, it sends the ICM_COMPRESS_BEGIN message. The client application uses dwParam1 to point to the format of the data being compressed, and uses dwParam2 to point to the format for the compressed data. If your driver cannot handle the formats, or if they are incorrect, your driver should return ICERR_BADFORMAT to fail the message.
Before the client application starts compressing data, it sends ICM_COMPRESS_GET_SIZE. For this message, the client application uses dwParam1 to point to the input format and uses dwParam2 to point to the output format. Your driver should return the worst-case size (in bytes) that it expects a compressed frame to occupy. The client application uses this size value when it allocates buffers for the compressed video frame.
Client applications might send the ICM_COMPRESS_FRAMES_INFO message to set the compression parameters. The dwParam1 parameter specifies a pointer to an ICCOMPRESSFRAMES structure. For this message, the GetData and PutData members are not used. The dwParam2 parameter specifies the size of the structure. A compressor can use this message to make decisions about the amount of space allocated for each frame while compressing.