// usbcamdi.h
PCAM_PROCESS_RAW_FRAME_ROUTINE_EX PcamProcessRawFrameRoutineEx;
NTSTATUS PcamProcessRawFrameRoutineEx(
PDEVICE_OBJECT BusDeviceObject,
PVOID DeviceContext,
PVOID FrameContext,
PVOID FrameBuffer,
ULONG FrameLength,
PVOID RawFrameBuffer,
ULONG RawFrameLength,
ULONG NumberOfPackets,
PULONG BytesReturned,
ULONG ActualRawFrameLength,
ULONG StreamNumber
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
A camera minidriver's CamProcessRawVideoFrameEx callback function decodes a raw video frame.
BusDeviceObjectPointer to the camera minidriver's device object created by the USB hub.
DeviceContextPointer to the camera minidriver's device context.
FrameContextPointer to the minidriver's frame context.
FrameBufferPointer to the buffer that receives the final processed video frame. See the Remarks section for more information about how USBCAMD uses this parameter.
FrameLengthSpecifies the length of the frame buffer (from the original read request) in bytes.
RawFrameBufferPointer to the buffer containing the received USB packets. See the Remarks section for more information about how USBCAMD uses this parameter.
RawFrameLengthSpecifies the length of RawFrameBuffer in bytes.
NumberOfPacketsSpecifies the number of USB packets received into RawFrameBuffer.
BytesReturnedPointer to the number of bytes transferred. The minidriver must set this to zero if it encounters any errors during processing, as described in Data Flow Using Isochronous Pipes. See the Remarks section for more information about how USBCAMD uses this parameter.
ActualRawFrameLengthContains the length of the actual buffer received from the camera. This value is specified in bytes.
StreamNumberIndicates the stream number with which this frame is associated with.
CamProcessRawVideoFrameEx returns STATUS_SUCCESS or an appropriate error code.
Before USBCAMD calls the minidriver's CamProcessRawVideoFrameEx callback, it sets the first DWORD in the buffer pointed to by the FrameBuffer parameter to the value 0xdeadbeef. After calling the minidriver's CamProcessRawVideoFrameEx callback USBCAMD checks the first DWORD in the buffer pointed to by the FrameBuffer parameter for the value 0xdeadbeef to determine if CamProcessRawVideoFrameEx successfully copied the video frame from the buffer pointed to by the RawFrameBuffer parameter into the buffer pointed to by the FrameBuffer parameter.
This function is not called if either one of the following bits are set in the CamControlFlag argument passed to the USBCAMD_InitializeNewInterface function:
USBCAMD_CamControlFlag_NoVideoRawProcessing
USBCAMD_CamControlFlag_NoStillRawProcessing
USBCAMD clears the stream header options flag before passing the raw frame to the minidriver. The default flag is key frames only. The camera minidriver should set the stream header option flags appropriately if it needs to indicate anything other than key frames.
The original USBCAMD does not call CamProcessRawVideoFrameEx.
This function is optional.