gstreamer
Loading...
Searching...
No Matches
gstreamerJLABSROConnection.cc
Go to the documentation of this file.
1// gstreamer
4
5// Implementation summary:
6// Manage the lifetime of the binary output stream for the JLAB SRO backend.
7
9 ofile = new std::ofstream(filename());
10 if (!ofile->is_open()) {
11 log->error(ERR_CANTOPENOUTPUT, "GstreamerJSROFactory: could not open file " + filename());
12 }
13
14 log->info(0, "GstreamerJSROFactory: opened file " + filename());
15 return true;
16}
17
19 if (ofile->is_open()) { ofile->close(); }
20
21 if (ofile->is_open()) {
22 log->error(ERR_CANTOPENOUTPUT, "GstreamerJSROFactory: could not close file " + filename());
23 }
24
25 delete ofile;
26 ofile = nullptr;
27 return true;
28}
std::shared_ptr< GLogger > log
virtual bool closeConnectionImpl()
Plugin-specific close implementation hook.
Definition gstreamer.h:127
virtual bool openConnection()
Open the output medium used by this streamer.
Definition gstreamer.h:104
Shared constants and error codes for the gstreamer module.
#define ERR_CANTOPENOUTPUT
Output medium could not be opened successfully.
JLAB SRO binary frame streamer declarations.