Add pause/resume to the batch converter (#1248).
[dcpomatic.git] / src / lib / job_manager.h
index a382dd7363732cc4ddd20fad782005bd438ea2ff..aafb7aa67aa8609ce8214ef2e500cbc6e62580af 100644 (file)
@@ -47,6 +47,12 @@ public:
        bool errors () const;
        void increase_priority (boost::shared_ptr<Job>);
        void decrease_priority (boost::shared_ptr<Job>);
+       void pause ();
+       void resume ();
+       bool paused () const {
+               boost::mutex::scoped_lock lm (_mutex);
+               return _paused;
+       }
 
        void analyse_audio (
                boost::shared_ptr<const Film> film,
@@ -77,6 +83,8 @@ private:
        /** List of jobs in the order that they will be executed */
        std::list<boost::shared_ptr<Job> > _jobs;
        bool _terminate;
+       bool _paused;
+       boost::shared_ptr<Job> _paused_job;
 
        boost::optional<std::string> _last_active_job;
        boost::thread* _scheduler;