DVM_STREAM_INIT

The DVM_STREAM_INIT message requests a user-mode video capture driver to initialize a video channel for streaming.

Parameters

dwDriverID

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

hDriver

Driver handle.

uMsg

DVM_STREAM_INIT

lParam1

Pointer to a VIDEO_STREAM_INIT_PARMS structure.

lParam2

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

Typical stream initialization operations include requesting the kernel-mode driver to enable the hardware's data capture and overlay operations.

The VIDEO_STREAM_INIT_PARMS structure contains the client-specified capture frequency. It also contains callback information for use when notifying clients of events. For more information about notifying clients, see Notifying Clients from Video Capture Drivers.

After the driver finishes initializing the VIDEO_IN channel, it must send an MM_DRVM_OPEN callback message.

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

User-mode video capture drivers using VCUser.lib can call the following functions to initialize a stream, based on the specified channel.

Channel VCUser.lib Function
VIDEO_EXTERNALIN VC_Capture
VIDEO_IN VC_StreamInit
VIDEO_EXTERNALOUT VC_Overlay