--- /dev/null
+/*
+ Copyright (C) 2021 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include "config.h"
+#include "dcp_transcode_job.h"
+#include "film.h"
+#include "job_manager.h"
+#include "upload_job.h"
+
+
+using std::make_shared;
+using std::shared_ptr;
+
+
+DCPTranscodeJob::DCPTranscodeJob (shared_ptr<const Film> film, ChangedBehaviour changed)
+ : TranscodeJob (film, changed)
+{
+
+}
+
+
+void
+DCPTranscodeJob::post_transcode ()
+{
+ if (Config::instance()->upload_after_make_dcp()) {
+ JobManager::instance()->add(make_shared<UploadJob>(_film));
+ }
+}
--- /dev/null
+/*
+ Copyright (C) 2021 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include "transcode_job.h"
+
+
+class DCPTranscodeJob : public TranscodeJob
+{
+public:
+ DCPTranscodeJob (std::shared_ptr<const Film> film, ChangedBehaviour changed);
+
+private:
+ void post_transcode () override;
+};
#include "config.h"
#include "dcp_content.h"
#include "dcp_encoder.h"
+#include "dcp_transcode_job.h"
#include "dcpomatic_log.h"
#include "environment_info.h"
#include "film.h"
#include "job_manager.h"
#include "make_dcp.h"
-#include "transcode_job.h"
#include <stdexcept>
#include "i18n.h"
}
LOG_GENERAL ("J2K bandwidth %1", film->j2k_bandwidth());
- auto tj = make_shared<TranscodeJob>(film, behaviour);
+ auto tj = make_shared<DCPTranscodeJob>(film, behaviour);
tj->set_encoder (make_shared<DCPEncoder>(film, tj));
JobManager::instance()->add (tj);
}
}
}
- /* XXX: this shouldn't be here */
- if (Config::instance()->upload_after_make_dcp() && dynamic_pointer_cast<DCPEncoder>(_encoder)) {
- JobManager::instance()->add(make_shared<UploadJob>(_film));
- }
+ post_transcode ();
_encoder.reset ();
void set_encoder (std::shared_ptr<Encoder> t);
private:
+ virtual void post_transcode () {}
+
int remaining_time () const override;
std::shared_ptr<Encoder> _encoder;
dcp_subtitle_content.cc
dcp_subtitle_decoder.cc
dcp_text_track.cc
+ dcp_transcode_job.cc
dcp_video.cc
dcpomatic_log.cc
dcpomatic_socket.cc