From 5302f2cda0afd16d714ab898549c7cd278196473 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 14 Oct 2018 00:20:38 +0100 Subject: [PATCH] Give a better reason for not referencing when there is a 2K/4K mismatch. --- ChangeLog | 5 +++++ src/lib/dcp_content.cc | 16 +++++++++++++++- src/wx/video_panel.cc | 4 +--- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 04ae1315c..f69320b66 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-10-14 Carl Hetherington + + * Give a better reason for not referring to DCPs + when there is a resolution mismatch. + 2018-09-27 Carl Hetherington * Updated it_IT translation from Riccardo Mantani. diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index 7301e5373..9ff5bb16f 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -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; diff --git a/src/wx/video_panel.cc b/src/wx/video_panel.cc index 80aac66ea..2fadfab33 100644 --- a/src/wx/video_panel.cc +++ b/src/wx/video_panel.cc @@ -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: -- 2.30.2