gstreamer
Loading...
Searching...
No Matches
stream.cc
Go to the documentation of this file.
1// gstreamer
4
5// Implementation summary:
6// Write frame-level opening and closing delimiters for the ASCII backend.
7
8bool GstreamerTextFactory::startStreamImpl([[maybe_unused]] const GFrameDataCollection* frameRunData) {
9 if (!ofile.is_open()) { log->error(ERR_CANTOPENOUTPUT, "Error: can't open ", filename()); }
10
11 // Start one human-readable frame block.
12 ofile << "Frame {" << std::endl;
13
14 return true;
15}
16
17
18bool GstreamerTextFactory::endStreamImpl([[maybe_unused]] const GFrameDataCollection* frameRunData) {
19 if (!ofile) { log->error(ERR_CANTOPENOUTPUT, "Error: can't open ", filename()); }
20
21 // Close the frame block opened in startStreamImpl().
22 ofile << "}" << std::endl;
23
24 return true;
25}
std::shared_ptr< GLogger > log
void error(int exit_code, Args &&... args) const
ASCII streamer plugin declarations.
Shared constants and error codes for the gstreamer module.
#define ERR_CANTOPENOUTPUT
Output medium could not be opened successfully.