Skip to content

Commit

Permalink
Merge pull request #21 from Telmate/PS-2221-FIX
Browse files Browse the repository at this point in the history
Testing Storage Set
  • Loading branch information
avis authored Jul 24, 2018
2 parents e19ed2f + 0773c6d commit 7a1ec19
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,20 @@ void TelmateFrameGrabberOpenCVImpl::queueHandler() {
std::to_string((long) this->framesCounter) + "_" + ptrVf->ts + image_extension;


if(this->storagePath.compare(this->prevStoragePath)) {
this->storagePathSubdir.clear();
GST_INFO("Storage path has changed. old storage path: %s. new storage path: %s",this->prevStoragePath.c_str(), this->storagePathSubdir.c_str());

}

if (this->storagePathSubdir.empty() || !this->storagePath.compare(this->prevStoragePath)) {
if (this->storagePathSubdir.empty()) {

GST_INFO("Storage path has changed. old storage path: %s. new storage path: %s",this->prevStoragePath.c_str(), this->storagePathSubdir.c_str());
this->prevStoragePath = this->storagePath;
this->storagePathSubdir = this->storagePath + "/frames_" + this->getCurrentTimestampString();
boost::filesystem::path dir(this->storagePathSubdir.c_str());
GST_INFO("going to create a directory in %s", this->storagePathSubdir.c_str());
if (!boost::filesystem::create_directories(dir)) {
GST_INFO("%s create_directories() failed for: %s", this->epName.c_str(),
GST_ERROR("%s create_directories() failed for: %s", this->epName.c_str(),
this->storagePathSubdir.c_str());
}

Expand Down

0 comments on commit 7a1ec19

Please sign in to comment.