Merge remote-tracking branch 'origin/master' into 2.0
[dcpomatic.git] / src / tools / dcpomatic_cli.cc
index 73067f406d559996ee3255157b1315edde14b039..7dd820b9571bc9becf931b176aabcd975e75d996 100644 (file)
@@ -20,7 +20,7 @@
 #include <iostream>
 #include <iomanip>
 #include <getopt.h>
-#include <libdcp/version.h>
+#include <dcp/version.h>
 #include "lib/film.h"
 #include "lib/filter.h"
 #include "lib/transcode_job.h"
@@ -65,12 +65,11 @@ main (int argc, char* argv[])
        string film_dir;
        bool progress = true;
        bool no_remote = false;
-       string log_types = "general,warning,error";
        int json_port = 0;
        bool keep_going = false;
 
        int option_index = 0;
-       while (1) {
+       while (true) {
                static struct option long_options[] = {
                        { "version", no_argument, 0, 'v'},
                        { "help", no_argument, 0, 'h'},
@@ -78,13 +77,12 @@ main (int argc, char* argv[])
                        { "flags", no_argument, 0, 'f'},
                        { "no-progress", no_argument, 0, 'n'},
                        { "no-remote", no_argument, 0, 'r'},
-                       { "log-types", required_argument, 0, 'l' },
                        { "json", required_argument, 0, 'j' },
                        { "keep-going", no_argument, 0, 'k' },
                        { 0, 0, 0, 0 }
                };
 
-               int c = getopt_long (argc, argv, "vhdfnrl:j:k", long_options, &option_index);
+               int c = getopt_long (argc, argv, "vhdfnrj:k", long_options, &option_index);
 
                if (c == -1) {
                        break;
@@ -109,9 +107,6 @@ main (int argc, char* argv[])
                case 'r':
                        no_remote = true;
                        break;
-               case 'l':
-                       log_types = optarg;
-                       break;
                case 'j':
                        json_port = atoi (optarg);
                        break;
@@ -155,8 +150,6 @@ main (int argc, char* argv[])
                exit (EXIT_FAILURE);
        }
 
-       film->log()->set_types (log_types);
-
        cout << "\nMaking DCP for " << film->name() << "\n";
 //     cout << "Content: " << film->content() << "\n";
 //     pair<string, string> const f = Filter::ffmpeg_strings (film->filters ());
@@ -219,7 +212,7 @@ main (int argc, char* argv[])
        }
 
        if (keep_going) {
-               while (1) {
+               while (true) {
                        dcpomatic_sleep (3600);
                }
        }