X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_cli.cc;h=edf4808a0d9e7a158de7e08187bb71a839aea464;hb=44da1840ca17d0945cb1886bb17218990850894c;hp=f049c0c919cc6fc12a6b87150ba6b0a0b85a8976;hpb=985e727e001e1a92ae035364a9cbf1ff99522ff1;p=dcpomatic.git
diff --git a/src/tools/dcpomatic_cli.cc b/src/tools/dcpomatic_cli.cc
index f049c0c91..edf4808a0 100644
--- a/src/tools/dcpomatic_cli.cc
+++ b/src/tools/dcpomatic_cli.cc
@@ -68,6 +68,7 @@ help (string n)
<< " -d, --dcp-path echo DCP's path to stdout on successful completion (implies -n)\n"
<< " -c, --config
directory containing config.xml and cinemas.xml\n"
<< " --dump just dump a summary of the film's settings; don't encode\n"
+ << " --no-check don't check project's content files for changes before making the DCP\n"
<< "\n"
<< " is the film directory.\n";
}
@@ -95,8 +96,10 @@ print_dump (shared_ptr film)
<< "\tcrop left " << c->video->left_crop()
<< " right " << c->video->right_crop()
<< " top " << c->video->top_crop()
- << " bottom " << c->video->bottom_crop() << "\n"
- << "\tscale " << c->video->scale().name() << "\n";
+ << " bottom " << c->video->bottom_crop() << "\n";
+ if (c->video->custom_ratio()) {
+ cout << "\tscale to custom ratio " << *c->video->custom_ratio() << ":1\n";
+ }
if (c->video->colour_conversion()) {
if (c->video->colour_conversion().get().preset()) {
cout << "\tcolour conversion "
@@ -175,7 +178,7 @@ list_servers ()
}
}
- dcpomatic_sleep (1);
+ dcpomatic_sleep_seconds (1);
for (int i = 0; i < N; ++i) {
cout << "\033[1A\033[2K";
@@ -198,6 +201,7 @@ main (int argc, char* argv[])
bool list_servers_ = false;
bool dcp_path = false;
optional config;
+ bool check = true;
int option_index = 0;
while (true) {
@@ -216,10 +220,11 @@ main (int argc, char* argv[])
{ "config", required_argument, 0, 'c' },
/* Just using A, B, C ... from here on */
{ "dump", no_argument, 0, 'A' },
+ { "no-check", no_argument, 0, 'B' },
{ 0, 0, 0, 0 }
};
- int c = getopt_long (argc, argv, "vhfnrt:j:kAs:ldc:", long_options, &option_index);
+ int c = getopt_long (argc, argv, "vhfnrt:j:kAs:ldc:B", long_options, &option_index);
if (c == -1) {
break;
@@ -266,6 +271,9 @@ main (int argc, char* argv[])
case 'c':
config = optarg;
break;
+ case 'B':
+ check = false;
+ break;
}
}
@@ -349,69 +357,12 @@ main (int argc, char* argv[])
cout << "\nMaking DCP for " << film->name() << "\n";
}
- film->make_dcp ();
-
- bool should_stop = false;
- bool first = true;
- bool error = false;
- while (!should_stop) {
-
- dcpomatic_sleep (5);
-
- list > jobs = JobManager::instance()->get ();
-
- if (!first && progress) {
- for (size_t i = 0; i < jobs.size(); ++i) {
- cout << "\033[1A\033[2K";
- }
- cout.flush ();
- }
-
- first = false;
-
- int unfinished = 0;
- int finished_in_error = 0;
-
- BOOST_FOREACH (shared_ptr i, jobs) {
- if (progress) {
- cout << i->name();
- if (!i->sub_name().empty()) {
- cout << "; " << i->sub_name();
- }
- cout << ": ";
-
- if (i->progress ()) {
- cout << i->status() << " \n";
- } else {
- cout << ": Running \n";
- }
- }
-
- if (!i->finished ()) {
- ++unfinished;
- }
-
- if (i->finished_in_error ()) {
- ++finished_in_error;
- error = true;
- }
-
- if (!progress && i->finished_in_error ()) {
- /* We won't see this error if we haven't been showing progress,
- so show it now.
- */
- cout << i->status() << "\n";
- }
- }
-
- if (unfinished == 0 || finished_in_error != 0) {
- should_stop = true;
- }
- }
+ film->make_dcp (false, check);
+ bool const error = show_jobs_on_console (progress);
if (keep_going) {
while (true) {
- dcpomatic_sleep (3600);
+ dcpomatic_sleep_seconds (3600);
}
}