X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Ffilm.cc;h=3378b2042818a4f716f589c3aef2655c310f3120;hp=3cd3f0f21e7ec5c4e9546569b142a8b21155740b;hb=5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f;hpb=4e83acad0c2a5c528709a175a80261b8147d3b49 diff --git a/src/lib/film.cc b/src/lib/film.cc index 3cd3f0f21..3378b2042 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -62,6 +62,7 @@ #include #include #include +#include #include #include #include @@ -89,6 +90,7 @@ using boost::weak_ptr; using boost::dynamic_pointer_cast; using boost::optional; using boost::is_any_of; +using boost::make_shared; #define LOG_GENERAL(...) log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_GENERAL); #define LOG_GENERAL_NC(...) log()->log (__VA_ARGS__, LogEntry::TYPE_GENERAL); @@ -318,21 +320,21 @@ Film::make_dcp () throw MissingSettingError (_("name")); } - JobManager::instance()->add (shared_ptr (new TranscodeJob (shared_from_this()))); + JobManager::instance()->add (make_shared (shared_from_this())); } /** Start a job to send our DCP to the configured TMS */ void Film::send_dcp_to_tms () { - shared_ptr j (new UploadJob (shared_from_this())); + shared_ptr j = make_shared (shared_from_this()); JobManager::instance()->add (j); } shared_ptr Film::metadata () const { - shared_ptr doc (new xmlpp::Document); + shared_ptr doc = make_shared (); xmlpp::Element* root = doc->create_root_node ("Metadata"); root->add_child("Version")->add_child_text (raw_convert (current_state_version)); @@ -1003,7 +1005,7 @@ Film::content () const void Film::examine_content (shared_ptr c) { - shared_ptr j (new ExamineContentJob (shared_from_this(), c)); + shared_ptr j = make_shared (shared_from_this(), c); JobManager::instance()->add (j); } @@ -1014,7 +1016,7 @@ Film::examine_and_add_content (shared_ptr c) run_ffprobe (c->path(0), file ("ffprobe.log"), _log); } - shared_ptr j (new ExamineContentJob (shared_from_this(), c)); + shared_ptr j = make_shared (shared_from_this(), c); _job_connections.push_back ( j->Finished.connect (bind (&Film::maybe_add_content, this, weak_ptr (j), weak_ptr (c))) @@ -1038,7 +1040,7 @@ Film::maybe_add_content (weak_ptr j, weak_ptr c) add_content (content); if (Config::instance()->automatic_audio_analysis() && content->audio) { - shared_ptr playlist (new Playlist); + shared_ptr playlist = make_shared (); playlist->add (content); boost::signals2::connection c; JobManager::instance()->analyse_audio ( @@ -1180,7 +1182,7 @@ Film::make_kdm ( dcp::Formulation formulation ) const { - shared_ptr cpl (new dcp::CPL (cpl_file)); + shared_ptr cpl = make_shared (cpl_file); shared_ptr signer = Config::instance()->signer_chain (); if (!signer->valid ()) { throw InvalidSignerError ();