summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-10-10 13:04:59 +0100
committerCarl Hetherington <cth@carlh.net>2012-10-10 13:04:59 +0100
commitd382f34db155ddaf4bb61538c18b87c7564e00b2 (patch)
tree8c63943ad046240f9a307c640d022af750b07bb7 /src/lib
parentb5828ccf20a0e0c4365854ac19a05d5a4783e254 (diff)
parent1bbd5367ddddfac18ceaa4d010cfc39f1daaa3a3 (diff)
Merge branch 'master' into subs
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ab_transcode_job.cc4
-rw-r--r--src/lib/ab_transcode_job.h2
-rw-r--r--src/lib/check_hashes_job.cc10
-rw-r--r--src/lib/check_hashes_job.h2
-rw-r--r--src/lib/copy_from_dvd_job.cc4
-rw-r--r--src/lib/copy_from_dvd_job.h2
-rw-r--r--src/lib/examine_content_job.cc4
-rw-r--r--src/lib/examine_content_job.h2
-rw-r--r--src/lib/ffmpeg_decoder.cc16
-rw-r--r--src/lib/film.cc16
-rw-r--r--src/lib/film_state.cc16
-rw-r--r--src/lib/j2k_wav_encoder.cc12
-rw-r--r--src/lib/job.cc10
-rw-r--r--src/lib/job.h9
-rw-r--r--src/lib/job_manager.cc22
-rw-r--r--src/lib/job_manager.h6
-rw-r--r--src/lib/make_dcp_job.cc4
-rw-r--r--src/lib/make_dcp_job.h2
-rw-r--r--src/lib/options.h3
-rw-r--r--src/lib/scp_dcp_job.cc4
-rw-r--r--src/lib/scp_dcp_job.h2
-rw-r--r--src/lib/thumbs_job.cc4
-rw-r--r--src/lib/thumbs_job.h2
-rw-r--r--src/lib/transcode_job.cc4
-rw-r--r--src/lib/transcode_job.h2
25 files changed, 87 insertions, 77 deletions
diff --git a/src/lib/ab_transcode_job.cc b/src/lib/ab_transcode_job.cc
index d94f56d0a..fd8236bf0 100644
--- a/src/lib/ab_transcode_job.cc
+++ b/src/lib/ab_transcode_job.cc
@@ -35,8 +35,8 @@ using namespace boost;
* @param o Options.
* @Param l A log that we can write to.
*/
-ABTranscodeJob::ABTranscodeJob (shared_ptr<const FilmState> s, shared_ptr<const Options> o, Log* l)
- : Job (s, o, l)
+ABTranscodeJob::ABTranscodeJob (shared_ptr<const FilmState> s, shared_ptr<const Options> o, Log* l, shared_ptr<Job> req)
+ : Job (s, o, l, req)
{
_fs_b.reset (new FilmState (*_fs));
_fs_b->scaler = Config::instance()->reference_scaler ();
diff --git a/src/lib/ab_transcode_job.h b/src/lib/ab_transcode_job.h
index 478049068..4b80593f4 100644
--- a/src/lib/ab_transcode_job.h
+++ b/src/lib/ab_transcode_job.h
@@ -34,7 +34,7 @@
class ABTranscodeJob : public Job
{
public:
- ABTranscodeJob (boost::shared_ptr<const FilmState> s, boost::shared_ptr<const Options> o, Log* l);
+ ABTranscodeJob (boost::shared_ptr<const FilmState> s, boost::shared_ptr<const Options> o, Log* l, boost::shared_ptr<Job> req);
std::string name () const;
void run ();
diff --git a/src/lib/check_hashes_job.cc b/src/lib/check_hashes_job.cc
index f60a2d40d..f07a5ab2a 100644
--- a/src/lib/check_hashes_job.cc
+++ b/src/lib/check_hashes_job.cc
@@ -31,8 +31,8 @@
using namespace std;
using namespace boost;
-CheckHashesJob::CheckHashesJob (shared_ptr<const FilmState> s, shared_ptr<const Options> o, Log* l)
- : Job (s, o, l)
+CheckHashesJob::CheckHashesJob (shared_ptr<const FilmState> s, shared_ptr<const Options> o, Log* l, shared_ptr<Job> req)
+ : Job (s, o, l, req)
, _bad (0)
{
@@ -73,13 +73,13 @@ CheckHashesJob::run ()
shared_ptr<Job> tc;
if (_fs->dcp_ab) {
- tc.reset (new ABTranscodeJob (_fs, _opt, _log));
+ tc.reset (new ABTranscodeJob (_fs, _opt, _log, shared_from_this()));
} else {
- tc.reset (new TranscodeJob (_fs, _opt, _log));
+ tc.reset (new TranscodeJob (_fs, _opt, _log, shared_from_this()));
}
JobManager::instance()->add_after (shared_from_this(), tc);
- JobManager::instance()->add_after (tc, shared_ptr<Job> (new CheckHashesJob (_fs, _opt, _log)));
+ JobManager::instance()->add_after (tc, shared_ptr<Job> (new CheckHashesJob (_fs, _opt, _log, tc)));
}
set_progress (1);
diff --git a/src/lib/check_hashes_job.h b/src/lib/check_hashes_job.h
index b59cf031b..6a68e936c 100644
--- a/src/lib/check_hashes_job.h
+++ b/src/lib/check_hashes_job.h
@@ -22,7 +22,7 @@
class CheckHashesJob : public Job
{
public:
- CheckHashesJob (boost::shared_ptr<const FilmState> s, boost::shared_ptr<const Options> o, Log* l);
+ CheckHashesJob (boost::shared_ptr<const FilmState> s, boost::shared_ptr<const Options> o, Log* l, boost::shared_ptr<Job> req);
std::string name () const;
void run ();
diff --git a/src/lib/copy_from_dvd_job.cc b/src/lib/copy_from_dvd_job.cc
index d1000f54c..f7281fc10 100644
--- a/src/lib/copy_from_dvd_job.cc
+++ b/src/lib/copy_from_dvd_job.cc
@@ -35,8 +35,8 @@ using namespace boost;
/** @param fs FilmState for the film to write DVD data into.
* @param l Log that we can write to.
*/
-CopyFromDVDJob::CopyFromDVDJob (shared_ptr<const FilmState> fs, Log* l)
- : Job (fs, shared_ptr<Options> (), l)
+CopyFromDVDJob::CopyFromDVDJob (shared_ptr<const FilmState> fs, Log* l, shared_ptr<Job> req)
+ : Job (fs, shared_ptr<Options> (), l, req)
{
}
diff --git a/src/lib/copy_from_dvd_job.h b/src/lib/copy_from_dvd_job.h
index 6b56f6f0a..ce3837100 100644
--- a/src/lib/copy_from_dvd_job.h
+++ b/src/lib/copy_from_dvd_job.h
@@ -29,7 +29,7 @@
class CopyFromDVDJob : public Job
{
public:
- CopyFromDVDJob (boost::shared_ptr<const FilmState>, Log *);
+ CopyFromDVDJob (boost::shared_ptr<const FilmState>, Log *, boost::shared_ptr<Job> req);
std::string name () const;
void run ();
diff --git a/src/lib/examine_content_job.cc b/src/lib/examine_content_job.cc
index d77ede2f9..36b4cbabc 100644
--- a/src/lib/examine_content_job.cc
+++ b/src/lib/examine_content_job.cc
@@ -30,8 +30,8 @@
using namespace std;
using namespace boost;
-ExamineContentJob::ExamineContentJob (shared_ptr<const FilmState> fs, Log* l)
- : Job (fs, shared_ptr<Options> (), l)
+ExamineContentJob::ExamineContentJob (shared_ptr<const FilmState> fs, Log* l, shared_ptr<Job> req)
+ : Job (fs, shared_ptr<Options> (), l, req)
{
}
diff --git a/src/lib/examine_content_job.h b/src/lib/examine_content_job.h
index d149341b4..3bbd673a8 100644
--- a/src/lib/examine_content_job.h
+++ b/src/lib/examine_content_job.h
@@ -31,7 +31,7 @@ class Decoder;
class ExamineContentJob : public Job
{
public:
- ExamineContentJob (boost::shared_ptr<const FilmState>, Log *);
+ ExamineContentJob (boost::shared_ptr<const FilmState>, Log *, boost::shared_ptr<Job> req);
~ExamineContentJob ();
std::string name () const;
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index 7bc579ba6..ca35c6e81 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -208,10 +208,8 @@ FFmpegDecoder::do_pass ()
int frame_finished;
- if (_opt->decode_video) {
- while (avcodec_decode_video2 (_video_codec_context, _frame, &frame_finished, &_packet) >= 0 && frame_finished) {
- process_video (_frame);
- }
+ while (avcodec_decode_video2 (_video_codec_context, _frame, &frame_finished, &_packet) >= 0 && frame_finished) {
+ process_video (_frame);
}
if (_audio_stream >= 0 && _opt->decode_audio) {
@@ -228,7 +226,7 @@ FFmpegDecoder::do_pass ()
return true;
}
- if (_packet.stream_index == _video_stream && _opt->decode_video) {
+ if (_packet.stream_index == _video_stream) {
int frame_finished;
if (avcodec_decode_video2 (_video_codec_context, _frame, &frame_finished, &_packet) >= 0 && frame_finished) {
@@ -275,7 +273,13 @@ FFmpegDecoder::length_in_frames () const
float
FFmpegDecoder::frames_per_second () const
{
- return av_q2d (_format_context->streams[_video_stream]->avg_frame_rate);
+ AVStream* s = _format_context->streams[_video_stream];
+
+ if (s->avg_frame_rate.num && s->avg_frame_rate.den) {
+ return av_q2d (s->avg_frame_rate);
+ }
+
+ return av_q2d (s->r_frame_rate);
}
int
diff --git a/src/lib/film.cc b/src/lib/film.cc
index 96dc3d3a4..95dc7b825 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -535,16 +535,18 @@ Film::make_dcp (bool transcode, int freq)
o->padding = format()->dcp_padding (this);
o->ratio = format()->ratio_as_float (this);
+ shared_ptr<Job> r;
+
if (transcode) {
if (_state.dcp_ab) {
- JobManager::instance()->add (shared_ptr<Job> (new ABTranscodeJob (fs, o, log ())));
+ r = JobManager::instance()->add (shared_ptr<Job> (new ABTranscodeJob (fs, o, log(), shared_ptr<Job> ())));
} else {
- JobManager::instance()->add (shared_ptr<Job> (new TranscodeJob (fs, o, log ())));
+ r = JobManager::instance()->add (shared_ptr<Job> (new TranscodeJob (fs, o, log(), shared_ptr<Job> ())));
}
}
- JobManager::instance()->add (shared_ptr<Job> (new CheckHashesJob (fs, o, log ())));
- JobManager::instance()->add (shared_ptr<Job> (new MakeDCPJob (fs, o, log ())));
+ r = JobManager::instance()->add (shared_ptr<Job> (new CheckHashesJob (fs, o, log(), r)));
+ JobManager::instance()->add (shared_ptr<Job> (new MakeDCPJob (fs, o, log(), r)));
}
shared_ptr<FilmState>
@@ -583,7 +585,7 @@ Film::examine_content ()
return;
}
- _examine_content_job.reset (new ExamineContentJob (state_copy (), log ()));
+ _examine_content_job.reset (new ExamineContentJob (state_copy (), log(), shared_ptr<Job> ()));
_examine_content_job->Finished.connect (sigc::mem_fun (*this, &Film::examine_content_post_gui));
JobManager::instance()->add (_examine_content_job);
}
@@ -632,14 +634,14 @@ Film::set_still_duration (int d)
void
Film::send_dcp_to_tms ()
{
- shared_ptr<Job> j (new SCPDCPJob (state_copy (), log ()));
+ shared_ptr<Job> j (new SCPDCPJob (state_copy (), log(), shared_ptr<Job> ()));
JobManager::instance()->add (j);
}
void
Film::copy_from_dvd ()
{
- shared_ptr<Job> j (new CopyFromDVDJob (state_copy (), log ()));
+ shared_ptr<Job> j (new CopyFromDVDJob (state_copy (), log(), shared_ptr<Job> ()));
j->Finished.connect (sigc::mem_fun (*this, &Film::copy_from_dvd_post_gui));
JobManager::instance()->add (j);
}
diff --git a/src/lib/film_state.cc b/src/lib/film_state.cc
index 1872d9e76..03d4cae83 100644
--- a/src/lib/film_state.cc
+++ b/src/lib/film_state.cc
@@ -289,18 +289,14 @@ FilmState::bytes_per_sample () const
int
FilmState::target_sample_rate () const
{
+ /* Resample to a DCI-approved sample rate */
double t = dcp_audio_sample_rate (audio_sample_rate);
+
+ /* Compensate for the fact that video will be rounded to the
+ nearest integer number of frames per second.
+ */
if (rint (frames_per_second) != frames_per_second) {
- if (fabs (frames_per_second - 23.976) < 1e-6 || (fabs (frames_per_second - 29.97) < 1e-6)) {
- /* 24fps or 30fps drop-frame ie {24,30} * 1000 / 1001 frames per second;
- hence we need to resample the audio to dcp_audio_sample_rate * 1000 / 1001
- so that when we play it back at dcp_audio_sample_rate it is sped up
- by the same amount that the video is
- */
- t *= double(1000) / 1001;
- } else {
- throw EncodeError ("unknown fractional frame rate");
- }
+ t *= frames_per_second / rint (frames_per_second);
}
return rint (t);
diff --git a/src/lib/j2k_wav_encoder.cc b/src/lib/j2k_wav_encoder.cc
index 2f892948d..a1f70a08a 100644
--- a/src/lib/j2k_wav_encoder.cc
+++ b/src/lib/j2k_wav_encoder.cc
@@ -149,7 +149,7 @@ J2KWAVEncoder::encoder_thread (ServerDescription* server)
while (1) {
- TIMING ("encoder thread %1 sleeps", pthread_self ());
+ TIMING ("encoder thread %1 sleeps", boost::this_thread::get_id());
boost::mutex::scoped_lock lock (_worker_mutex);
while (_queue.empty () && !_process_end) {
_worker_condition.wait (lock);
@@ -159,9 +159,9 @@ J2KWAVEncoder::encoder_thread (ServerDescription* server)
return;
}
- TIMING ("encoder thread %1 wakes with queue of %2", pthread_self(), _queue.size());
+ TIMING ("encoder thread %1 wakes with queue of %2", boost::this_thread::get_id(), _queue.size());
boost::shared_ptr<DCPVideoFrame> vf = _queue.front ();
- _log->log (String::compose ("Encoder thread %1 pops frame %2 from queue", pthread_self(), vf->frame()));
+ _log->log (String::compose ("Encoder thread %1 pops frame %2 from queue", boost::this_thread::get_id(), vf->frame()));
_queue.pop_front ();
lock.unlock ();
@@ -193,9 +193,9 @@ J2KWAVEncoder::encoder_thread (ServerDescription* server)
} else {
try {
- TIMING ("encoder thread %1 begins local encode of %2", pthread_self(), vf->frame());
+ TIMING ("encoder thread %1 begins local encode of %2", boost::this_thread::get_id(), vf->frame());
encoded = vf->encode_locally ();
- TIMING ("encoder thread %1 finishes local encode of %2", pthread_self(), vf->frame());
+ TIMING ("encoder thread %1 finishes local encode of %2", boost::this_thread::get_id(), vf->frame());
} catch (std::exception& e) {
_log->log (String::compose ("Local encode failed (%1)", e.what ()));
}
@@ -206,7 +206,7 @@ J2KWAVEncoder::encoder_thread (ServerDescription* server)
frame_done (vf->frame ());
} else {
lock.lock ();
- _log->log (String::compose ("Encoder thread %1 pushes frame %2 back onto queue after failure", pthread_self(), vf->frame()));
+ _log->log (String::compose ("Encoder thread %1 pushes frame %2 back onto queue after failure", boost::this_thread::get_id(), vf->frame()));
_queue.push_front (vf);
lock.unlock ();
}
diff --git a/src/lib/job.cc b/src/lib/job.cc
index 39ce4173a..d3871bf72 100644
--- a/src/lib/job.cc
+++ b/src/lib/job.cc
@@ -34,10 +34,11 @@ using namespace boost;
* @param o Options.
* @param l A log that we can write to.
*/
-Job::Job (shared_ptr<const FilmState> s, shared_ptr<const Options> o, Log* l)
+Job::Job (shared_ptr<const FilmState> s, shared_ptr<const Options> o, Log* l, shared_ptr<Job> req)
: _fs (s)
, _opt (o)
, _log (l)
+ , _required (req)
, _state (NEW)
, _start_time (0)
, _progress_unknown (false)
@@ -80,6 +81,13 @@ Job::run_wrapper ()
}
}
+bool
+Job::is_new () const
+{
+ boost::mutex::scoped_lock lm (_state_mutex);
+ return _state == NEW;
+}
+
/** @return true if the job is running */
bool
Job::running () const
diff --git a/src/lib/job.h b/src/lib/job.h
index 802bf468d..f50ed0784 100644
--- a/src/lib/job.h
+++ b/src/lib/job.h
@@ -39,7 +39,7 @@ class Options;
class Job : public boost::enable_shared_from_this<Job>
{
public:
- Job (boost::shared_ptr<const FilmState> s, boost::shared_ptr<const Options> o, Log* l);
+ Job (boost::shared_ptr<const FilmState> s, boost::shared_ptr<const Options> o, Log* l, boost::shared_ptr<Job> req);
/** @return user-readable name of this job */
virtual std::string name () const = 0;
@@ -48,6 +48,7 @@ public:
void start ();
+ bool is_new () const;
bool running () const;
bool finished () const;
bool finished_ok () const;
@@ -66,6 +67,10 @@ public:
void emit_finished ();
+ boost::shared_ptr<Job> required () const {
+ return _required;
+ }
+
/** Emitted from the GUI thread */
sigc::signal0<void> Finished;
@@ -95,6 +100,8 @@ 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 76fcc6c5d..562c887de 100644
--- a/src/lib/job_manager.cc
+++ b/src/lib/job_manager.cc
@@ -37,11 +37,12 @@ JobManager::JobManager ()
boost::thread (boost::bind (&JobManager::scheduler, this));
}
-void
+shared_ptr<Job>
JobManager::add (shared_ptr<Job> j)
{
boost::mutex::scoped_lock lm (_mutex);
_jobs.push_back (j);
+ return j;
}
void
@@ -93,18 +94,15 @@ JobManager::scheduler ()
while (1) {
{
boost::mutex::scoped_lock lm (_mutex);
- int running = 0;
- shared_ptr<Job> first_new;
for (list<shared_ptr<Job> >::iterator i = _jobs.begin(); i != _jobs.end(); ++i) {
- if ((*i)->running ()) {
- ++running;
- } else if (!(*i)->finished () && first_new == 0) {
- first_new = *i;
- }
-
- if (running == 0 && first_new) {
- first_new->start ();
- break;
+ if ((*i)->is_new()) {
+ shared_ptr<Job> r = (*i)->required ();
+ if (!r || r->finished_ok ()) {
+ (*i)->start ();
+
+ /* Only start one job at once */
+ break;
+ }
}
}
}
diff --git a/src/lib/job_manager.h b/src/lib/job_manager.h
index 8b79fd67d..4b70738f0 100644
--- a/src/lib/job_manager.h
+++ b/src/lib/job_manager.h
@@ -28,16 +28,12 @@ class Job;
/** @class JobManager
* @brief A simple scheduler for jobs.
- *
- * JobManager simply keeps a list of pending jobs, and assumes that all the jobs
- * are sufficiently CPU intensive that there is no point running them in parallel;
- * so jobs are just run one after the other.
*/
class JobManager
{
public:
- void add (boost::shared_ptr<Job>);
+ boost::shared_ptr<Job> add (boost::shared_ptr<Job>);
void add_after (boost::shared_ptr<Job> after, boost::shared_ptr<Job> j);
std::list<boost::shared_ptr<Job> > get () const;
bool work_to_do () const;
diff --git a/src/lib/make_dcp_job.cc b/src/lib/make_dcp_job.cc
index ae4bb4fbe..b42a38429 100644
--- a/src/lib/make_dcp_job.cc
+++ b/src/lib/make_dcp_job.cc
@@ -43,8 +43,8 @@ using namespace boost;
* @param o Options.
* @param l Log.
*/
-MakeDCPJob::MakeDCPJob (shared_ptr<const FilmState> s, shared_ptr<const Options> o, Log* l)
- : Job (s, o, l)
+MakeDCPJob::MakeDCPJob (shared_ptr<const FilmState> s, shared_ptr<const Options> o, Log* l, shared_ptr<Job> req)
+ : Job (s, o, l, req)
{
}
diff --git a/src/lib/make_dcp_job.h b/src/lib/make_dcp_job.h
index 677bed424..c350a819c 100644
--- a/src/lib/make_dcp_job.h
+++ b/src/lib/make_dcp_job.h
@@ -29,7 +29,7 @@
class MakeDCPJob : public Job
{
public:
- MakeDCPJob (boost::shared_ptr<const FilmState>, boost::shared_ptr<const Options>, Log *);
+ MakeDCPJob (boost::shared_ptr<const FilmState>, boost::shared_ptr<const Options>, Log *, boost::shared_ptr<Job> req);
std::string name () const;
void run ();
diff --git a/src/lib/options.h b/src/lib/options.h
index 1156ece1d..39068c24f 100644
--- a/src/lib/options.h
+++ b/src/lib/options.h
@@ -39,7 +39,7 @@ public:
Options (std::string f, std::string e, std::string m)
: padding (0)
, apply_crop (true)
- , decode_video (true)
+ , black_after (0)
, decode_video_frequency (0)
, decode_audio (true)
, _frame_out_path (f)
@@ -93,7 +93,6 @@ public:
int padding; ///< number of pixels of padding (in terms of the output size) each side of the image
bool apply_crop; ///< true to apply cropping
int black_after; ///< first frame for which to output a black frame, rather than the actual video content, or 0 for none
- bool decode_video; ///< true to decode video, otherwise false
int decode_video_frequency; ///< skip frames so that this many are decoded in all (or 0) (for generating thumbnails)
bool decode_audio; ///< true to decode audio, otherwise false
diff --git a/src/lib/scp_dcp_job.cc b/src/lib/scp_dcp_job.cc
index dac4a602c..90122cea7 100644
--- a/src/lib/scp_dcp_job.cc
+++ b/src/lib/scp_dcp_job.cc
@@ -91,8 +91,8 @@ public:
};
-SCPDCPJob::SCPDCPJob (shared_ptr<const FilmState> s, Log* l)
- : Job (s, shared_ptr<const Options> (), l)
+SCPDCPJob::SCPDCPJob (shared_ptr<const FilmState> s, Log* l, shared_ptr<Job> req)
+ : Job (s, shared_ptr<const Options> (), l, req)
, _status ("Waiting")
{
diff --git a/src/lib/scp_dcp_job.h b/src/lib/scp_dcp_job.h
index 1c795be47..b457fdf5b 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<const FilmState>, Log *);
+ SCPDCPJob (boost::shared_ptr<const FilmState>, Log *, boost::shared_ptr<Job> req);
std::string name () const;
void run ();
diff --git a/src/lib/thumbs_job.cc b/src/lib/thumbs_job.cc
index f6ed75ff7..779a1d5d1 100644
--- a/src/lib/thumbs_job.cc
+++ b/src/lib/thumbs_job.cc
@@ -35,8 +35,8 @@ using namespace boost;
* @param o Options.
* @param l A log that we can write to.
*/
-ThumbsJob::ThumbsJob (shared_ptr<const FilmState> s, shared_ptr<const Options> o, Log* l)
- : Job (s, o, l)
+ThumbsJob::ThumbsJob (shared_ptr<const FilmState> s, shared_ptr<const Options> o, Log* l, shared_ptr<Job> req)
+ : Job (s, o, l, req)
{
}
diff --git a/src/lib/thumbs_job.h b/src/lib/thumbs_job.h
index 1dd69a0f9..f7e30d576 100644
--- a/src/lib/thumbs_job.h
+++ b/src/lib/thumbs_job.h
@@ -31,7 +31,7 @@ class FilmState;
class ThumbsJob : public Job
{
public:
- ThumbsJob (boost::shared_ptr<const FilmState> s, boost::shared_ptr<const Options> o, Log* l);
+ ThumbsJob (boost::shared_ptr<const FilmState> s, boost::shared_ptr<const Options> o, Log* l, boost::shared_ptr<Job> req);
std::string name () const;
void run ();
};
diff --git a/src/lib/transcode_job.cc b/src/lib/transcode_job.cc
index e1ba82359..a53a4b6ad 100644
--- a/src/lib/transcode_job.cc
+++ b/src/lib/transcode_job.cc
@@ -39,8 +39,8 @@ using namespace boost;
* @param o Options.
* @param l A log that we can write to.
*/
-TranscodeJob::TranscodeJob (shared_ptr<const FilmState> s, shared_ptr<const Options> o, Log* l)
- : Job (s, o, l)
+TranscodeJob::TranscodeJob (shared_ptr<const FilmState> s, shared_ptr<const Options> o, Log* l, shared_ptr<Job> req)
+ : Job (s, o, l, req)
{
}
diff --git a/src/lib/transcode_job.h b/src/lib/transcode_job.h
index 737f10de9..fe68a4910 100644
--- a/src/lib/transcode_job.h
+++ b/src/lib/transcode_job.h
@@ -32,7 +32,7 @@ class Encoder;
class TranscodeJob : public Job
{
public:
- TranscodeJob (boost::shared_ptr<const FilmState> s, boost::shared_ptr<const Options> o, Log* l);
+ TranscodeJob (boost::shared_ptr<const FilmState> s, boost::shared_ptr<const Options> o, Log* l, boost::shared_ptr<Job> req);
std::string name () const;
void run ();