Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with blocking method waitForNewFrame() #56

Closed
kohrt opened this issue Sep 17, 2014 · 2 comments · Fixed by #57 or spanner3003/libfreenect2#2
Closed

Problem with blocking method waitForNewFrame() #56

kohrt opened this issue Sep 17, 2014 · 2 comments · Fixed by #57 or spanner3003/libfreenect2#2

Comments

@kohrt
Copy link
Contributor

kohrt commented Sep 17, 2014

The waitForNewFrame() is blocking until frames are received. but if for example no depth images are received this call becomes an endless loop. I think there are at least two solutions to this problem. First solution would be to add a timeout to the waitForNewFrame() method of the FrameListener, the other solution would be to add another method hasNewFrame() so that the calling process can use own waiting functionality.

@christiankerl
Copy link
Contributor

the problem is that tinythreadpp doesn't support timed waits. so we could only enable this, if the C++11 threading classes are used.

@kohrt
Copy link
Contributor Author

kohrt commented Sep 22, 2014

But adding a method that just checks if all frames are received should be possible, right?

christiankerl added a commit to christiankerl/libfreenect2 that referenced this issue Sep 28, 2014
 - implementation using pimpl - fixes OpenKinect#48
 - added non-blocking method to check if all frames are available - fixes OpenKinect#56
 - added timed wait function if compiled with c++0x or c++11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants