Capturing Video Data, Using VCKernel.lib

From a kernel-mode video capture driver’s viewpoint, all captured data is presented to the user-mode driver as a stream. If the user-mode driver requests only a single frame, it opens a stream and provides only a single buffer to receive frame contents. To support video capture streams, your driver must provide the following functions, which VCKernel.lib calls in response to requests from a user-mode driver:

StreamInitFunc 
Initializes a stream.
StreamStartFunc 
Starts recording frames.
StreamGetPositionFunc 
Returns the time since recording started.
StreamStopFunc 
Stops recording frames.
StreamFiniFunc 
Closes the stream.

Code in VCKernel.lib maintains a queue of buffers received from the user-mode driver, passes the address of the next available buffer to the driver’s CaptureService function each time it is called, and returns unused buffers to the user-mode driver when the user-mode driver resets the stream. (For more information about capture streams and user-mode drivers see Capturing Video Data, Using VCUser.lib.)

Your driver must also provide a CaptureFunc function, which enables and disables the hardware’s ability to capture frames.