-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libusb support for isochronous transfer on Windows composite device #1227
base: master
Are you sure you want to change the base?
Conversation
@@ -2581,7 +2590,10 @@ static int winusbx_claim_interface(int sub_api, struct libusb_device_handle *dev | |||
struct libusb_context *ctx = HANDLE_CTX(dev_handle); | |||
struct winusb_device_handle_priv *handle_priv = get_winusb_device_handle_priv(dev_handle); | |||
struct winusb_device_priv *priv = usbi_get_device_priv(dev_handle->dev); | |||
bool is_using_usbccgp = (priv->apib->id == USB_API_COMPOSITE); | |||
|
|||
//bool is_using_usbccgp = (priv->apib->id == USB_API_COMPOSITE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not leave commented out code. If this line is no longer needed then remove it entirely.
handle_priv->interface_handle[iface].dev_handle = handle_priv->interface_handle[0].dev_handle; | ||
{ | ||
HANDLE h_proc=NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit. spaces around =
{ | ||
HANDLE h_proc=NULL; | ||
HANDLE h_out = NULL; | ||
h_proc = GetCurrentProcess(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another nit. you just set this to NULL then set it to GetCurrentProcess(); please set this at the declaration.
I know nothing about the windows backend but this looks reasonable. Address the comments and I will see about merging this. |
@@ -1409,6 +1409,15 @@ static int set_composite_interface(struct libusb_context *ctx, struct libusb_dev | |||
priv->usb_interface[interface_number].path = dev_interface_path; | |||
priv->usb_interface[interface_number].apib = &usb_api_backend[api]; | |||
priv->usb_interface[interface_number].sub_api = sub_api; | |||
|
|||
{ | |||
int ii; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just "i" is the norm for such loop counters. "i" can also be thought of as a very short form of "interfaces".
The commit message needs to be fixed. |
bool is_using_usbccgp = (priv->apib->id == USB_API_COMPOSITE); | ||
|
||
//bool is_using_usbccgp = (priv->apib->id == USB_API_COMPOSITE); | ||
bool is_using_usbccgp = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value is checked on line 2610 but I don't see it possibly changed in between.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain in words what these changes are doing?
Please help to address the comments . Thanks. |
I succeed to work a UVC webcam on Windows.
But current version of libusb and libuvc do not work UVC .
The UVC Camera uses isochronous transfer and it is composite device.
Current libusb does not support isochronous transfer on Windows composite device.
So I fixed it.
And I tested two UVC devices. (isochronous transfer device and bulk transfer device)
libuvc on Windows #12
Windows Isochronous Transfer Issue with both libusbk and WinUSB libusb/libusb#1104
WinUSB ISO packet backend is broken in multiple ways libusb/libusb#909