From e17d0356eddaac5fb1624ce39597a58899edf326 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 21 May 2018 20:07:43 +0200 Subject: seek to a frame --- live-mogrify.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'live-mogrify.py') 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__': -- cgit v1.2.3-70-g09d2