From: Lederhilger M. <M.L...@ds...> - 2012-09-28 09:31:07
|
Hello, I am a user of the PointCloudLibrary, which uses OpenNI to communicate with a Kinect like USB-device (point cloud capture device). I use Linux as an operating system. If I use the XnSensorServer then everything works, so my following question is more out of curiosity: If I do not use the XnSensorServer, then OpenNI's sensor driver uses 'libusb_open' and 'libusb_claim_interface' multiple times on the same device (for depth-, infrared- and RGB-imagegenerator). Each call to 'libusb_open' returns a different handle - so the first 'libusb_claim_interface' passes, but the second one fails with an error, that the device is already claimed because 'claimed_interfaces' (used to block the call to OS specific claim interface function, if the device has already been claimed by this function - see 'libusb_claim_interface') is stored in the handle's and not in the device's data structure. So my question is that if it is legal (from libusb's point of view) to open one device multiple times. If yes, then would not it be better to store 'claimed_interfaces' in the device instead of it's handle. Since I am new to this matter, maybe you can give me some insight on this. Thank you, Martin Lederhilger |