We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 64de67c + 238c448 commit cd77553Copy full SHA for cd77553
examples/Protonect.cpp
@@ -330,7 +330,11 @@ int main(int argc, char *argv[])
330
/// [loop start]
331
while(!protonect_shutdown && (framemax == (size_t)-1 || framecount < framemax))
332
{
333
- listener.waitForNewFrame(frames);
+ if (!listener.waitForNewFrame(frames, 10*1000)) // 10 sconds
334
+ {
335
+ std::cout << "timeout!" << std::endl;
336
+ return -1;
337
+ }
338
libfreenect2::Frame *rgb = frames[libfreenect2::Frame::Color];
339
libfreenect2::Frame *ir = frames[libfreenect2::Frame::Ir];
340
libfreenect2::Frame *depth = frames[libfreenect2::Frame::Depth];
0 commit comments