summaryrefslogtreecommitdiff
path: root/src/lib/transcode_job.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/transcode_job.cc')
-rw-r--r--src/lib/transcode_job.cc28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/lib/transcode_job.cc b/src/lib/transcode_job.cc
index 12b9a2aa3..f1373fb4a 100644
--- a/src/lib/transcode_job.cc
+++ b/src/lib/transcode_job.cc
@@ -28,15 +28,16 @@
#include "compose.hpp"
#include "content.h"
#include "config.h"
-#include "dcp_encoder.h"
+#include "dcp_film_encoder.h"
#include "dcpomatic_log.h"
-#include "encoder.h"
#include "examine_content_job.h"
#include "film.h"
+#include "film_encoder.h"
#include "job_manager.h"
#include "log.h"
#include "transcode_job.h"
#include "upload_job.h"
+#include "variant.h"
#include <iomanip>
#include <iostream>
@@ -83,7 +84,7 @@ TranscodeJob::json_name () const
void
-TranscodeJob::set_encoder (shared_ptr<Encoder> e)
+TranscodeJob::set_encoder(shared_ptr<FilmEncoder> e)
{
_encoder = e;
}
@@ -110,7 +111,10 @@ TranscodeJob::run ()
return;
case ChangedBehaviour::STOP:
set_progress (1);
- set_error (_("Files have changed since they were added to the project."), _("Open the project in DCP-o-matic, check the settings, then save it before trying again."));
+ set_error(
+ _("Files have changed since they were added to the project."),
+ variant::insert_dcpomatic(_("Open the project in %1, check the settings, then save it before trying again."))
+ );
set_state (FINISHED_ERROR);
return;
default:
@@ -129,7 +133,7 @@ TranscodeJob::run ()
LOG_GENERAL(N_("Transcode job completed successfully: %1 fps"), dcp::locale_convert<string>(frames_per_second(), 2, true));
- if (dynamic_pointer_cast<DCPEncoder>(_encoder)) {
+ if (variant::count_created_dcps() && dynamic_pointer_cast<DCPFilmEncoder>(_encoder)) {
try {
Analytics::instance()->successful_dcp_encode();
} catch (FileError& e) {
@@ -148,6 +152,20 @@ TranscodeJob::run ()
}
+void
+TranscodeJob::pause()
+{
+ _encoder->pause();
+}
+
+
+void TranscodeJob::resume()
+{
+ _encoder->resume();
+ Job::resume();
+}
+
+
string
TranscodeJob::status () const
{