X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_create.cc;h=68ae09c31fdf5bfa446903ad4db6a0b2e63b0b34;hb=990f879d9af6300068af44c431b1a8e158e7f7a0;hp=66a1c0dab6407613d0042103951d5f39b9560723;hpb=8019ac9fcdb3d2d96c70d2c185d67557190d1726;p=dcpomatic.git diff --git a/src/tools/dcpomatic_create.cc b/src/tools/dcpomatic_create.cc index 66a1c0dab..68ae09c31 100644 --- a/src/tools/dcpomatic_create.cc +++ b/src/tools/dcpomatic_create.cc @@ -34,6 +34,7 @@ #include "lib/dcp_content.h" #include "lib/create_cli.h" #include "lib/version.h" +#include "lib/dcpomatic_log.h" #include #include #include @@ -75,12 +76,12 @@ main (int argc, char* argv[]) } if (cc.version) { - cerr << "dcpomatic version " << dcpomatic_version << " " << dcpomatic_git_commit << "\n"; - exit (1); + cout << "dcpomatic version " << dcpomatic_version << " " << dcpomatic_git_commit << "\n"; + exit (EXIT_SUCCESS); } if (cc.config_dir) { - Config::override_path = *cc.config_dir; + State::override_path = *cc.config_dir; } signal_manager = new SimpleSignalManager (); @@ -88,6 +89,8 @@ main (int argc, char* argv[]) try { shared_ptr film (new Film(cc.output_dir)); + dcpomatic_log = film->log (); + dcpomatic_log->set_types (Config::instance()->log_types()); if (cc.template_name) { film->use_template (cc.template_name.get()); } @@ -100,6 +103,10 @@ main (int argc, char* argv[]) film->set_signed (!cc.no_sign); film->set_encrypted (cc.encrypt); film->set_three_d (cc.threed); + film->set_resolution (cc.fourk ? RESOLUTION_4K : RESOLUTION_2K); + 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); @@ -117,7 +124,7 @@ main (int argc, char* argv[]) } while (jm->work_to_do ()) { - dcpomatic_sleep (1); + dcpomatic_sleep_seconds (1); } while (signal_manager->ui_idle() > 0) {}