1 #ifndef FREENECT_DRIVER_K8EEAIBB 2 #define FREENECT_DRIVER_K8EEAIBB 4 #include <libfreenect.h> 29 freenect_device_attributes* attr_list;
30 freenect_device_attributes* item;
31 freenect_list_device_attributes(
driver_, &attr_list);
32 for (item = attr_list; item != NULL; item = item->next) {
35 freenect_free_device_attributes(attr_list);
43 unsigned getBus(
unsigned device_idx) {
71 throw std::runtime_error(
"libfreenect: device idx out of range");
87 throw std::runtime_error(
"[ERROR] libfreenect does not support searching for device by bus/address");
95 if (freenect_process_events_timeout(
driver_, &t) < 0)
96 throw std::runtime_error(
"freenect_process_events error");
103 freenect_set_log_level(
driver_, FREENECT_LOG_SPEW);
109 freenect_set_log_level(
driver_, FREENECT_LOG_FATAL);
110 freenect_select_subdevices(
driver_, (freenect_device_flags)(FREENECT_DEVICE_CAMERA));
unsigned getAddress(unsigned device_idx)
static FreenectDriver & getInstance()
boost::shared_ptr< FreenectDevice > getDeviceByIndex(unsigned device_idx)
static const std::string VENDOR_NAME
boost::shared_ptr< FreenectDevice > device_
boost::shared_ptr< FreenectDevice > getDeviceByAddress(unsigned bus, unsigned address)
static const unsigned VENDOR_ID
unsigned getBus(unsigned device_idx)
unsigned getVendorID(unsigned device_idx)
unsigned getProductID(unsigned device_idx)
std::vector< std::string > device_serials_
boost::shared_ptr< FreenectDevice > getDeviceBySerialNumber(std::string serial)
const char * getSerialNumber(unsigned device_idx)
const char * getVendorName(unsigned device_idx)
const char * getProductName(unsigned device_idx)
freenect_context * driver_
boost::shared_ptr< boost::thread > freenect_thread_
static const std::string PRODUCT_NAME
unsigned getNumberDevices()
static const unsigned PRODUCT_ID