8bool GstreamerJsonFactory::publishPayloadImpl(
const std::vector<GIntegralPayload*>* payload) {
9 if (!is_building_frame) {
11 "publishPayloadImpl called without an active frame in GstreamerJsonFactory");
20 if (current_frame_has_header) current_frame <<
", ";
22 current_frame <<
"\"payload\": [";
24 bool wrote_first =
false;
25 for (
const auto* pl : *payload) {
28 if (wrote_first) current_frame <<
", ";
33 const auto vec = pl->getPayload();
35 for (
size_t i = 0; i < vec.size(); i++) {
36 current_frame << vec[i];
37 if (i + 1 < vec.size()) current_frame <<
", ";
44 current_frame_has_payload =
true;
std::shared_ptr< GLogger > log
Shared constants and error codes for the gstreamer module.
JSON streamer plugin declarations.
constexpr int ERR_PUBLISH_ERROR
Publish sequence encountered invalid state or invalid input data.