gstreamer
Loading...
Searching...
No Matches
frameHeader.cc
Go to the documentation of this file.
1// gstreamer
4
5// Implementation summary:
6// Append the frame header block to the JSON object currently being assembled.
7
8bool GstreamerJsonFactory::publishFrameHeaderImpl(const GFrameHeader* gframeHeader) {
9 if (!is_building_frame) {
10 log->error(ERR_PUBLISH_ERROR, "publishFrameHeaderImpl called without an active frame in GstreamerJsonFactory");
11 return false;
12 }
13 if (!gframeHeader) {
14 log->error(ERR_PUBLISH_ERROR, "gframeHeader is null in GstreamerJsonFactory::publishFrameHeaderImpl");
15 return false;
16 }
17
18 current_frame << "\"header\": {"
19 << "\"frame_id\": " << gframeHeader->getFrameID()
20 << "}";
21
22 current_frame_has_header = true;
23 return true;
24}
std::shared_ptr< GLogger > log
long int getFrameID() const
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.