gstreamer
Loading...
Searching...
No Matches
publishPayload.cc
Go to the documentation of this file.
1// gstreamer
4
5// Non-Doxygen implementation file: behavior is documented in the header.
6bool GstreamerJSROFactory::publishPayloadImpl([[maybe_unused]] const std::vector<GIntegralPayload*>* payload) {
7 if (ofile == nullptr) { log->error(ERR_CANTOPENOUTPUT, "Error: can't open ", ofile); }
8
9 static constexpr int header_offset = sizeof(DataFrameHeader) / 4;
10 std::vector<unsigned int> payload_data(frame_data.size() - header_offset);
11 std::copy(frame_data.cbegin() + header_offset, frame_data.cend(), payload_data.begin());
12 ofile->write(reinterpret_cast<const char*>(payload_data.data()),
13 sizeof(unsigned int) * payload_data.size());
14
15 return true;
16}
std::shared_ptr< GLogger > log
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.
Packed frame header written at the beginning of each frame record.