parameters: (self, server_instance, stitcher_executor, display_)
docstring: Init
docstring_summary: Init
docstring_tokens: Init
function: def __init__(self, server_instance, stitcher_executor, display_):
          """Init
          """
          self.server = server_instance
          self.stitcher_executor = stitcher_executor
  
          self.algorithm_manager = None
          self.has_audio = None
          self.project_manager = self.server.project_manager
          self.display = display_
          self.old_submit = self.stitcher_executor.submit
  
          self.overlay_window = None
          self.overlay_config = None
          self.overlay = None
  
          # State Machine
  
          states = [
              # The stitcher is waiting for the camera to connect
              State(name="WaitingForCamera", ignore_invalid_triggers=True),
              # Stitcher running, no errors
              State(name="Running", ignore_invalid_triggers=True),
              # Stitcher running, but producing errors (EOF, etc..)
              State(name="Failing", ignore_invalid_triggers=True),
          ]
  
          transitions = [
  
              {"source": "WaitingForCamera",
               "trigger": "t_camera_connected",
               "dest": "Failing"},
  
              {"source": "Running",
               "trigger": "t_fail",
               "dest": "Failing"},
  
              {"source": "Failing",
               "trigger": "t_resume",
               "dest": "Running"},
  
              {"source": ["Running", "Failing"],
               "trigger": "t_camera_connected",
               "conditions": "_ignore",
               "dest": "Failing"},
  
              {"source": ["Running", "Failing"],
               "trigger": "t_camera_disconnected",
               "before": "terminate",
               "dest": "WaitingForCamera"},
  
              {"source": ["Running", "Failing"],
               "trigger": "t_terminate",
               "dest": "WaitingForCamera"},
          ]
  
          self.machine = Machine(
              name="Stitcher", model=self, states=states,
              transitions=transitions, initial="WaitingForCamera", async=True)
  
          # Signals
  
          self._connect_signals()
          self._load_plugins()
          self.run_loop = None
          self.native_loop = None
function_tokens: def __init__ ( self , server_instance , stitcher_executor , display_ ) : self . server = server_instance self . stitcher_executor = stitcher_executor self . algorithm_manager = None self . has_audio = None self . project_manager = self . server . project_manager self . display = display_ self . old_submit = self . stitcher_executor . submit self . overlay_window = None self . overlay_config = None self . overlay = None # State Machine states = [ # The stitcher is waiting for the camera to connect State ( name = "WaitingForCamera" , ignore_invalid_triggers = True ) , # Stitcher running, no errors State ( name = "Running" , ignore_invalid_triggers = True ) , # Stitcher running, but producing errors (EOF, etc..) State ( name = "Failing" , ignore_invalid_triggers = True ) , ] transitions = [ { "source" : "WaitingForCamera" , "trigger" : "t_camera_connected" , "dest" : "Failing" } , { "source" : "Running" , "trigger" : "t_fail" , "dest" : "Failing" } , { "source" : "Failing" , "trigger" : "t_resume" , "dest" : "Running" } , { "source" : [ "Running" , "Failing" ] , "trigger" : "t_camera_connected" , "conditions" : "_ignore" , "dest" : "Failing" } , { "source" : [ "Running" , "Failing" ] , "trigger" : "t_camera_disconnected" , "before" : "terminate" , "dest" : "WaitingForCamera" } , { "source" : [ "Running" , "Failing" ] , "trigger" : "t_terminate" , "dest" : "WaitingForCamera" } , ] self . machine = Machine ( name = "Stitcher" , model = self , states = states , transitions = transitions , initial = "WaitingForCamera" , async = True ) # Signals self . _connect_signals ( ) self . _load_plugins ( ) self . run_loop = None self . native_loop = None