5bool GstreamerJsonFactory::publishPayloadImpl(
const std::vector<GIntegralPayload*>* payload) {
6 if (!is_building_frame) {
16 if (current_frame_has_header) current_frame <<
", ";
18 current_frame <<
"\"payload\": [";
20 bool wrote_first =
false;
21 for (
const auto* pl : *payload) {
24 if (wrote_first) current_frame <<
", ";
29 const auto vec = pl->getPayload();
31 for (
size_t i = 0; i < vec.size(); i++) {
32 current_frame << vec[i];
33 if (i + 1 < vec.size()) current_frame <<
", ";
40 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
Generic publish-time error (null pointers, invalid state).