PCAM_ALLOCATE_BW_ROUTINE callback function (usbcamdi.h)
[CamAllocateBandwidth is not supported and may be altered or unavailable in the future. Instead, use CamAllocateBandwidthEx. ]
A camera minidriver's CamAllocateBandwidth callback function selects the appropriate alternate setting within the USB video streaming interface and prepares the device to stream.
Syntax
PCAM_ALLOCATE_BW_ROUTINE PcamAllocateBwRoutine;
NTSTATUS PcamAllocateBwRoutine(
PDEVICE_OBJECT BusDeviceObject,
PVOID DeviceContext,
PULONG RawFrameLength,
PVOID Format
)
{...}
Parameters
BusDeviceObject
Pointer to the camera minidriver's device object created by the USB hub.
DeviceContext
Pointer to the camera minidriver's device context.
RawFrameLength
Specifies the size, of the raw frame data from the packet stream, in bytes.
Format
Pointer to a KS_DATAFORMAT_VIDEOINFOHEADER structure that is associated with this stream.
Return value
CamAllocateBandwidth returns STATUS_SUCCESS or an appropriate error code.
Remarks
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).
USBCAMD calls the camera minidriver's CamAllocateBandwidth callback function immediately before the isochronous video capture stream is started. It is called in connection with a Run command.
Typically, this function calls the USBCAMD_SelectAlternateInterface service to select the correct alternate interface and prepare for streaming video.
This function is required.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | usbcamdi.h (include Usbcamdi.h) |