mardi 26 avril 2016

Use libfreenects waitForNewFrame with timeout on Qt

I have a Qt application which controls 2 Kinects via libfreenect. To access the Kinects, I use one Qt-thread. All works perfectly so far. But I need the program to continue working when one Kinect is disconnected. But if so, the program get stuck in the waitForNewFrame call, even when I specify a timeout parameter. The documentation says, that 'this parameter is ignored if not built with C++11 threading support'.

What must be built with C++11 threading support? Libfreenect or my Qt App?

And how do I build with C++11 threading support?

The Qt App is built with qmake. I have a Global.pri where I can define compiler switches. Compiler is clang but gcc should work too.

Libfreenect is built in an automated build script. It git-clones a fork of libfreenect and executes:

cmake .
make
sudo make install

Aucun commentaire:

Enregistrer un commentaire