[farsight2/master] Writeout the pipeline on sigint if possible
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:24:10 PST 2008
---
tests/gui/fs2-gui.py | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/tests/gui/fs2-gui.py b/tests/gui/fs2-gui.py
index 731445c..11fde91 100644
--- a/tests/gui/fs2-gui.py
+++ b/tests/gui/fs2-gui.py
@@ -25,6 +25,8 @@ import socket
import threading
import weakref
+import signal
+
try:
import pygtk
pygtk.require("2.0")
@@ -94,9 +96,17 @@ def make_video_sink(pipeline, xid, name, async=True):
class FsUIPipeline:
"Object to wrap the GstPipeline"
+
+ def int_handler(self, sig, frame):
+ try:
+ self.pipeline.to_dot_file(0, "pipelinedump")
+ except:
+ pass
+ sys.exit(2)
def __init__(self, elementname="fsrtpconference"):
self.pipeline = gst.Pipeline()
+ signal.signal(signal.SIGINT, self.int_handler)
notifier = farsight.ElementAddedNotifier()
notifier.connect("element-added", self.element_added_cb)
notifier.add(self.pipeline)
--
1.5.6.5
More information about the farsight-commits
mailing list