#include "lib/ratio.h"
#include "lib/video_content.h"
#include "lib/audio_content.h"
+#include "lib/dcpomatic_log.h"
#include <dcp/version.h>
#include <boost/foreach.hpp>
#include <getopt.h>
<< " -d, --dcp-path echo DCP's path to stdout on successful completion (implies -n)\n"
<< " -c, --config <dir> 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"
<< "<FILM> is the film directory.\n";
}
bool list_servers_ = false;
bool dcp_path = false;
optional<boost::filesystem::path> config;
+ bool check = true;
int option_index = 0;
while (true) {
{ "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;
case 'c':
config = optarg;
break;
+ case 'B':
+ check = false;
+ break;
}
}
if (config) {
- Config::override_path = *config;
+ State::override_path = *config;
}
if (servers) {
exit (EXIT_SUCCESS);
}
+ dcpomatic_log = film->log ();
+
ContentList content = film->content ();
for (ContentList::const_iterator i = content.begin(); i != content.end(); ++i) {
vector<boost::filesystem::path> paths = (*i)->paths ();
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<shared_ptr<Job> > 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<Job> 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) {