C++ wrapper: ignore LIBUSB_ERROR_INTERRUPTED from freenect_process_events()

I kept getting errors about "Cannot process freenect events" when trying to
start cppview although glview worked perfectly. It turns out libusb kept
returning error "interrupted" when starting up, this patch ignores all
such errors from libusb.
I do not know libusb well enough to be able to tell whether this workaround
will cause any problems in special cases.
cppview seems to be working, but crashes when pressing ESC or closing the
window with the error "pure virtual method called". I'm still investigating
that error but I do not think it is related to this patch.

Signed-off-by: Joakim Gebart <joakim.gebart@jge.se>
Make fakenect work on Windows.

We needed platform-specific functions for mkdir(), timers, and we need to open
files in binary mode for compatibility.

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
examples: call freenect_shutdown() on exit

This is mostly useful when using tools like valgrind, which may report
possibly lost memory even if the operating systems is going to get it
back anyway on the actual process exit.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
freenect: avoid leaking the context when fnusb_init() fails

Maybe this is more a theoretical issue than an actual one, I am not sure
in which case fnusb_init() —and hence libusb_init()— is supposed to
fail, but let's handle that once I noticed it.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
freenect: initialize the 'transferred' variable used in bulk transfers

This is in order to make the printouts in the error path of the callers
of fnusb_bulk() show a saner value when libusb does not touch the
variable (i.e. when a transfer fails).

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Search for threading lib on any platform in c_sync

Threading library is necessary for all platform when compiling c_sync
wrapper. Moving the search fix the missing library on Linux.

Signed-off-by: Nicolas Bourdaud <nicolas.bourdaud@gmail.com>
Add missing math lib to fakenect

Fix the missing dependency of fakenect on the math lib and remove the
unecessary one of record. On the way centralizes definition of MATH_LIB
since several wrappers and examples uses it.

Signed-off-by: Nicolas Bourdaud <nicolas.bourdaud@gmail.com>
windows: libusb-win32 renamed their header; change the include accordingly

In libusb-win32 1.2.5.0, the developers changed their header from usb.h to
lusb0_usb.h to avoid a name conflict with the WDK usb.h header, which
apparently causes issues with MinGW-w64.

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
freenect.pyx: add FREENECT_DEPTH_{MM,REGISTERED} support

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
audio firmware loader: use the structure of the firmware image format to specify size/addresses

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
wavrecord.c: initialize sample count to 0

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
examples: GLUT_INCLUDE_DIRS -> GLUT_INCLUDE_DIR

We had misspelled the environment variable in CMakeLists.txt.  Reported by
Ski-lleR on github.

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
Added missing dependencies

- libtool
- automake
Merge pull request #291 from citelao/patch-1

Added missing dependencies to Brew formulae
Adding to C++ wrapper a method to access the underlying freenect_device
Signed-off-by: Joseph J Dillon <joe.robotics@hotmail.com> josephd
FrameMode now implements getFieldOrder() to be compatible with new versions of jna.
Signed-off-by: John Scheible johnscheible@gmail.com
handle error case on USB 3.0: control transfer may return 512 bytes

Signed-off-by: Florian Echtler <floe@butterbrot.org>
Removed libusb patch already merged upstream

Signed-off-by: Benn Snyder <benn.snyder@gmail.com>
Removed unused stdbool.h
Replaced all include guards with '#pragma once' - fixes #296

Signed-off-by: Benn Snyder <benn.snyder@gmail.com>
Added Kinect for Windows udev rules

Signed-off-by: Benn Snyder <benn.snyder@gmail.com>