}
if (_scheduler) {
+ DCPOMATIC_ASSERT (_scheduler->joinable ());
_scheduler->join ();
}
}
if (active_job != _last_active_job) {
+ emit (boost::bind (boost::ref (ActiveJobsChanged), _last_active_job, active_job));
_last_active_job = active_job;
- emit (boost::bind (boost::ref (ActiveJobsChanged), active_job));
}
dcpomatic_sleep (1);
function<void()> ready
)
{
- shared_ptr<AnalyseAudioJob> job;
-
{
boost::mutex::scoped_lock lm (_mutex);
BOOST_FOREACH (shared_ptr<Job> i, _jobs) {
shared_ptr<AnalyseAudioJob> a = dynamic_pointer_cast<AnalyseAudioJob> (i);
- if (a && film->audio_analysis_path (a->playlist ()) == film->audio_analysis_path (playlist)) {
+ if (a && a->playlist () == playlist) {
i->when_finished (connection, ready);
return;
}
}
+ }
+
+ shared_ptr<AnalyseAudioJob> job;
+
+ {
+ boost::mutex::scoped_lock lm (_mutex);
job.reset (new AnalyseAudioJob (film, playlist));
connection = job->Finished.connect (ready);