8bool GstreamerCsvFactory::openConnection() {
10 if (ofile_true_info.is_open() && ofile_digitized.is_open()) {
14 if (!ofile_true_info.is_open()) {
15 ofile_true_info.clear();
16 ofile_true_info.open(filename_true_info(), std::ios::out | std::ios::trunc);
18 if (!ofile_true_info.is_open() || !ofile_true_info) {
22 log->
info(1, SFUNCTION_NAME,
"GstreamerCsvFactory: opened file " + filename_true_info());
25 if (!ofile_digitized.is_open()) {
26 ofile_digitized.clear();
27 ofile_digitized.open(filename_digitized(), std::ios::out | std::ios::trunc);
29 if (!ofile_digitized.is_open() || !ofile_digitized) {
33 log->
info(1, SFUNCTION_NAME,
"GstreamerCsvFactory: opened file " + filename_digitized());
39bool GstreamerCsvFactory::closeConnectionImpl() {
42 if (ofile_true_info.is_open()) ofile_true_info.close();
43 if (ofile_digitized.is_open()) ofile_digitized.close();
45 if (ofile_true_info.is_open()) {
48 if (ofile_digitized.is_open()) {
52 log->
info(1, SFUNCTION_NAME,
"GstreamerCsvFactory: closed file " + filename_true_info());
53 log->
info(1, SFUNCTION_NAME,
"GstreamerCsvFactory: closed file " + filename_digitized());
std::shared_ptr< GLogger > log
void info(int level, Args &&... args) const
void error(int exit_code, Args &&... args) const
CSV streamer plugin declarations.
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 successfully.