Exemplo n.º 1
0
    def IsSuitable(self):
        try:
            proc = Popen(["recordmydesktop", "-h"], stdin=DEVNULL, stdout=DEVNULL, stderr=DEVNULL)
            proc.communicate()
        except Exception as ex:
            error("Cannot run 'recordmydesktop': %s" % (str(ex)))
            return const.SUITABLE_NOT_SUITABLE

        return const.SUITABLE_DEFAULT  # 1 is default
    def IsSuitable(self):
        try:
            proc = Popen(["recordmydesktop", "-h"],
                         stdin=DEVNULL,
                         stdout=DEVNULL,
                         stderr=DEVNULL)
            proc.communicate()
        except Exception as ex:
            error("Cannot run 'recordmydesktop': %s" % (str(ex)))
            return const.SUITABLE_NOT_SUITABLE

        return const.SUITABLE_DEFAULT  # 1 is default
Exemplo n.º 3
0
 def Screencast(self):
     try:
         succ, filename = self._backend().ScreencastArea(self.x,
                                                     self.y,
                                                     self.width,
                                                     self.height,
                                                     self.output,
                                                     {"framerate": 5}
                                                     )
         return ScreencastResult(succ, filename)
     except dbus.exceptions.DBusException as ex:
         error("Failed to start GNOME screencasting: %s" % (str(ex)))
         return ScreencastResult(False, None)
Exemplo n.º 4
0
 def StopScreencast(self, end_handler):
     try:
         self._backend().StopScreencast()
     except dbus.exceptions.DBusException as ex:
         error("Failed to stop GNOME screencasting: %s" % (str(ex)))
     end_handler()