From e1b337c4a5655a7a0a46a5e2a351cd8fccea1f29 Mon Sep 17 00:00:00 2001 From: Avi Saranga Date: Mon, 23 Jul 2018 16:54:34 -0700 Subject: [PATCH] fix storage path --- .../objects/TelmateFrameGrabberOpenCVImpl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/src/server/implementation/objects/TelmateFrameGrabberOpenCVImpl.cpp b/module/src/server/implementation/objects/TelmateFrameGrabberOpenCVImpl.cpp index 3a4cdff..6e38e3c 100644 --- a/module/src/server/implementation/objects/TelmateFrameGrabberOpenCVImpl.cpp +++ b/module/src/server/implementation/objects/TelmateFrameGrabberOpenCVImpl.cpp @@ -22,7 +22,7 @@ TelmateFrameGrabberOpenCVImpl::TelmateFrameGrabberOpenCVImpl() { this->thrLoop = true; this->snapInterval = 1000; this->epName = "EP_NAME_UNINITIALIZED"; - this->storagePath = "/tmp"; + this->storagePath.clear(); //= NULL; /*"/tmp";*/ this->framesCounter = 0; this->outputFormat = FGFMT_JPEG; this->lastQueueTimeStamp = 0; @@ -103,6 +103,10 @@ void TelmateFrameGrabberOpenCVImpl::queueHandler() { while (this->thrLoop) { + if(this->storagePath.empty()) { + boost::this_thread::sleep_for(boost::chrono::milliseconds(50)); + continue; + } this->frameQueue->pop(ptrVf); // blocks params.clear(); // clear the vector since the last iteration. this->lastQueueTimeStamp = this->getCurrentTimestampLong();