Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2023-05-27 23:46:58 +0300
committerPhilipp Hörist <philipp@hoerist.com>2023-05-28 00:03:47 +0300
commitffe5bdd07c3b5a61338b3ad6ff56712f341d5086 (patch)
tree8033b3625613b66b3dc6d7a98e2cb1c3720e5498
parent1de4921acc703a09702974d2113662ad4fcfc9e3 (diff)
refactor: JingleRTP: Don’t call external process for pipeline debug
-rw-r--r--gajim/common/jingle_rtp.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/gajim/common/jingle_rtp.py b/gajim/common/jingle_rtp.py
index 770462694..d317beea2 100644
--- a/gajim/common/jingle_rtp.py
+++ b/gajim/common/jingle_rtp.py
@@ -24,7 +24,6 @@ from typing import Iterator
from typing import Optional
import logging
-import os
import socket
from collections import deque
from datetime import datetime
@@ -40,6 +39,7 @@ except Exception:
pass
from gajim.common import app
+from gajim.common import configpaths
from gajim.common.i18n import _
from gajim.common.jingle_content import contents
from gajim.common.jingle_content import JingleContent
@@ -571,20 +571,11 @@ class JingleVideo(JingleRTPContent):
self.pipeline.set_state(Gst.State.PLAYING)
if log.getEffectiveLevel() == logging.DEBUG:
- # Use 'export GST_DEBUG_DUMP_DOT_DIR=/tmp/' before starting Gajim
timestamp = datetime.now().strftime('%m-%d-%Y-%H-%M-%S')
name = f'video-graph-{timestamp}'
- debug_dir = os.environ.get('GST_DEBUG_DUMP_DOT_DIR')
- name_dot = f'{debug_dir}/{name}.dot'
- name_png = f'{debug_dir}/{name}.png'
+ filename = configpaths.get('DEBUG') / f'{name}.dot'
Gst.debug_bin_to_dot_file(
- self.pipeline, Gst.DebugGraphDetails.ALL, name)
- if debug_dir:
- try:
- os.system(f'dot -Tpng {name_dot} > {name_png}')
- except Exception:
- log.debug('Could not save pipeline graph. Make sure '
- 'graphviz is installed.')
+ self.pipeline, Gst.DebugGraphDetails.ALL, str(filename))
@staticmethod
def get_fallback_src() -> Optional[Gst.Bin]: