Split playlist files up; fix build.
[dcpomatic.git] / src / tools / makedcp.cc
index 900c31bfc9fca7630bc8002ba833128be88563ff..85134b3c543ba8238baa49371038eadb2ff59ed3 100644 (file)
@@ -26,7 +26,6 @@
 #include "film.h"
 #include "filter.h"
 #include "transcode_job.h"
-#include "make_dcp_job.h"
 #include "job_manager.h"
 #include "ab_transcode_job.h"
 #include "util.h"
@@ -147,19 +146,20 @@ main (int argc, char* argv[])
        film->log()->set_level ((Log::Level) log_level);
 
        cout << "\nMaking ";
-       if (film->dcp_ab()) {
+       if (film->ab()) {
                cout << "A/B ";
        }
        cout << "DCP for " << film->name() << "\n";
        cout << "Test mode: " << (test_mode ? "yes" : "no") << "\n";
-       cout << "Content: " << film->content() << "\n";
+//     cout << "Content: " << film->content() << "\n";
        pair<string, string> const f = Filter::ffmpeg_strings (film->filters ());
        cout << "Filters: " << f.first << " " << f.second << "\n";
 
-       film->make_dcp (true);
+       film->make_dcp ();
 
        bool should_stop = false;
        bool first = true;
+       bool error = false;
        while (!should_stop) {
 
                dvdomatic_sleep (5);
@@ -195,6 +195,7 @@ main (int argc, char* argv[])
 
                        if ((*i)->finished_in_error ()) {
                                ++finished_in_error;
+                               error = true;
                        }
 
                        if (!progress && (*i)->finished_in_error ()) {
@@ -210,7 +211,7 @@ main (int argc, char* argv[])
                }
        }
 
-       return 0;
+       return error ? EXIT_FAILURE : EXIT_SUCCESS;
 }