8bool GstreamerJsonFactory::publishPayloadImpl(
const std::vector<GIntegralPayload*>* payload) {
9 if (!is_building_frame) {
12 "publishPayloadImpl called without an active frame in GstreamerJsonFactory");
21 if (current_frame_has_header) current_frame <<
", ";
23 current_frame <<
"\"payload\": [";
25 bool wrote_first =
false;
26 for (
const auto* pl : *payload) {
29 if (wrote_first) current_frame <<
", ";
34 const auto vec = pl->getPayload();
36 for (
size_t i = 0; i < vec.size(); i++) {
37 current_frame << vec[i];
38 if (i + 1 < vec.size()) current_frame <<
", ";
45 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.