Example #1
0
 def __init__(self, *pipeline_args):
     from xpra.sound.sink import SoundSink
     sound_pipeline = SoundSink(*pipeline_args)
     sound_subprocess.__init__(self, sound_pipeline, ["add_data"], ["underrun", "overrun"])
     if FAKE_OVERRUN>0:
         def fake_overrun(*args):
             wo = self.wrapped_object
             if wo:
                 wo.emit("overrun", 500)
         gobject.timeout_add(FAKE_OVERRUN*1000, fake_overrun)
Example #2
0
 def start(self):
     if not FAKE_START_FAILURE:
         gobject.idle_add(self.wrapped_object.start)
     if FAKE_EXIT>0:
         def process_exit():
             self.cleanup()
             gobject.timeout_add(250, self.stop)
         gobject.timeout_add(FAKE_EXIT*1000, process_exit)
     if FAKE_CRASH>0:
         def force_exit():
             import sys
             sys.exit(1)
         gobject.timeout_add(FAKE_CRASH*1000, force_exit)
     subprocess_callee.start(self)
Example #3
0
 def process_exit():
     self.cleanup()
     gobject.timeout_add(250, self.stop)
Example #4
0
 def cleanup(self):
     log("cleanup() sending cleanup request to %s", self.description)
     self.send("cleanup")
     #cleanup should cause the process to exit
     gobject.timeout_add(500, self.stop)
Example #5
0
 def start(self):
     subprocess_caller.start(self)
     gobject.timeout_add(2500, self.verify_started)