| 672 | } |
| 673 | |
| 674 | bool Freenect2DeviceImpl::isSameUsbDevice(libusb_device* other) |
| 675 | { |
| 676 | bool result = false; |
| 677 | |
| 678 | if(state_ != Closed && usb_device_ != 0) |
| 679 | { |
| 680 | unsigned char bus = libusb_get_bus_number(usb_device_); |
| 681 | unsigned char address = libusb_get_device_address(usb_device_); |
| 682 | |
| 683 | unsigned char other_bus = libusb_get_bus_number(other); |
| 684 | unsigned char other_address = libusb_get_device_address(other); |
| 685 | |
| 686 | result = (bus == other_bus) && (address == other_address); |
| 687 | } |
| 688 | |
| 689 | return result; |
| 690 | } |
| 691 | |
| 692 | std::string Freenect2DeviceImpl::getSerialNumber() |
| 693 | { |