Give a better reason for not referencing when there is a 2K/4K mismatch. v2.13.61
authorCarl Hetherington <cth@carlh.net>
Sat, 13 Oct 2018 23:20:38 +0000 (00:20 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 13 Oct 2018 23:20:38 +0000 (00:20 +0100)
ChangeLog
src/lib/dcp_content.cc
src/wx/video_panel.cc

index 04ae1315ccf85daf31e7ae412a5f7cbecf9cebab..f69320b66175a08985572bf4cf23446902be1426 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-10-14  Carl Hetherington  <cth@carlh.net>
+
+       * Give a better reason for not referring to DCPs
+       when there is a resolution mismatch.
+
 2018-09-27  Carl Hetherington  <cth@carlh.net>
 
        * Updated it_IT translation from Riccardo Mantani.
index 7301e537393e43eb1097cb806f6506b87727754c..9ff5bb16fca610016de3c5f05a4d311d3af0765c 100644 (file)
@@ -559,7 +559,21 @@ DCPContent::can_reference_video (string& why_not) const
                return false;
        }
 
-       if (film()->frame_size() != video->size()) {
+       Resolution video_res = RESOLUTION_2K;
+       if (video->size().width > 2048 || video->size().height > 1080) {
+               video_res = RESOLUTION_4K;
+       }
+
+       if (film()->resolution() != video_res) {
+               if (video_res == RESOLUTION_4K) {
+                       /// TRANSLATORS: this string will follow "Cannot reference this DCP: "
+                       why_not = _("it is 4K and the film is 2K.");
+               } else {
+                       /// TRANSLATORS: this string will follow "Cannot reference this DCP: "
+                       why_not = _("it is 2K and the film is 4K.");
+               }
+               return false;
+       } else if (film()->frame_size() != video->size()) {
                /// TRANSLATORS: this string will follow "Cannot reference this DCP: "
                why_not = _("its video frame size differs from the film's.");
                return false;
index 80aac66ea749c3fe01d6648c5e4ad4036a75529e..2fadfab336ebb8320929472c29f4a3d668fffb8a 100644 (file)
@@ -297,11 +297,9 @@ VideoPanel::film_changed (Film::Property property)
        switch (property) {
        case Film::VIDEO_FRAME_RATE:
        case Film::CONTAINER:
-               setup_description ();
-               setup_sensitivity ();
-               break;
        case Film::RESOLUTION:
                setup_description ();
+               setup_sensitivity ();
                break;
        case Film::REEL_TYPE:
        case Film::INTEROP: