DVM_STREAM_UNPREPAREHEADER

The DVM_STREAM_UNPREPAREHEADER message requests a user-mode video capture driver to remove the preparation from a data buffer.

Parameters

dwDriverID

Video channel identifier. For this message, the driver should only accept VIDEO_IN. (For details, see Opening Video Channels.)

hDriver

Driver handle.

uMsg

DVM_STREAM_UNPREPAREHEADER

lParam1

Pointer to a VIDEOHDR structure.

lParam2

Size of the VIDEOHDR structure.

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_STREAM_UNPREPAREHEADER message by calling the driver's DriverProc entry point, passing the specified parameter values. Applications can send this message by calling the videoStreamUnprepareHeader function, which is described in the Video for Windows Development Kit.

Use of this message is meant to remove the preparation that was performed by means of a DVM_STREAM_PREPAREHEADER message. If the driver returns DV_ERR_NOTSUPPORTED, then msvfw32.dll or avicap32.dll will remove the preparation. For most drivers, this behavior is sufficient. If the driver does remove buffer preparation, it should return DV_ERR_OK, which causes msvfw32.dll or avicap32.dll to clear the VHDR_PREPARED flag in the VIDEOHDR structure's dwFlags member.

If the driver receives a DVM_STREAM_UNPREPAREHEADER message for a buffer that has not been prepared, the driver should just return DV_ERR_OK.

For information about using data buffers with video capture streams, see Transferring streams of Captured Data.