VC_SetImageSize

VOID
VC_SetImageSize(
PDEVICE_INFO
pDevInfo,
int
ImageSize
);

The VC_SetImageSize function specifies the maximum number of bytes needed to store an image using the current format.

Parameters

pDevInfo

Pointer to the DEVICE_INFO structure returned by VC_Init.

ImageSize

Maximum number of bytes needed to store an image.

Comments

A kernel-mode video capture driver should call VC_SetImageSize whenever a new data format is selected. The number specified for ImageSize should represent the largest number of bytes that an image can be, using the current format. In other words, the value should represent the smallest size that a buffer can be in order to store an entire capture frame, using the current format.

Code within VCKernel.lib uses the specified ImageSize value to determine if each buffer received with an IOCTL_VIDC_ADD_BUFFER control code is large enough to receive the frame buffer contents. Additionally, if the system's memory resources are too low to allow locking of client-specified buffers into the client's address space, VCKernel.lib allocates a system buffer of ImageSize size to receive the frame buffer contents, which are then copied into the client's buffers in smaller segments.

See Also

VC_StreamAddBuffer