gstreamer
Loading...
Searching...
No Matches
publishPayload.cc
Go to the documentation of this file.
1// gstreamer
4
5// Implementation summary:
6// Serialize the frame payload as a simple list of payload rows.
7
8bool GstreamerTextFactory::publishPayloadImpl(const std::vector<GIntegralPayload*>* payload) {
9 if (!ofile.is_open()) {
10 log->error(gstreamer::ERR_CANTOPENOUTPUT, SFUNCTION_NAME, "Error: can't access ", filename());
11 }
12
13 ofile << guts::GTAB << "Payload {\n";
14
15 // Each GIntegralPayload contributes one line made of its packed integer values.
16 for (auto pload : *payload) {
17 for (auto pvar : pload->getPayload()) { ofile << guts::GTABTAB << pvar; }
18 ofile << "\n";
19 }
20 ofile << guts::GTAB << "}\n";
21
22 return true;
23}
std::shared_ptr< GLogger > log
ASCII streamer plugin declarations.
Shared constants and error codes for the gstreamer module.
constexpr int ERR_CANTOPENOUTPUT
Output medium could not be opened successfully.
constexpr char GTABTAB[]
constexpr char GTAB[]