Skip to content
Snippets Groups Projects
Commit 263fb61f authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

groupview: #ifdef HAVE_LIBARCHIVE

parent 0d0927f6
No related branches found
No related tags found
1 merge request!93Feature/Snapshot Video
Pipeline #12784 passed
...@@ -232,6 +232,7 @@ void modeVideo(ftl::Configurable *root) { ...@@ -232,6 +232,7 @@ void modeVideo(ftl::Configurable *root) {
vector<cv::Mat> rgb(sources.size()); vector<cv::Mat> rgb(sources.size());
vector<cv::Mat> depth(sources.size()); vector<cv::Mat> depth(sources.size());
#ifdef HAVE_LIBARCHIVE
char timestamp[18]; char timestamp[18];
std::time_t t=std::time(NULL); std::time_t t=std::time(NULL);
std::strftime(timestamp, sizeof(timestamp), "%F-%H%M%S", std::localtime(&t)); std::strftime(timestamp, sizeof(timestamp), "%F-%H%M%S", std::localtime(&t));
...@@ -240,6 +241,7 @@ void modeVideo(ftl::Configurable *root) { ...@@ -240,6 +241,7 @@ void modeVideo(ftl::Configurable *root) {
for (size_t i = 0; i < sources.size(); i++) { for (size_t i = 0; i < sources.size(); i++) {
writer.addSource(sources[i]->getURI(), sources[i]->parameters(), sources[i]->getPose()); writer.addSource(sources[i]->getURI(), sources[i]->parameters(), sources[i]->getPose());
} }
#endif // HAVE_LIBARCHIVE
bool save = false; bool save = false;
...@@ -250,11 +252,13 @@ void modeVideo(ftl::Configurable *root) { ...@@ -250,11 +252,13 @@ void modeVideo(ftl::Configurable *root) {
while(rgb[i].empty() || depth[i].empty()); while(rgb[i].empty() || depth[i].empty());
} }
#ifdef HAVE_LIBARCHIVE
if (save) { if (save) {
for (size_t i = 0; i < sources.size(); i++) { for (size_t i = 0; i < sources.size(); i++) {
writer.addRGBD(i, rgb[i], depth[i]); writer.addRGBD(i, rgb[i], depth[i]);
} }
} }
#endif // HAVE_LIBARCHIVE
stack(rgb, show); stack(rgb, show);
cv::namedWindow("Cameras", cv::WINDOW_KEEPRATIO | cv::WINDOW_NORMAL); cv::namedWindow("Cameras", cv::WINDOW_KEEPRATIO | cv::WINDOW_NORMAL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment