9 if (!ofile.is_open()) {
18 ensureFileInitializedForType(
"stream");
21 is_building_frame =
true;
22 current_frame.str(std::string());
23 current_frame.clear();
24 current_frame_has_header =
false;
25 current_frame_has_payload =
false;
32 if (!is_building_frame) {
35 "endStreamImpl called without an active frame in GstreamerJsonFactory");
40 if (!current_frame_has_header) {
41 if (current_frame.str().size() > 1) current_frame <<
", ";
42 current_frame <<
"\"header\": {}";
44 if (!current_frame_has_payload) {
45 if (current_frame.str().size() > 1) current_frame <<
", ";
46 current_frame <<
"\"payload\": []";
51 writeTopLevelEntry(current_frame.str());
53 is_building_frame =
false;
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.
constexpr int ERR_CANTOPENOUTPUT
Output medium could not be opened successfully.