gstreamer
Loading...
Searching...
No Matches
gstreamerJLABSROConnection.cc
Go to the documentation of this file.
1// gstreamer
4
5// Non-Doxygen implementation file: behavior is documented in the header.
6
7bool GstreamerJSROFactory::openConnection() {
8 ofile = new std::ofstream(filename());
9 if (!ofile->is_open()) {
10 log->error(ERR_CANTOPENOUTPUT, "GstreamerJSROFactory: could not open file " + filename());
11 }
12
13 log->info(0, "GstreamerJSROFactory: opened file " + filename());
14 return true;
15}
16
17bool GstreamerJSROFactory::closeConnectionImpl() {
18 if (ofile->is_open()) { ofile->close(); }
19
20 if (ofile->is_open()) {
21 log->error(ERR_CANTOPENOUTPUT, "GstreamerJSROFactory: could not close file " + filename());
22 }
23
24 delete ofile;
25 return true;
26}
std::shared_ptr< GLogger > log
void info(int level, Args &&... args) const
void error(int exit_code, Args &&... args) const
Shared constants and error codes for the gstreamer module.
#define ERR_CANTOPENOUTPUT
Output medium could not be opened (file/device not accessible).
JLAB SRO frame streamer plugin definitions.