summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--live-mogrify.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/live-mogrify.py b/live-mogrify.py
index 25af142..dc48b7b 100644
--- a/live-mogrify.py
+++ b/live-mogrify.py
@@ -220,11 +220,14 @@ class Listener():
return 'exited'
return 'ok'
def _ready_fn(self, rpc_client):
+ print("Ready!")
+ self.rpc_client = rpc_client
process_live_input(self.opt, self.data_opt, rpc_client, self.model)
def connect(self):
self.rpc_client = CortexRPC(self._get_fn, self._set_fn, self._ready_fn, self._cmd_fn)
def process_live_input(opt, data_opt, rpc_client, model):
+ print(">>> Process live input")
if data_opt.processing:
print("Already processing...")
data_opt.processing = True
@@ -239,6 +242,7 @@ def process_live_input(opt, data_opt, rpc_client, model):
if len(sequence) == 0:
print("Got empty sequence...")
data_opt.processing = False
+ rpc_client.send_status('processing', false)
return
start_img_path = os.path.join(opt.render_dir, "frame_{:05d}.png".format(0))
copyfile(sequence[0], start_img_path)
@@ -354,6 +358,7 @@ def process_live_input(opt, data_opt, rpc_client, model):
if data_opt.pause:
data_opt.pause = False
break
+ rpc_client.send_status('processing', false)
data_opt.processing = False
if __name__ == '__main__':