BOOLEAN
StreamInitFunc(
PDEVICE_INFO pDevInfo,
ULONG FrameRate
);
The StreamInitFunc function initializes a video capture stream. The function is provided by the kernel-mode driver, and the StreamInitFunc name is a placeholder for a driver-specified function name.
Parameters
pDevInfo
Pointer to the DEVICE_INFO structure returned by VC_Init.
FrameRate
Capture rate (microseconds per frame).
Return Value
Returns TRUE if the operation succeeds. Otherwise returns FALSE. If FALSE, VCKernel.lib sets the Win32 error code value to STATUS_DRIVER_INTERNAL_ERROR.
Comments
The VCKernel.lib library calls a kernel-mode driver’s StreamInitFunc function when the driver receives an IOCTL_VIDC_STREAM_INIT control code. User-mode drivers using VCUser.lib send this control code by calling VC_StreamInit. You can assume VCKernel.lib will not call the StreamInitFunc function if a stream has already been started.
The driver should store the frame rate so that it is accessible to the InterruptAcknowledge function. It might also verify that it has received a format selection. In deciding which operations to place in a driver’s StreamInitFunc function and which to place in its StreamStartFunc function, remember that StreamInitFunc is called once for each stream, which StreamStartFunc can be called multiple times.
Support for a StreamInitFunc function is required, if the device and driver support capture streams. If a driver does support the function, it must place its address in the VC_CALLBACK structure supplied by VCKernel.lib. If a driver that does not support a StreamInitFunc function receives an IOCTL_VIDC_STREAM_INIT control code, VCKernel.lib sets the Win32 error code value to STATUS_INVALID_DEVICE_REQUEST.