// usbcamdi.h
PCAM_PROCESS_PACKET_ROUTINE_EX PcamProcessPacketRoutineEx;
ULONG PcamProcessPacketRoutineEx(
PDEVICE_OBJECT BusDeviceObject,
PVOID DeviceContext,
PVOID CurrentFrameContext,
PUSBD_ISO_PACKET_DESCRIPTOR SyncPacket,
PVOID SyncBuffer,
PUSBD_ISO_PACKET_DESCRIPTOR DataPacket,
PVOID DataBuffer,
PBOOLEAN FrameComplete,
PULONG PacketFlag,
PULONG ValidDataOffset
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
A camera minidriver's CamProcessUSBPacketEx 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 camera 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.
DataPacketSpecifies the isochronous packet descriptor from 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.
PacketFlagPointer to a value that the minidriver sets to indicate the contents of the current frame. It should be set to one of the following values:
| Flag | Meaning |
|---|---|
| USBCAMD_PROCESSPACKETEX_DropFrame | The current frame is unsalvageable. The read IRP should be recycled. |
| USBCAMD_PROCESSPACKETEX_NextFrameIsStill | The frame is a still image. |
| USBCAMD_PROCESSPACKETEX_CurrentFrameIsStill | The current frame is for the still pin. |
ValidDataOffsetPointer to a ULONG value that indicates an offset from the beginning of the packet. USBCAMD should start the copy from this offset. This eliminates the extra buffer copy in the case of an in-band signal. If the camera is not using in-band signaling, ValidDataOffset should be set to zero.
This function returns the number of bytes that should be copied.
The minidriver should complete its CamProcessUSBPacketEx function as quickly as possible. Image processing should be deferred to the CamProcessRawVideoFrameEx function.
This callback function is used with isochronous pipes only (video or still streaming).
The original USBCAMD does not call CamProcessUSBPacketEx.
This function is optional.