X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_batch.cc;h=dcda39fd8042c336a3302f293dcd5c21e69ea5e5;hb=dc5e11944a30a9d381dc0e67cf657c5f2cb65845;hp=06147060267d60e7ac17281ce4985a0c73b928e5;hpb=689fa55d1529ad88449ca464e9107c4dcc54d1cb;p=dcpomatic.git diff --git a/src/tools/dcpomatic_batch.cc b/src/tools/dcpomatic_batch.cc index 061470602..dcda39fd8 100644 --- a/src/tools/dcpomatic_batch.cc +++ b/src/tools/dcpomatic_batch.cc @@ -32,15 +32,19 @@ #include "lib/film.h" #include "lib/job.h" #include "lib/job_manager.h" +#include "lib/make_dcp.h" #include "lib/transcode_job.h" #include "lib/util.h" #include "lib/version.h" +#include +LIBDCP_DISABLE_WARNINGS #include #include #include #include #include #include +LIBDCP_ENABLE_WARNINGS #include #include @@ -211,7 +215,7 @@ public: } } - film->make_dcp (); + make_dcp (film, TranscodeJob::ChangedBehaviour::STOP); } catch (std::exception& e) { auto p = std_to_wx (path.string ()); auto b = p.ToUTF8 (); @@ -369,7 +373,7 @@ public: , _frame (frame) {} - void handle (shared_ptr socket) + void handle (shared_ptr socket) override { try { int const length = socket->read_uint32 (); @@ -390,14 +394,14 @@ private: class App : public wxApp { - bool OnInit () + bool OnInit () override { wxInitAllImageHandlers (); SetAppName (_("DCP-o-matic Batch Converter")); is_batch_converter = true; - Config::FailedToLoad.connect (boost::bind(&App::config_failed_to_load, this)); + Config::FailedToLoad.connect(boost::bind(&App::config_failed_to_load, this, _1)); Config::Warning.connect (boost::bind(&App::config_warning, this, _1)); auto splash = maybe_show_splash (); @@ -450,7 +454,7 @@ class App : public wxApp try { film = make_shared(i); film->read_metadata (); - film->make_dcp (); + make_dcp (film, TranscodeJob::ChangedBehaviour::EXAMINE_THEN_STOP); } catch (exception& e) { error_dialog ( 0, @@ -469,13 +473,13 @@ class App : public wxApp signal_manager->ui_idle (); } - void OnInitCmdLine (wxCmdLineParser& parser) + void OnInitCmdLine (wxCmdLineParser& parser) override { parser.SetDesc (command_line_description); parser.SetSwitchChars (wxT ("-")); } - bool OnCmdLineParsed (wxCmdLineParser& parser) + bool OnCmdLineParsed (wxCmdLineParser& parser) override { for (size_t i = 0; i < parser.GetParamCount(); ++i) { films_to_load.push_back (wx_to_std(parser.GetParam(i))); @@ -484,9 +488,9 @@ class App : public wxApp return true; } - void config_failed_to_load () + void config_failed_to_load(Config::LoadFailure what) { - message_dialog (_frame, _("The existing configuration failed to load. Default values will be used instead. These may take a short time to create.")); + report_config_load_failure(_frame, what); } void config_warning (string m)