Tidy up DCP content colour conversion a bit.
authorCarl Hetherington <cth@carlh.net>
Thu, 27 Aug 2015 13:19:28 +0000 (14:19 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 27 Aug 2015 13:19:28 +0000 (14:19 +0100)
ChangeLog
src/lib/dcp_content.cc
src/lib/dcp_content.h

index f043d95b3ba4cc421af3c47594cbc926c4d7998f..cc9b6c36f9d31b35d9d3b3bee2d21cfed1fc99f7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-08-27  Carl Hetherington  <cth@carlh.net>
 
+       * Tidy up DCP content colour conversion
+       a bit.
+
        * Fix creation of badly-named configuration
        directories in some circumstances (#654).
 
index f0f1e321a1f322396f3eb7af4484a304edf8da5d..3c3d4983ee33a960bcbfe4ced86b17b6952b874e 100644 (file)
@@ -50,8 +50,6 @@ DCPContent::DCPContent (shared_ptr<const Film> 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<const Film> 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<pair<string, string> >& p) const
 {
        SingleStreamAudioContent::add_properties (p);
 }
+
+void
+DCPContent::set_default_colour_conversion ()
+{
+       /* Default to no colour conversion for DCPs */
+       unset_colour_conversion ();
+}
index b4aebc45eb5b83ae0bd1e4ada68e079c41a016b1..410953eb70082c5f25f67744cd87c208fee9bb7a 100644 (file)
@@ -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 {