38 gobject.threads_init()
40 from gstlal
import pipeparts
41 from gstlal
import simplehandler
74 def __init__(self, pipeline):
77 signal.signal(signal.SIGINT, self)
79 def __call__(self, signum, frame):
80 print "shifting by %d ns" % self.
shift
81 self.pipeline.get_by_name(
"shift").set_property(
"shift", self.
shift)
85 mainloop = gobject.MainLoop(context = gobject.MainContext())
86 pipeline = gst.Pipeline()
90 head = pipeparts.mkshift(pipeline, head, shift = 0, name =
"shift")
91 head = pipeparts.mkchecktimestamps(pipeline, head)
92 pipeparts.mkfakesink(pipeline, head)
95 handler = simplehandler.Handler(mainloop, pipeline)
97 if pipeline.set_state(gst.STATE_PLAYING) == gst.STATE_CHANGE_FAILURE:
98 raise RuntimeError(
"pipeline failed to enter PLAYING state")