From 3feacf8bbdd094b7ac9a705911486288e436cd4f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 27 Aug 2015 14:19:28 +0100 Subject: [PATCH] Tidy up DCP content colour conversion a bit. --- ChangeLog | 3 +++ src/lib/dcp_content.cc | 13 ++++++++++--- src/lib/dcp_content.h | 2 ++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f043d95b3..cc9b6c36f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2015-08-27 Carl Hetherington + * Tidy up DCP content colour conversion + a bit. + * Fix creation of badly-named configuration directories in some circumstances (#654). diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index f0f1e321a..3c3d4983e 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -50,8 +50,6 @@ DCPContent::DCPContent (shared_ptr film, boost::filesystem::path p) , _kdm_valid (false) { read_directory (p); - /* Default to no colour conversion for DCPs */ - unset_colour_conversion (false); } DCPContent::DCPContent (shared_ptr film, cxml::ConstNodePtr node, int version) @@ -153,7 +151,9 @@ DCPContent::full_length () const string DCPContent::identifier () const { - return SubtitleContent::identifier (); + SafeStringStream s; + s << VideoContent::identifier() << "_" << SubtitleContent::identifier (); + return s.str (); } void @@ -190,3 +190,10 @@ DCPContent::add_properties (list >& p) const { SingleStreamAudioContent::add_properties (p); } + +void +DCPContent::set_default_colour_conversion () +{ + /* Default to no colour conversion for DCPs */ + unset_colour_conversion (); +} diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h index b4aebc45e..410953eb7 100644 --- a/src/lib/dcp_content.h +++ b/src/lib/dcp_content.h @@ -57,6 +57,8 @@ public: void as_xml (xmlpp::Node *) const; std::string identifier () const; + void set_default_colour_conversion (); + /* SubtitleContent */ bool has_text_subtitles () const { -- 2.30.2