X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_create.cc;h=90025c5bc5f4702310ee0632a17751c2839e6d31;hb=563fc75855b9649cf135cf137cc1b0c43ebc8286;hp=40d764c2b64e430e8c6fb6521d3fa760fd39571f;hpb=d6e7451225ededfc352b3e17b50f91afccca03a3;p=dcpomatic.git diff --git a/src/tools/dcpomatic_create.cc b/src/tools/dcpomatic_create.cc index 40d764c2b..90025c5bc 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,8 +76,8 @@ 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) { @@ -88,19 +89,24 @@ 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()); } film->set_name (cc.name); - film->set_container (cc.container_ratio); + if (cc.container_ratio) { + film->set_container (cc.container_ratio); + } film->set_dcp_content_type (cc.dcp_content_type); film->set_interop (cc.standard == dcp::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); - film->set_resolution (cc.fourk ? RESOLUTION_4K : RESOLUTION_2K); + if (cc.fourk) { + film->set_resolution (RESOLUTION_4K); + } if (cc.j2k_bandwidth) { film->set_j2k_bandwidth (*cc.j2k_bandwidth); } @@ -121,14 +127,13 @@ main (int argc, char* argv[]) } while (jm->work_to_do ()) { - dcpomatic_sleep (1); + dcpomatic_sleep_seconds (1); } while (signal_manager->ui_idle() > 0) {} BOOST_FOREACH (shared_ptr j, content) { if (j->video) { - j->video->set_scale (VideoContentScale(cc.content_ratio)); j->video->set_frame_type (i.frame_type); } }