// usbcamdi.h
PCAM_PROCESS_PACKET_ROUTINE PcamProcessPacketRoutine;
ULONG PcamProcessPacketRoutine(
PDEVICE_OBJECT BusDeviceObject,
PVOID DeviceContext,
PVOID CurrentFrameContext,
PUSBD_ISO_PACKET_DESCRIPTOR SyncPacket,
PVOID SyncBuffer,
PUSBD_ISO_PACKET_DESCRIPTOR DataPacket,
PVOID DataBuffer,
PBOOLEAN FrameComplete,
PBOOLEAN NextFrameIsStill
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
[CamProcessUSBPacket is not supported and may be altered or unavailable in the future. Instead, use CamProcessUSBPacketEx. ]
A camera minidriver's CamProcessUSBPacket callback function processes a USB packet.
BusDeviceObjectPointer to the camera minidriver's device object created by the USB hub.
DeviceContextPointer to the camera minidriver's device context.
CurrentFrameContextPointer to the minidriver's frame context.
SyncPacketPointer to a USBD_ISO_PACKET_DESCRIPTOR structure from the sync pipe. This value is NULL if the interface has only one pipe.
SyncBufferPointer to the data for the SyncPacket.
DataPacketPointer to a USBD_ISO_PACKET_DESCRIPTOR structure from the data pipe.
DataBufferPointer to DataPacket.
FrameCompletePointer to a BOOLEAN value that the camera minidriver sets to indicate whether this is the first data packet for a new video frame. Set to TRUE if this is the first data packet for a new video frame.
NextFrameIsStillPointer to a BOOLEAN value that the camera minidriver sets to indicate whether the next frame is a still frame or not. This value should be set to FALSE if the video stream is providing a live image or TRUE if the next frame is a still image or an image capture stream.
This callback function returns a ULONG that indicates the number of bytes that should be copied into the buffer (RawFrameBuffer or FrameBuffer).
Camera minidrivers that must maintain backward compatibility with the original USBCAMD must use the USBCAMD_DEVICE_DATA structure and its associated callback functions (that is, callback functions that do not contain the "Ex" suffix).
The minidriver should complete this function as quickly as possible. Image processing should be deferred to the CamProcessRawVideoFrame function.
This function is optional.