Пример #1
0
    def update_render_status(self):

        Gdk.threads_enter()
                    
        if proxyheadless.session_render_complete(self.get_session_id()) == True:
            #remove_as_status_polling_object(self)
            
            job_msg = self.get_completed_job_message()
            update_job_queue(job_msg)
            
            proxyheadless.delete_session_folders(self.get_session_id()) # these were created mltheadlessutils.py, see proxyheadless.py
            
            GLib.idle_add(self.proxy_render_complete)

        else:
            status = proxyheadless.get_session_status(self.get_session_id())
            if status != None:
                fraction, elapsed = status
                
                self.progress = float(fraction)
                if self.progress > 1.0:
                    self.progress = 1.0

                self.elapsed = float(elapsed)
                self.text = _("Rendering Proxy Clip for ") + self.get_job_name()

                job_msg = self.get_job_queue_message()
                
                update_job_queue(job_msg)
            else:
                # Process start/stop on their own and we hit trying to get non-existing status for e.g completed renders.
                pass

        Gdk.threads_leave()
Пример #2
0
    def update_render_status(self):

        Gdk.threads_enter()

        if proxyheadless.session_render_complete(
                self.get_session_id()) == True:
            remove_as_status_polling_object(self)

            job_proxy = self.get_completed_job_proxy()
            update_job_queue(job_proxy)
            self.completed_job_proxy = job_proxy

            proxyheadless.delete_session_folders(self.get_session_id(
            ))  # these were created mltheadlessutils.py, see proxyheadless.py

            GLib.idle_add(self.proxy_render_complete)

        else:
            status = proxyheadless.get_session_status(self.get_session_id())
            if status != None:
                fraction, elapsed = status

                msg = _("Rendering Proxy Clip for ") + self.get_job_name()

                job_proxy = self.get_job_proxy()

                job_proxy.progress = float(fraction)
                if job_proxy.progress > 1.0:
                    # hack to fix how progress is calculated in gmicheadless because producers can render a bit longer then required.
                    job_proxy.progress = 1.0

                job_proxy.elapsed = float(elapsed)
                job_proxy.text = msg

                update_job_queue(job_proxy)
            else:
                print("ProxyRenderJobQueueObject status none")
                pass  # This can happen sometimes before gmicheadless.py has written a status message, we just do nothing here.

        Gdk.threads_leave()