#ifndef DCPOMATIC_JOB_H
#define DCPOMATIC_JOB_H
-#include <string>
#include <boost/thread/mutex.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/signals2.hpp>
#include <boost/thread.hpp>
+#include <string>
class Film;
void set_progress_unknown ();
void set_progress (float, bool force = false);
void sub (std::string);
- float progress () const;
- bool progress_unknown () const {
- return !_progress;
- }
+ boost::optional<float> progress () const;
boost::shared_ptr<const Film> film () const {
return _film;
mutable boost::mutex _progress_mutex;
boost::optional<float> _progress;
+ /** condition to signal changes to pause/resume so that we know when to wake;
+ this could be a general _state_change if it made more sense.
+ */
+ boost::condition_variable _pause_changed;
+
int _ran_for;
};