updated dataRecorder app to use all drivers, fixed OpenNI2 intermittent deadlock on end of *.oni reading

This commit is contained in:
matlabbe
2015-04-23 11:08:50 -04:00
parent c1e15c0f2f
commit 39dce825d6
3 changed files with 103 additions and 51 deletions

View File

@@ -719,7 +719,7 @@ void CameraOpenNI2::captureImage(cv::Mat & rgb, cv::Mat & depth, float & fx, flo
{
openni::VideoStream* depthStream[] = {_depth};
openni::VideoStream* colorStream[] = {_color};
if(openni::OpenNI::waitForAnyStream(depthStream, 1, &readyStream, 2000) != openni::STATUS_OK &&
if(openni::OpenNI::waitForAnyStream(depthStream, 1, &readyStream, 2000) != openni::STATUS_OK ||
openni::OpenNI::waitForAnyStream(colorStream, 1, &readyStream, 2000) != openni::STATUS_OK)
{
UWARN("No frames received since the last 2 seconds, end of stream is reached!");