1 #include <visp3/core/vpIoTools.h>
2 #include <visp3/core/vpDisplay.h>
3 #include <visp3/io/vpImageIo.h>
5 #include "record_helper.h"
15 bool record_helper(
const std::string &opt_seqname,
int opt_record_mode,
18 static bool start_record =
false;
19 static std::string text_record_mode = std::string(
"Record mode: ") + (opt_record_mode ? std::string(
"single") : std::string(
"continuous"));
21 if (! opt_seqname.empty()) {
22 if (! opt_record_mode) {
39 if (! opt_seqname.empty()) {
44 if (! opt_seqname.empty()) {
46 start_record = !start_record;
57 static unsigned int counter = 1;
58 char filename[FILENAME_MAX];
59 sprintf(filename, opt_seqname.c_str(), counter);
62 static bool parent_exists =
false;
63 if (! parent_exists) {
65 if (! parent.empty()) {
75 std::string text = std::string(
"Save: ") + std::string(filename);
77 std::cout << text << std::endl;
79 if (opt_record_mode == 1) {