8bool GstreamerJsonFactory::publishPayloadImpl(
const std::vector<GIntegralPayload*>* payload) {
9 if (!is_building_frame) {
19 if (current_frame_has_header) current_frame <<
", ";
21 current_frame <<
"\"payload\": [";
23 bool wrote_first =
false;
24 for (
const auto* pl : *payload) {
27 if (wrote_first) current_frame <<
", ";
32 const auto vec = pl->getPayload();
34 for (
size_t i = 0; i < vec.size(); i++) {
35 current_frame << vec[i];
36 if (i + 1 < vec.size()) current_frame <<
", ";
43 current_frame_has_payload =
true;
std::shared_ptr< GLogger > log
void error(int exit_code, Args &&... args) const
Shared constants and error codes for the gstreamer module.
#define ERR_PUBLISH_ERROR
Publish sequence encountered invalid state or invalid input data.
JSON streamer plugin declarations.