summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-12-18 14:23:50 +0100
committerCarl Hetherington <cth@carlh.net>2021-12-18 14:23:50 +0100
commit9ebbeae21efe950c4f18a9f959a8fe9f0be4e8f4 (patch)
tree7dd03bf0d57ff95b94da08b2b095065ef4f923c1 /src/tools
parentc6df41f00083b4c34d4993c981cdac97b76eeb95 (diff)
Move make_dcp() out of Film (#2132).
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic.cc107
-rw-r--r--src/tools/dcpomatic_batch.cc5
-rw-r--r--src/tools/dcpomatic_cli.cc23
3 files changed, 69 insertions, 66 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index e03b63400..27df23ef0 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -24,78 +24,79 @@
*/
-#include "wx/standard_controls.h"
-#include "wx/film_viewer.h"
-#include "wx/film_editor.h"
-#include "wx/job_manager_view.h"
-#include "wx/full_config_dialog.h"
-#include "wx/wx_util.h"
-#include "wx/film_name_location_dialog.h"
-#include "wx/wx_signal_manager.h"
-#include "wx/recreate_chain_dialog.h"
#include "wx/about_dialog.h"
-#include "wx/kdm_dialog.h"
-#include "wx/dkdm_dialog.h"
-#include "wx/self_dkdm_dialog.h"
-#include "wx/servers_list_dialog.h"
-#include "wx/hints_dialog.h"
-#include "wx/update_dialog.h"
#include "wx/content_panel.h"
-#include "wx/report_problem_dialog.h"
-#include "wx/video_waveform_dialog.h"
-#include "wx/system_information_dialog.h"
-#include "wx/save_template_dialog.h"
-#include "wx/templates_dialog.h"
-#include "wx/nag_dialog.h"
+#include "wx/dkdm_dialog.h"
#include "wx/export_subtitles_dialog.h"
#include "wx/export_video_file_dialog.h"
-#include "wx/paste_dialog.h"
+#include "wx/film_editor.h"
+#include "wx/film_name_location_dialog.h"
+#include "wx/film_viewer.h"
#include "wx/focus_manager.h"
+#include "wx/full_config_dialog.h"
+#include "wx/hints_dialog.h"
#include "wx/html_dialog.h"
-#include "wx/send_i18n_dialog.h"
#include "wx/i18n_hook.h"
-#include "lib/film.h"
+#include "wx/job_manager_view.h"
+#include "wx/kdm_dialog.h"
+#include "wx/nag_dialog.h"
+#include "wx/paste_dialog.h"
+#include "wx/recreate_chain_dialog.h"
+#include "wx/report_problem_dialog.h"
+#include "wx/save_template_dialog.h"
+#include "wx/self_dkdm_dialog.h"
+#include "wx/send_i18n_dialog.h"
+#include "wx/servers_list_dialog.h"
+#include "wx/standard_controls.h"
+#include "wx/system_information_dialog.h"
+#include "wx/templates_dialog.h"
+#include "wx/update_dialog.h"
+#include "wx/video_waveform_dialog.h"
+#include "wx/wx_signal_manager.h"
+#include "wx/wx_util.h"
#include "lib/analytics.h"
-#include "lib/emailer.h"
+#include "lib/audio_content.h"
+#include "lib/check_content_change_job.h"
+#include "lib/cinema.h"
+#include "lib/compose.hpp"
#include "lib/config.h"
-#include "lib/cross.h"
-#include "lib/util.h"
-#include "lib/video_content.h"
#include "lib/content.h"
-#include "lib/version.h"
-#include "lib/signal_manager.h"
-#include "lib/log.h"
-#include "lib/screen.h"
-#include "lib/job_manager.h"
-#include "lib/exceptions.h"
-#include "lib/cinema.h"
-#include "lib/kdm_with_metadata.h"
-#include "lib/send_kdm_email_job.h"
-#include "lib/encode_server_finder.h"
-#include "lib/update_checker.h"
-#include "lib/cross.h"
#include "lib/content_factory.h"
-#include "lib/compose.hpp"
-#include "lib/dcpomatic_socket.h"
-#include "lib/hints.h"
+#include "lib/cross.h"
+#include "lib/cross.h"
#include "lib/dcp_content.h"
-#include "lib/ffmpeg_encoder.h"
-#include "lib/transcode_job.h"
-#include "lib/dkdm_wrapper.h"
-#include "lib/audio_content.h"
-#include "lib/check_content_change_job.h"
-#include "lib/text_content.h"
#include "lib/dcpomatic_log.h"
+#include "lib/dcpomatic_socket.h"
+#include "lib/dkdm_wrapper.h"
+#include "lib/emailer.h"
+#include "lib/encode_server_finder.h"
+#include "lib/exceptions.h"
+#include "lib/ffmpeg_encoder.h"
+#include "lib/film.h"
+#include "lib/hints.h"
+#include "lib/job_manager.h"
+#include "lib/kdm_with_metadata.h"
+#include "lib/log.h"
+#include "lib/make_dcp.h"
+#include "lib/screen.h"
+#include "lib/send_kdm_email_job.h"
+#include "lib/signal_manager.h"
#include "lib/subtitle_encoder.h"
+#include "lib/text_content.h"
+#include "lib/transcode_job.h"
+#include "lib/update_checker.h"
+#include "lib/util.h"
+#include "lib/version.h"
+#include "lib/video_content.h"
#include "lib/warnings.h"
#include <dcp/exceptions.h>
#include <dcp/raw_convert.h>
DCPOMATIC_DISABLE_WARNINGS
-#include <wx/generic/aboutdlgg.h>
-#include <wx/stdpaths.h>
#include <wx/cmdline.h>
+#include <wx/generic/aboutdlgg.h>
#include <wx/preferences.h>
#include <wx/splash.h>
+#include <wx/stdpaths.h>
#include <wx/wxhtml.h>
DCPOMATIC_ENABLE_WARNINGS
#ifdef __WXGTK__
@@ -104,8 +105,8 @@ DCPOMATIC_ENABLE_WARNINGS
#ifdef __WXMSW__
#include <shellapi.h>
#endif
-#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
+#include <boost/filesystem.hpp>
#include <iostream>
#include <fstream>
/* This is OK as it's only used with DCPOMATIC_WINDOWS */
@@ -798,7 +799,7 @@ private:
a long time, and crashes/power failures are moderately likely.
*/
_film->write_metadata ();
- _film->make_dcp (TranscodeJob::ChangedBehaviour::EXAMINE_THEN_STOP);
+ make_dcp (_film, TranscodeJob::ChangedBehaviour::EXAMINE_THEN_STOP);
} catch (BadSettingError& e) {
error_dialog (this, wxString::Format (_("Bad setting for %s."), std_to_wx(e.setting()).data()), std_to_wx(e.what()));
} catch (std::exception& e) {
diff --git a/src/tools/dcpomatic_batch.cc b/src/tools/dcpomatic_batch.cc
index 29f79ff08..2df60dd1d 100644
--- a/src/tools/dcpomatic_batch.cc
+++ b/src/tools/dcpomatic_batch.cc
@@ -32,6 +32,7 @@
#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"
@@ -211,7 +212,7 @@ public:
}
}
- film->make_dcp (TranscodeJob::ChangedBehaviour::STOP);
+ make_dcp (film, TranscodeJob::ChangedBehaviour::STOP);
} catch (std::exception& e) {
auto p = std_to_wx (path.string ());
auto b = p.ToUTF8 ();
@@ -450,7 +451,7 @@ class App : public wxApp
try {
film = make_shared<Film>(i);
film->read_metadata ();
- film->make_dcp (TranscodeJob::ChangedBehaviour::EXAMINE_THEN_STOP);
+ make_dcp (film, TranscodeJob::ChangedBehaviour::EXAMINE_THEN_STOP);
} catch (exception& e) {
error_dialog (
0,
diff --git a/src/tools/dcpomatic_cli.cc b/src/tools/dcpomatic_cli.cc
index 95f2f4039..96568f73b 100644
--- a/src/tools/dcpomatic_cli.cc
+++ b/src/tools/dcpomatic_cli.cc
@@ -18,22 +18,23 @@
*/
+#include "lib/audio_content.h"
+#include "lib/config.h"
+#include "lib/cross.h"
+#include "lib/dcpomatic_log.h"
+#include "lib/encode_server_finder.h"
#include "lib/film.h"
#include "lib/filter.h"
-#include "lib/transcode_job.h"
#include "lib/job_manager.h"
-#include "lib/util.h"
-#include "lib/version.h"
-#include "lib/cross.h"
-#include "lib/config.h"
-#include "lib/log.h"
-#include "lib/signal_manager.h"
-#include "lib/encode_server_finder.h"
#include "lib/json_server.h"
+#include "lib/log.h"
+#include "lib/make_dcp.h"
#include "lib/ratio.h"
+#include "lib/signal_manager.h"
+#include "lib/transcode_job.h"
+#include "lib/util.h"
+#include "lib/version.h"
#include "lib/video_content.h"
-#include "lib/audio_content.h"
-#include "lib/dcpomatic_log.h"
#include <dcp/version.h>
#include <getopt.h>
#include <iostream>
@@ -355,7 +356,7 @@ main (int argc, char* argv[])
cout << "\nMaking DCP for " << film->name() << "\n";
}
- film->make_dcp (check ? TranscodeJob::ChangedBehaviour::STOP : TranscodeJob::ChangedBehaviour::IGNORE);
+ make_dcp (film, check ? TranscodeJob::ChangedBehaviour::STOP : TranscodeJob::ChangedBehaviour::IGNORE);
bool const error = show_jobs_on_console (progress);
if (keep_going) {