summaryrefslogtreecommitdiff
path: root/src/lib/film.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-11-07 23:26:51 +0000
committerCarl Hetherington <cth@carlh.net>2018-11-07 23:26:51 +0000
commit75538d19688ad8c29c5949de9bff9f044c713936 (patch)
treef16509ab4ceb02be3e4b5cc07042cfa043003709 /src/lib/film.cc
parenta3ec24ce1952a3bfd556d30b50cee79cc57436cb (diff)
Add button to force re-encode of J2K content.
Diffstat (limited to 'src/lib/film.cc')
-rw-r--r--src/lib/film.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc
index 807aeaf2f..2ff02d799 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -157,6 +157,7 @@ Film::Film (optional<boost::filesystem::path> dir)
, _reel_type (REELTYPE_SINGLE)
, _reel_length (2000000000)
, _upload_after_make_dcp (Config::instance()->default_upload_after_make_dcp())
+ , _reencode_j2k (false)
, _state_version (current_state_version)
, _dirty (false)
{
@@ -398,6 +399,7 @@ Film::metadata (bool with_content_paths) const
root->add_child("ReelType")->add_child_text (raw_convert<string> (static_cast<int> (_reel_type)));
root->add_child("ReelLength")->add_child_text (raw_convert<string> (_reel_length));
root->add_child("UploadAfterMakeDCP")->add_child_text (_upload_after_make_dcp ? "1" : "0");
+ root->add_child("ReencodeJ2K")->add_child_text (_reencode_j2k ? "1" : "0");
_playlist->as_xml (root->add_child ("Playlist"), with_content_paths);
return doc;
@@ -512,6 +514,7 @@ Film::read_metadata (optional<boost::filesystem::path> path)
_reel_type = static_cast<ReelType> (f.optional_number_child<int>("ReelType").get_value_or (static_cast<int>(REELTYPE_SINGLE)));
_reel_length = f.optional_number_child<int64_t>("ReelLength").get_value_or (2000000000);
_upload_after_make_dcp = f.optional_bool_child("UploadAfterMakeDCP").get_value_or (false);
+ _reencode_j2k = f.optional_bool_child("ReencodeJ2K").get_value_or(false);
list<string> notes;
/* This method is the only one that can return notes (so far) */
@@ -944,6 +947,13 @@ Film::set_upload_after_make_dcp (bool u)
}
void
+Film::set_reencode_j2k (bool r)
+{
+ ChangeSignaller<Film> ch (this, REENCODE_J2K);
+ _reencode_j2k = r;
+}
+
+void
Film::signal_change (ChangeType type, int p)
{
signal_change (type, static_cast<Property>(p));