#include <PipelineDotDumper.h>
Public Member Functions | |
| void | setReceiverName (const QString &receiverName) |
| const QByteArray & | pipelineName () const |
| void | dump (GstElement *pipeline, const char *tag) const |
| Into GST_DEBUG_DUMP_DOT_DIR as "<pipeline name>-<tag>.dot", when that is set. No-op without a pipeline. | |
| void | snapshot (GstElement *pipeline, const QString &tag) const |
Static Public Member Functions | |
| static QString | dotFileTag (QStringView tag) |
| static QString | writePipelineDot (GstElement *pipeline, QStringView tag, const QString &directory) |
Static Public Attributes | |
| static constexpr GstDebugGraphDetails | kDiagnosticDotGraphDetails |
| Every pipeline graph QGC writes omits element properties, because source properties can contain credentials. | |
Writes a receiver pipeline's graph as Graphviz .dot files.
Threading: the receiver's worker only, since a dump walks the pipeline and writes to disk.
Definition at line 11 of file PipelineDotDumper.h.
|
static |
Returns tag as a file-name part: letters, digits, '-' and '' only (anything else becomes ''), at most 57 characters, never empty. A dump tag can then neither leave its directory nor make the file name too long.
Definition at line 16 of file PipelineDotDumper.cc.
Referenced by setReceiverName(), snapshot(), and writePipelineDot().
| void PipelineDotDumper::dump | ( | GstElement * | pipeline, |
| const char * | tag ) const |
Into GST_DEBUG_DUMP_DOT_DIR as "<pipeline name>-<tag>.dot", when that is set. No-op without a pipeline.
Definition at line 66 of file PipelineDotDumper.cc.
References kDiagnosticDotGraphDetails.
Referenced by snapshot().
|
inline |
Definition at line 30 of file PipelineDotDumper.h.
| void PipelineDotDumper::setReceiverName | ( | const QString & | receiverName | ) |
Names the pipeline, and so its dump files, "receiver-<receiverName>". VideoManager names each receiver uniquely, so receivers don't overwrite each other's dumps.
Definition at line 60 of file PipelineDotDumper.cc.
References dotFileTag().
| void PipelineDotDumper::snapshot | ( | GstElement * | pipeline, |
| const QString & | tag ) const |
For bug reports: dump(), or a rotating copy under CacheLocation when GST_DEBUG_DUMP_DOT_DIR isn't set. tag may come from the user; it is reduced to a safe file-name part.
Definition at line 86 of file PipelineDotDumper.cc.
References dotFileTag(), dump(), and writePipelineDot().
|
static |
Writes pipeline's graph (kDiagnosticDotGraphDetails) into directory as "<dotFileTag(tag)>-<UTC time>.dot", keeping at most 10 .dot files there. Returns the file's path, or empty on failure.
Definition at line 29 of file PipelineDotDumper.cc.
References GStreamer::adoptGChar(), QGCFileHelper::atomicWrite(), dotFileTag(), and kDiagnosticDotGraphDetails.
Referenced by snapshot().
|
staticconstexpr |
Every pipeline graph QGC writes omits element properties, because source properties can contain credentials.
Definition at line 15 of file PipelineDotDumper.h.
Referenced by dump(), and writePipelineDot().