X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ffilm.cc;h=548c51796f4c10352a8a17aed9c4fa5da8b5206b;hb=0242efb9802d7bcbde0701a7267972d4dbe5abb8;hp=5310ef71fcf8d37e0b27c6771f3747d6187178bf;hpb=92b6430402753a572c33d594ba0745a4e461edf4;p=dcpomatic.git diff --git a/src/lib/film.cc b/src/lib/film.cc index 5310ef71f..548c51796 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -27,7 +27,7 @@ #include "util.h" #include "job_manager.h" #include "transcode_job.h" -#include "scp_dcp_job.h" +#include "upload_job.h" #include "log.h" #include "exceptions.h" #include "examine_content_job.h" @@ -45,7 +45,7 @@ #include "md5_digester.h" #include #include -#include +#include #include #include #include @@ -87,7 +87,7 @@ using boost::starts_with; using boost::optional; using boost::is_any_of; using dcp::Size; -using dcp::Signer; +using dcp::CertificateChain; #define LOG_GENERAL(...) log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL); #define LOG_GENERAL_NC(...) log()->log (__VA_ARGS__, Log::TYPE_GENERAL); @@ -241,7 +241,15 @@ Film::audio_analysis_path (shared_ptr playlist) const digester.add (ac->digest ()); digester.add (ac->audio_mapping().digest ()); - digester.add (ac->audio_gain ()); + if (playlist->content().size() != 1) { + /* Analyses should be considered equal regardless of gain + if they were made from just one piece of content. This + is because we can fake any gain change in a single-content + analysis at the plotting stage rather than having to + recompute it. + */ + digester.add (ac->audio_gain ()); + } } if (audio_processor ()) { @@ -294,7 +302,7 @@ Film::make_dcp () void Film::send_dcp_to_tms () { - shared_ptr j (new SCPDCPJob (shared_from_this())); + shared_ptr j (new UploadJob (shared_from_this())); JobManager::instance()->add (j); } @@ -583,7 +591,9 @@ Film::isdcf_name (bool if_created_now) const if (!dm.territory.empty ()) { d << "_" << dm.territory; - if (!dm.rating.empty ()) { + if (dm.rating.empty ()) { + d << "-NR"; + } else { d << "-" << dm.rating; } } @@ -988,6 +998,8 @@ Film::active_frame_rate_change (DCPTime t) const void Film::playlist_content_changed (boost::weak_ptr c, int p, bool frequent) { + _dirty = true; + if (p == VideoContentProperty::VIDEO_FRAME_RATE) { set_video_frame_rate (_playlist->best_dcp_frame_rate ()); } else if (p == AudioContentProperty::AUDIO_STREAMS) { @@ -1051,7 +1063,7 @@ Film::make_kdm ( ) const { shared_ptr cpl (new dcp::CPL (cpl_file)); - shared_ptr signer = Config::instance()->signer(); + shared_ptr signer = Config::instance()->signer(); if (!signer->valid ()) { throw InvalidSignerError (); }