Add FilmViewer::time_until_next_frame.
[dcpomatic.git] / src / tools / dcpomatic_create.cc
index 3ab84d1161dc9524e92dc6494bccd6a953ae1496..68ae09c31fdf5bfa446903ad4db6a0b2e63b0b34 100644 (file)
@@ -34,6 +34,7 @@
 #include "lib/dcp_content.h"
 #include "lib/create_cli.h"
 #include "lib/version.h"
+#include "lib/dcpomatic_log.h"
 #include <dcp/exceptions.h>
 #include <libxml++/libxml++.h>
 #include <boost/filesystem.hpp>
@@ -75,7 +76,7 @@ main (int argc, char* argv[])
        }
 
        if (cc.version) {
-               cerr << "dcpomatic version " << dcpomatic_version << " " << dcpomatic_git_commit << "\n";
+               cout << "dcpomatic version " << dcpomatic_version << " " << dcpomatic_git_commit << "\n";
                exit (EXIT_SUCCESS);
        }
 
@@ -88,6 +89,8 @@ main (int argc, char* argv[])
 
        try {
                shared_ptr<Film> 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());
                }
@@ -121,7 +124,7 @@ main (int argc, char* argv[])
                        }
 
                        while (jm->work_to_do ()) {
-                               dcpomatic_sleep (1);
+                               dcpomatic_sleep_seconds (1);
                        }
 
                        while (signal_manager->ui_idle() > 0) {}