diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-21 20:07:43 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-21 20:07:43 +0200 |
| commit | e17d0356eddaac5fb1624ce39597a58899edf326 (patch) | |
| tree | a0f50d7652f088feff28a91dcc47138fa156a51c /live-mogrify.py | |
| parent | f75eba8d878de5d5c4cb43da0a4df4548aa8340c (diff) | |
seek to a frame
Diffstat (limited to 'live-mogrify.py')
| -rw-r--r-- | live-mogrify.py | 5 |
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__': |
