63 FN_NOTICE(
"Device %p open during shutdown, closing...\n", ctx->
first);
74 struct timeval timeout;
87 FN_ERROR(
"USB camera marked dead, stopping streams\n");
93 FN_ERROR(
"USB audio marked dead, stopping streams\n");
116 while(attribute_list != NULL) {
117 to_free = attribute_list;
122 attribute_list = attribute_list->
next;
150 memset(pdev, 0,
sizeof(*pdev));
190 FN_ERROR(
"freenect_open_device_by_camera_serial: Couldn't enumerate serial numbers\n");
194 for(item = attrlist ; item != NULL; item = item->
next , index++) {
201 FN_ERROR(
"freenect_open_device_by_camera_serial: Couldn't find a device with serial %s\n", camera_serial);
216 FN_ERROR(
"fnusb_close_subdevices failed: %d\n", res);
223 while (cur && cur != dev) {
229 FN_ERROR(
"device %p not found in linked list for this context!\n", dev);
273 vsnprintf(msgbuf, 1024, fmt, ap);
277 ctx->
log_cb(ctx, level, msgbuf);
280 vfprintf(stderr, fmt, ap);
freenect_device_flags enabled_subdevices
FREENECTAPI void freenect_select_subdevices(freenect_context *ctx, freenect_device_flags subdevs)
FN_INTERNAL int fnusb_open_subdevices(freenect_device *dev, int index)
#define FREENECTAPI
If Win32, export all functions for DLL usage.
freenect_context * parent
unsigned char * fn_fw_k4w_ptr
FREENECTAPI int freenect_stop_audio(freenect_device *dev)
FREENECTAPI int freenect_num_devices(freenect_context *ctx)
int freenect_stop_video(freenect_device *dev)
FN_INTERNAL void fn_log(freenect_context *ctx, freenect_loglevel level, const char *fmt,...)
unsigned int fn_fw_k4w_size
void freenect_usb_context
const char * camera_serial
FREENECTAPI void freenect_set_log_level(freenect_context *ctx, freenect_loglevel level)
FREENECTAPI int freenect_process_events(freenect_context *ctx)
FREENECTAPI int freenect_process_events_timeout(freenect_context *ctx, struct timeval *timeout)
freenect_loglevel
Enumeration of message logging levels.
FREENECTAPI int freenect_init(freenect_context **ctx, freenect_usb_context *usb_ctx)
libusb_device_handle * dev
FN_INTERNAL int fnusb_close_subdevices(freenect_device *dev)
FREENECTAPI int freenect_shutdown(freenect_context *ctx)
FREENECTAPI int freenect_open_device_by_camera_serial(freenect_context *ctx, freenect_device **dev, const char *camera_serial)
FREENECTAPI freenect_device_flags freenect_enabled_subdevices(freenect_context *ctx)
unsigned char * fn_fw_nui_ptr
FREENECTAPI void freenect_set_fw_address_k4w(freenect_context *ctx, unsigned char *fw_ptr, unsigned int num_bytes)
FREENECTAPI int freenect_list_device_attributes(freenect_context *ctx, struct freenect_device_attributes **attribute_list)
FN_INTERNAL int fnusb_list_device_attributes(fnusb_ctx *ctx, struct freenect_device_attributes **attribute_list)
FREENECTAPI void * freenect_get_user(freenect_device *dev)
struct freenect_device_attributes * next
void(* freenect_log_cb)(freenect_context *dev, freenect_loglevel level, const char *msg)
Typedef for logging callback functions.
FREENECTAPI void freenect_set_fw_address_nui(freenect_context *ctx, unsigned char *fw_ptr, unsigned int num_bytes)
FN_INTERNAL int fnusb_shutdown(fnusb_ctx *ctx)
FREENECTAPI void freenect_free_device_attributes(struct freenect_device_attributes *attribute_list)
static freenect_context * ctx
FREENECTAPI int freenect_open_device(freenect_context *ctx, freenect_device **dev, int index)
FN_INTERNAL int fnusb_process_events_timeout(fnusb_ctx *ctx, struct timeval *timeout)
unsigned int fn_fw_nui_size
freenect_loglevel log_level
FREENECTAPI int freenect_supported_subdevices(void)
FN_INTERNAL int freenect_camera_teardown(freenect_device *dev)
int freenect_stop_depth(freenect_device *dev)
FREENECTAPI void freenect_set_user(freenect_device *dev, void *user)
FREENECTAPI void freenect_set_log_callback(freenect_context *ctx, freenect_log_cb cb)
FN_INTERNAL int fnusb_init(fnusb_ctx *ctx, freenect_usb_context *usb_ctx)
FN_INTERNAL int fnusb_num_devices(fnusb_ctx *ctx)
FN_INTERNAL int freenect_camera_init(freenect_device *dev)
FREENECTAPI int freenect_close_device(freenect_device *dev)