X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_create.cc;h=73bcfd882c395cb28a4f8a725e1dd7fd7edce6da;hb=7b7455685ef18e7b84909f4b0a81a985c60940da;hp=857359117c3c64309b2c4a35f0c1fcba452bfa5f;hpb=2b870d03ce118f9d9146f53658d3a9a2e2626600;p=dcpomatic.git diff --git a/src/tools/dcpomatic_create.cc b/src/tools/dcpomatic_create.cc index 857359117..73bcfd882 100644 --- a/src/tools/dcpomatic_create.cc +++ b/src/tools/dcpomatic_create.cc @@ -18,40 +18,41 @@ */ -#include "lib/version.h" -#include "lib/film.h" -#include "lib/util.h" +#include "lib/audio_content.h" +#include "lib/config.h" #include "lib/content_factory.h" -#include "lib/job_manager.h" -#include "lib/signal_manager.h" -#include "lib/job.h" -#include "lib/dcp_content_type.h" -#include "lib/ratio.h" -#include "lib/image_content.h" -#include "lib/video_content.h" +#include "lib/create_cli.h" #include "lib/cross.h" -#include "lib/config.h" #include "lib/dcp_content.h" -#include "lib/create_cli.h" -#include "lib/version.h" +#include "lib/dcp_content_type.h" #include "lib/dcpomatic_log.h" +#include "lib/film.h" +#include "lib/image_content.h" +#include "lib/job.h" +#include "lib/job_manager.h" +#include "lib/ratio.h" +#include "lib/signal_manager.h" +#include "lib/util.h" +#include "lib/version.h" +#include "lib/version.h" +#include "lib/video_content.h" #include #include #include -#include #include -#include -#include #include +#include #include +#include -using std::string; -using std::cout; using std::cerr; -using std::list; +using std::cout; +using std::dynamic_pointer_cast; using std::exception; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::list; +using std::make_shared; +using std::shared_ptr; +using std::string; using boost::optional; class SimpleSignalManager : public SignalManager @@ -85,10 +86,10 @@ main (int argc, char* argv[]) } signal_manager = new SimpleSignalManager (); - JobManager* jm = JobManager::instance (); + auto jm = JobManager::instance (); try { - shared_ptr film (new Film(cc.output_dir)); + auto film = std::make_shared(cc.output_dir); dcpomatic_log = film->log (); dcpomatic_log->set_types (Config::instance()->log_types()); if (cc.template_name) { @@ -100,30 +101,29 @@ main (int argc, char* argv[]) film->set_container (cc.container_ratio); } film->set_dcp_content_type (cc.dcp_content_type); - film->set_interop (cc.standard == dcp::INTEROP); + film->set_interop (cc.standard == dcp::Standard::INTEROP); film->set_use_isdcf_name (!cc.no_use_isdcf_name); - film->set_signed (!cc.no_sign); film->set_encrypted (cc.encrypt); film->set_three_d (cc.threed); if (cc.fourk) { - film->set_resolution (RESOLUTION_4K); + film->set_resolution (Resolution::FOUR_K); } if (cc.j2k_bandwidth) { film->set_j2k_bandwidth (*cc.j2k_bandwidth); } - BOOST_FOREACH (CreateCLI::Content i, cc.content) { - boost::filesystem::path const can = boost::filesystem::canonical (i.path); - list > content; + for (auto i: cc.content) { + auto const can = boost::filesystem::canonical (i.path); + list> content; if (boost::filesystem::exists (can / "ASSETMAP") || (boost::filesystem::exists (can / "ASSETMAP.xml"))) { - content.push_back (shared_ptr(new DCPContent(can))); + content.push_back (make_shared(can)); } else { /* I guess it's not a DCP */ content = content_factory (can); } - BOOST_FOREACH (shared_ptr j, content) { + for (auto j: content) { film->examine_and_add_content (j); } @@ -133,7 +133,7 @@ main (int argc, char* argv[]) while (signal_manager->ui_idle() > 0) {} - BOOST_FOREACH (shared_ptr j, content) { + for (auto j: content) { if (j->video) { j->video->set_frame_type (i.frame_type); } @@ -144,15 +144,15 @@ main (int argc, char* argv[]) film->set_video_frame_rate (*cc.dcp_frame_rate); } - BOOST_FOREACH (shared_ptr i, film->content()) { - shared_ptr ic = dynamic_pointer_cast (i); + for (auto i: film->content()) { + auto ic = dynamic_pointer_cast (i); if (ic && ic->still()) { ic->video->set_length (cc.still_length * 24); } } if (jm->errors ()) { - BOOST_FOREACH (shared_ptr i, jm->get()) { + for (auto i: jm->get()) { if (i->finished_in_error()) { cerr << i->error_summary() << "\n" << i->error_details() << "\n";