pupil-labs / libuvc

a cross-platform library for USB video devices
https://int80k.com/libuvc/
Other
52 stars 30 forks source link

Using usbdk on Windows #43

Closed PeterPeterPan closed 2 years ago

PeterPeterPan commented 4 years ago

Hi all, Dose this fork support Usbdk? I mean, when I modify the func uvc_init() in init.c (Reference from the libusb wiki)

libusb_init(&ctx->usb_ctx);
libusb_set_option(ctx->usb_ctx, LIBUSB_OPTION_USE_USBDK);

Then operate UsbDk_1.0.22_x64.msi Finally run the code.

I got the log:

"uvc: device has a status interrupt endpoint, but unable to read from it"

- The reason I want to use Usbdk is, when I use the WinUSB, I can set command but can't open stream, when I use the libusbK, I can set command and show stream but some device unplugging will cause my Windows blue-screen.

Any idea? thanks.

papr commented 4 years ago

Hey @PeterPeterPan We do not officially support Usbdk, i.e. we won't be able to help you with this part.

Was your unplugging issue solved with #44 ?

PeterPeterPan commented 4 years ago

Hi @papr thank for your reply! I haven't found a solution for the issue unplugging cause blue-screen.

44 just for video streaming hang or crash as uvc_stop_streaming( ) called.

papr commented 4 years ago

@PeterPeterPan Which camera are you using. I am not aware of such an issue with any of the official Pupil Labs cameras.

PeterPeterPan commented 4 years ago

@papr I have tried three cameras

  1. BisonCam, NB Pro
  2. AVerVision M15W
  3. Live Streamer CAM 313

After uvc_open( ), then pull out the device. Only 2. will cause blue-screen, so I really don't know it's cause by libusb, libusbK or some specific devices.

note: Blue screen of death( MULTIPLE_IRP_COMPLETE_REQUESTS ).

PeterPeterPan commented 4 years ago

@papr I remove some process designed by myself, the blue-screen didn't appear anymore. 😨

But why only camera 2. cause blue-screen and how to use usbdk? Still unknow.

mcuee commented 2 years ago

Please give libusb-1.0.26 a try, either with libusbk or WinUSB.

Latest build of https://github.com/pupil-labs/libuvc git head with libusb-1.0.26 (dynamic link) and pthreads-w32-2-9-1-release, using VS2019 (both 32bit and 64bit). pupil_labs_libuvc.zip

PeterPeterPan commented 2 years ago

Thanks for the solutions you provided! Although I don't currently have a project using libuvc. The original problem was also due to the wrong process I designed.

Close this issue.