+2015-02-10 c.hetherington <cth@carlh.net>
+
+ * Default to no colour conversion for
+ JPEG2000 and DCP content (#445).
+
2015-02-06 Carl Hetherington <cth@carlh.net>
* Version 2.0.40 released.
, _kdm_valid (false)
{
read_directory (p);
+ /* Default to no colour conversion for DCPs */
+ unset_colour_conversion (false);
}
DCPContent::DCPContent (shared_ptr<const Film> f, cxml::ConstNodePtr node, int version)
: Content (f)
, VideoContent (f)
{
+ bool have_j2k = false;
if (boost::filesystem::is_regular_file (p)) {
_paths.push_back (p);
+ if (valid_j2k_file (p)) {
+ have_j2k = true;
+ }
} else {
for (boost::filesystem::directory_iterator i(p); i != boost::filesystem::directory_iterator(); ++i) {
if (boost::filesystem::is_regular_file (i->path()) && valid_image_file (i->path())) {
_paths.push_back (i->path ());
+ if (valid_j2k_file (i->path ())) {
+ have_j2k = true;
+ }
}
}
sort (_paths.begin(), _paths.end());
}
+
+ if (have_j2k) {
+ /* We default to no colour conversion if we have JPEG2000 files */
+ unset_colour_conversion ();
+ }
}
}
void
-VideoContent::unset_colour_conversion ()
+VideoContent::unset_colour_conversion (bool signal)
{
{
boost::mutex::scoped_lock lm (_mutex);
_colour_conversion = boost::optional<ColourConversion> ();
}
- signal_changed (VideoContentProperty::COLOUR_CONVERSION);
+ if (signal) {
+ signal_changed (VideoContentProperty::COLOUR_CONVERSION);
+ }
}
void
void set_bottom_crop (int);
void set_scale (VideoContentScale);
- void unset_colour_conversion ();
+ void unset_colour_conversion (bool signal = true);
void set_colour_conversion (ColourConversion);
void set_default_colour_conversion (bool signal = true);