diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-02-16 22:42:23 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-02-16 22:42:23 +0000 |
| commit | 38ab054c2ec22a853ee6abbe3f3683d153e9bb63 (patch) | |
| tree | a73ad5597c15c59ec068b9f5cb6ce9b0d53e4ecb /src/lib | |
| parent | b10f5d0458fbf276c4870e0b83be8ce622a75f4c (diff) | |
| parent | 790ea4e8ca2e5bde3320ae49c8134b959c34a191 (diff) | |
Merge branch 'direct-mxf' of /home/carl/git/dvdomatic into direct-mxf
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/ab_transcode_job.cc | 4 | ||||
| -rw-r--r-- | src/lib/ab_transcode_job.h | 3 | ||||
| -rw-r--r-- | src/lib/dcp_video_frame.h | 1 | ||||
| -rw-r--r-- | src/lib/examine_content_job.cc | 4 | ||||
| -rw-r--r-- | src/lib/examine_content_job.h | 2 | ||||
| -rw-r--r-- | src/lib/film.cc | 8 | ||||
| -rw-r--r-- | src/lib/job.cc | 4 | ||||
| -rw-r--r-- | src/lib/job.h | 8 | ||||
| -rw-r--r-- | src/lib/job_manager.cc | 11 | ||||
| -rw-r--r-- | src/lib/scp_dcp_job.cc | 4 | ||||
| -rw-r--r-- | src/lib/scp_dcp_job.h | 2 | ||||
| -rw-r--r-- | src/lib/transcode_job.cc | 5 | ||||
| -rw-r--r-- | src/lib/transcode_job.h | 2 | ||||
| -rw-r--r-- | src/lib/transcoder.h | 5 |
14 files changed, 24 insertions, 39 deletions
diff --git a/src/lib/ab_transcode_job.cc b/src/lib/ab_transcode_job.cc index 0efd277bb..025c23c86 100644 --- a/src/lib/ab_transcode_job.cc +++ b/src/lib/ab_transcode_job.cc @@ -32,8 +32,8 @@ using boost::shared_ptr; /** @param f Film to compare. * @param o Decode options. */ -ABTranscodeJob::ABTranscodeJob (shared_ptr<Film> f, DecodeOptions o, shared_ptr<Job> req) - : Job (f, req) +ABTranscodeJob::ABTranscodeJob (shared_ptr<Film> f, DecodeOptions o) + : Job (f) , _decode_opt (o) { _film_b.reset (new Film (*_film)); diff --git a/src/lib/ab_transcode_job.h b/src/lib/ab_transcode_job.h index 983842038..8e3cbe2d8 100644 --- a/src/lib/ab_transcode_job.h +++ b/src/lib/ab_transcode_job.h @@ -39,8 +39,7 @@ class ABTranscodeJob : public Job public: ABTranscodeJob ( boost::shared_ptr<Film> f, - DecodeOptions o, - boost::shared_ptr<Job> req + DecodeOptions o ); std::string name () const; diff --git a/src/lib/dcp_video_frame.h b/src/lib/dcp_video_frame.h index be8a559b2..ab458b58f 100644 --- a/src/lib/dcp_video_frame.h +++ b/src/lib/dcp_video_frame.h @@ -26,7 +26,6 @@ * @brief A single frame of video destined for a DCP. */ -class FilmState; class Film; class ServerDescription; class Scaler; diff --git a/src/lib/examine_content_job.cc b/src/lib/examine_content_job.cc index 94e5320fe..31d76c4f7 100644 --- a/src/lib/examine_content_job.cc +++ b/src/lib/examine_content_job.cc @@ -36,8 +36,8 @@ using std::vector; using std::pair; using boost::shared_ptr; -ExamineContentJob::ExamineContentJob (shared_ptr<Film> f, shared_ptr<Job> req) - : Job (f, req) +ExamineContentJob::ExamineContentJob (shared_ptr<Film> f) + : Job (f) { } diff --git a/src/lib/examine_content_job.h b/src/lib/examine_content_job.h index 729c287b5..8ee4f0d60 100644 --- a/src/lib/examine_content_job.h +++ b/src/lib/examine_content_job.h @@ -29,7 +29,7 @@ class ExamineContentJob : public Job { public: - ExamineContentJob (boost::shared_ptr<Film>, boost::shared_ptr<Job> req); + ExamineContentJob (boost::shared_ptr<Film>); ~ExamineContentJob (); std::string name () const; diff --git a/src/lib/film.cc b/src/lib/film.cc index 36ebe7199..289a8c348 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -300,9 +300,9 @@ Film::make_dcp (bool transcode) if (transcode) { if (dcp_ab()) { - r = JobManager::instance()->add (shared_ptr<Job> (new ABTranscodeJob (shared_from_this(), od, shared_ptr<Job> ()))); + r = JobManager::instance()->add (shared_ptr<Job> (new ABTranscodeJob (shared_from_this(), od))); } else { - r = JobManager::instance()->add (shared_ptr<Job> (new TranscodeJob (shared_from_this(), od, shared_ptr<Job> ()))); + r = JobManager::instance()->add (shared_ptr<Job> (new TranscodeJob (shared_from_this(), od))); } } } @@ -315,7 +315,7 @@ Film::examine_content () return; } - _examine_content_job.reset (new ExamineContentJob (shared_from_this(), shared_ptr<Job> ())); + _examine_content_job.reset (new ExamineContentJob (shared_from_this())); _examine_content_job->Finished.connect (bind (&Film::examine_content_finished, this)); JobManager::instance()->add (_examine_content_job); } @@ -330,7 +330,7 @@ Film::examine_content_finished () void Film::send_dcp_to_tms () { - shared_ptr<Job> j (new SCPDCPJob (shared_from_this(), shared_ptr<Job> ())); + shared_ptr<Job> j (new SCPDCPJob (shared_from_this())); JobManager::instance()->add (j); } diff --git a/src/lib/job.cc b/src/lib/job.cc index dd034bf0c..bde2c8cfd 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -33,11 +33,9 @@ using std::stringstream; using boost::shared_ptr; /** @param s Film that we are operating on. - * @param req Job that must be completed before this job is run. */ -Job::Job (shared_ptr<Film> f, shared_ptr<Job> req) +Job::Job (shared_ptr<Film> f) : _film (f) - , _required (req) , _state (NEW) , _start_time (0) , _progress_unknown (false) diff --git a/src/lib/job.h b/src/lib/job.h index 1ea0a9b17..1538e2779 100644 --- a/src/lib/job.h +++ b/src/lib/job.h @@ -37,7 +37,7 @@ class Film; class Job : public boost::enable_shared_from_this<Job> { public: - Job (boost::shared_ptr<Film> s, boost::shared_ptr<Job> req); + Job (boost::shared_ptr<Film> s); virtual ~Job() {} /** @return user-readable name of this job */ @@ -65,10 +65,6 @@ public: void descend (float); float overall_progress () const; - boost::shared_ptr<Job> required () const { - return _required; - } - boost::signals2::signal<void()> Finished; protected: @@ -93,8 +89,6 @@ private: void run_wrapper (); - boost::shared_ptr<Job> _required; - /** mutex for _state and _error */ mutable boost::mutex _state_mutex; /** current state of the job */ diff --git a/src/lib/job_manager.cc b/src/lib/job_manager.cc index fa02fd370..910597628 100644 --- a/src/lib/job_manager.cc +++ b/src/lib/job_manager.cc @@ -111,13 +111,10 @@ JobManager::scheduler () } if ((*i)->is_new()) { - shared_ptr<Job> r = (*i)->required (); - if (!r || r->finished_ok ()) { - (*i)->start (); - - /* Only start one job at once */ - break; - } + (*i)->start (); + + /* Only start one job at once */ + break; } } } diff --git a/src/lib/scp_dcp_job.cc b/src/lib/scp_dcp_job.cc index 3d941888e..30d02eff8 100644 --- a/src/lib/scp_dcp_job.cc +++ b/src/lib/scp_dcp_job.cc @@ -94,8 +94,8 @@ public: }; -SCPDCPJob::SCPDCPJob (shared_ptr<Film> f, shared_ptr<Job> req) - : Job (f, req) +SCPDCPJob::SCPDCPJob (shared_ptr<Film> f) + : Job (f) , _status ("Waiting") { diff --git a/src/lib/scp_dcp_job.h b/src/lib/scp_dcp_job.h index 5d0bfe7b4..08d8e2c78 100644 --- a/src/lib/scp_dcp_job.h +++ b/src/lib/scp_dcp_job.h @@ -26,7 +26,7 @@ class SCPDCPJob : public Job { public: - SCPDCPJob (boost::shared_ptr<Film>, boost::shared_ptr<Job> req); + SCPDCPJob (boost::shared_ptr<Film>); std::string name () const; void run (); diff --git a/src/lib/transcode_job.cc b/src/lib/transcode_job.cc index e9a59c743..87e9a47c4 100644 --- a/src/lib/transcode_job.cc +++ b/src/lib/transcode_job.cc @@ -38,10 +38,9 @@ using boost::shared_ptr; /** @param s Film to use. * @param o Decode options. - * @param req Job that must be completed before this job is run. */ -TranscodeJob::TranscodeJob (shared_ptr<Film> f, DecodeOptions o, shared_ptr<Job> req) - : Job (f, req) +TranscodeJob::TranscodeJob (shared_ptr<Film> f, DecodeOptions o) + : Job (f) , _decode_opt (o) { diff --git a/src/lib/transcode_job.h b/src/lib/transcode_job.h index 8f78e7f6a..9b69e4e65 100644 --- a/src/lib/transcode_job.h +++ b/src/lib/transcode_job.h @@ -33,7 +33,7 @@ class Encoder; class TranscodeJob : public Job { public: - TranscodeJob (boost::shared_ptr<Film> f, DecodeOptions od, boost::shared_ptr<Job> req); + TranscodeJob (boost::shared_ptr<Film> f, DecodeOptions od); std::string name () const; void run (); diff --git a/src/lib/transcoder.h b/src/lib/transcoder.h index 786010869..b0c263d07 100644 --- a/src/lib/transcoder.h +++ b/src/lib/transcoder.h @@ -18,7 +18,7 @@ */ /** @file src/transcoder.h - * @brief A class which takes a FilmState and some Options, then uses those to transcode a Film. + * @brief A class which takes a Film and some Options, then uses those to transcode the film. * * A decoder is selected according to the content type, and the encoder can be specified * as a parameter to the constructor. @@ -29,7 +29,6 @@ class Film; class Job; class Encoder; -class FilmState; class Matcher; class VideoFilter; class Gain; @@ -38,7 +37,7 @@ class AudioDecoder; class DelayLine; /** @class Transcoder - * @brief A class which takes a FilmState and some Options, then uses those to transcode a Film. + * @brief A class which takes a Film and some Options, then uses those to transcode the film. * * A decoder is selected according to the content type, and the encoder can be specified * as a parameter to the constructor. |
