pipeparts.pipedot module¶
Utilities for converting Gst pipelines into DOT graphs
- pipeparts.pipedot.to_file(pipeline: Pipeline, filestem: str, verbose: bool = False, use_str_method: bool = False)[source]¶
Write a pipeline out to a dot file. This function needs the environment variable GST_DEBUG_DUMP_DOT_DIR to be set.
- Args:
pipeline: filestem:
str, name of file (not including extension)
- verbose:
bool, default False, if True a message will be written to stderr.
- use_str_method:
bool, default False, if True use the “to_str” method as an intermediate step. This is enabled due to some bugs in Gst where no files are written out using the direct “debug_bin_to_dot_file”.
- Notes:
- File Output:
The filename will be os.path.join($GST_DEBUG_DUMP_DOT_DIR, filestem + “.dot”)
- Raises:
- ValueError:
If “GST_DEBUG_DUMP_DOT_DIR” env var not defined
- References:
[1] https://lazka.github.io/pgi-docs/Gst-1.0/functions.html#Gst.debug_bin_to_dot_file
- Returns:
None
- pipeparts.pipedot.to_str(pipeline: Pipeline) str [source]¶
Convert a pipeline to a DOT-formatted string directly (no out file intermediary)
- Args:
- pipeline:
Pipeline, the pipeline to convert to DOT string
- References:
[1] https://gstreamer.freedesktop.org/documentation/gstreamer/debugutils.html?gi-language=python
- Returns:
str, the pipeline converted to DOT formatted string