OpenKinect/libfreenect2 — pull request #34 by rjw57 (2014-08-04 09:43:12+00:00)
Title: Workaround for libusb_reset_device behaviour

On my VIA controller (yes... I know) libusb_reset_device returns LIBUSB_ERROR_NOT_FOUND. According to [the documentation](http://libusb.sourceforge.net/api-1.0/group__dev.html#ga7321bd8dc28e9a20b411bf18e6d0e9aa) this is a possible return value from libusb_reset_device which should be handled be re=enumaring and re-opening the device.

This PR has two commits: the first simply re-factors the logic in Freenect2::openDevice to make modification a little easier and the second implements the logic to handle LIBUSB_ERROR_NOT_FOUND.

I have added the optional reset logic as a protected method on Freenect2 since I believe it may want to become user-visible in the long run but if this logic should be hidden inside Freenect2Impl then I can refactor.