InterruptAcknowledge

BOOLEAN
InterruptAcknowledge(
    PDEVICE_INFO
pDevInfo
    );

The InterruptAcknowledge function is a kernel-mode video capture driver’s interrupt service routine (ISR), used to acknowledge a device interrupt. The function is driver-defined, and the InterruptAcknowledge name is a placeholder for a driver-specified function name.

Parameters
pDevInfo
Pointer to the DEVICE_INFO structure returned by VC_Init.
Return Value

Returns TRUE if a frame is available and it is time to capture another frame. Otherwise returns FALSE. (See the following Comments section.)

Comments

The VCKernel.lib library provides a generic ISR that is called each time a device interrupt occurs on the interrupt number that the driver passed to VC_ConnectInterrupt. This generic ISR calls the driver’s InterruptAcknowledge function.

Typically the InterruptAcknowledge function re-enables the device interrupt, if a capture stream operation is in progress.

The function is responsible for determining if it is time to capture a frame. It should compare the time since the last frame was captured to the client-specified time between frames. (The driver receives the client-specified time between frames as input to its StreamInitFunc function.)

If it is now time to capture a frame, and if a full frame is available, the function must return TRUE. Returning TRUE causes the generic ISR to call IoRequestDPC, which schedules the driver’s CaptureService (DPC) function, which in turn is responsible for capturing the frame.

Like all device ISRs under Windows NT, the driver’s InterruptAcknowledge function executes at the device’s IRQL and should be written to execute as quickly as possible. You should place data transfer operations in the driver’s CaptureService function. The InterruptAcknowledge function should record the frame’s time stamp.

If other code within the kernel-mode driver references the same objects that the InterruptAcknowledge function references, the driver must use VC_SynchronizeExecution to synchronize access to the objects.

Support for an InterruptAcknowledge function is required. The driver must place the address of its InterruptAcknowledge function in the VC_CALLBACK structure supplied by VCKernel.lib.

For more information about interrupt service routines (ISRs) and deferred procedure calls (DPC’s) see the Kernel Mode Drivers Design Guide.