7bool GstreamerCsvFactory::openConnection() {
9 if (ofile_true_info.is_open() && ofile_true_info.is_open()) {
14 if (!ofile_true_info.is_open()) {
15 ofile_true_info.clear();
19 ofile_true_info.open(filename_true_info(), std::ios::out | std::ios::trunc);
21 if (!ofile_true_info.is_open() || !ofile_true_info) {
25 log->
info(0,
"GstreamerCsvFactory: opened file " + filename_true_info());
28 if (!ofile_digitized.is_open()) {
29 ofile_digitized.clear();
33 ofile_digitized.open(filename_digitized(), std::ios::out | std::ios::trunc);
35 if (!ofile_digitized.is_open() || !ofile_true_info) {
39 log->
info(0,
"GstreamerCsvFactory: opened file " + filename_digitized());
46bool GstreamerCsvFactory::closeConnectionImpl() {
50 if (ofile_true_info.is_open()) ofile_true_info.close();
51 if (ofile_digitized.is_open()) ofile_digitized.close();
53 if (ofile_true_info.is_open()) {
56 if (ofile_digitized.is_open()) {
std::shared_ptr< GLogger > log
void info(int level, Args &&... args) const
void error(int exit_code, Args &&... args) const
void flushEventBuffer()
Flush the internal event buffer, writing all buffered events to the output medium.
Shared constants and error codes for the gstreamer module.
#define ERR_CANTCLOSEOUTPUT
Output medium could not be closed cleanly.
#define ERR_CANTOPENOUTPUT
Output medium could not be opened (file/device not accessible).