From a5ef9e4ee04e47bf15516b4ece91150f5ea4b5eb Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Thu, 31 Jul 2014 23:35:06 +0200 Subject: document code --- voctocore/voctocore.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'voctocore/voctocore.py') diff --git a/voctocore/voctocore.py b/voctocore/voctocore.py index dcab83d..bec2c03 100755 --- a/voctocore/voctocore.py +++ b/voctocore/voctocore.py @@ -2,24 +2,29 @@ import gi import signal +# import GStreamer and GTK-Helper classes gi.require_version('Gst', '1.0') from gi.repository import GLib, Gst, Gtk, GObject +# init GObject before importing local classes +GObject.threads_init() +Gst.init(None) + +# import local classes from videomix import Videomix from controlserver import ControlServer - - class Main: def __init__(self): + # initialize subsystem self.videomix = Videomix() self.controlserver = ControlServer(self.videomix) def runmain(): - GObject.threads_init() - Gst.init(None) - + # make killable by ctrl-c signal.signal(signal.SIGINT, signal.SIG_DFL) + + # start main-class and main-loop start=Main() Gtk.main() -- cgit v1.2.3