DVM_STREAM_RESET

The DVM_STREAM_RESET message requests a user-mode video capture driver to stop input of a capture stream, return all buffers to the client, and set the current position to zero.

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_RESET

lParam1

Not used.

lParam2

Not used.

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

When a driver receives DVM_STREAM_RESET, it should restore the state that it established in response to a DVM_STREAM_INIT message. For each unused buffer that was received with a DVM_STREAM_ADDBUFFER message, the driver must set VHDR_DONE in the dwFlags member of the buffer's VIDEOHDR structure and then send an MM_DRVM_DATA callback message.

After a client sends DVM_STREAM_RESET, you should expect it to send either a DVM_STREAM_START message to restart the stream or a DVM_STREAM_FINI message to terminate the stream.

For more information about video capture streams, see Transferring streams of Captured Data.

User-mode video capture drivers using VCUser.lib can call VC_StreamReset when processing the DVM_STREAM_RESET message.