The DVM_STREAM_FREEBUFFER message requests a user-mode video capture driver to free a buffer that was allocated in response to a DVM_STREAM_ALLOCBUFFER message.
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_STREAM_FREEBUFFER message by calling the driver’s DriverProc entry point, passing the specified parameter values. Applications can send this message by calling the videoMessage function, which is described in the Video for Windows Development Kit.
If the hardware provides on-board memory that can be used as buffer space to receive captured video data, the driver can support the DVM_STREAM_ALLOCBUFFER and DVM_STREAM_FREEBUFFER messages. The DVM_STREAM_FREEBUFFER message is used to deallocate buffer space that was allocated in response to DVM_STREAM_ALLOCBUFFER. If the hardware does not provide on-board memory, the driver should return DVM_ERR_NOTUSUPPORTED.
Note: The video capture driver libraries, VCUser.lib and VCKernel.lib, do not support this message. Therefore, the sample video capture drivers do not support the message either.