From 62c2a014a82399dd7425d5939fb491c78ea1c539 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 31 Aug 2014 17:21:09 +0100 Subject: [PATCH] Hint when there may be a better DCP container option (#392). --- ChangeLog | 3 +++ src/wx/hints_dialog.cc | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ec754c77b..e66822597 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2014-08-31 Carl Hetherington + * Give a hint when content and container aspect ratios are not + the same (#392). + * Add "copy" button to colour conversion presets editor (#399). * Allow drag-and-drop of files onto the content list (#395). diff --git a/src/wx/hints_dialog.cc b/src/wx/hints_dialog.cc index 668d71321..74ac05508 100644 --- a/src/wx/hints_dialog.cc +++ b/src/wx/hints_dialog.cc @@ -20,8 +20,12 @@ #include #include #include "lib/film.h" +#include "lib/ratio.h" #include "hints_dialog.h" +using boost::shared_ptr; +using boost::dynamic_pointer_cast; + HintsDialog::HintsDialog (wxWindow* parent, boost::weak_ptr f) : wxDialog (parent, wxID_ANY, _("Hints")) , _film (f) @@ -44,6 +48,7 @@ HintsDialog::HintsDialog (wxWindow* parent, boost::weak_ptr f) boost::shared_ptr film = _film.lock (); if (film) { film->Changed.connect (boost::bind (&HintsDialog::film_changed, this)); + film->ContentChanged.connect (boost::bind (&HintsDialog::film_changed, this)); } film_changed (); @@ -71,13 +76,39 @@ HintsDialog::film_changed () _text->Newline (); } + ContentList content = film->content (); + int flat_or_narrower = 0; + int scope = 0; + for (ContentList::const_iterator i = content.begin(); i != content.end(); ++i) { + shared_ptr vc = dynamic_pointer_cast (*i); + if (vc) { + Ratio const * r = vc->scale().ratio (); + if (r && r->id() == "239") { + ++scope; + } else if (r && r->id() != "239" && r->id() != "full-frame") { + ++flat_or_narrower; + } + } + } + + if (scope && !flat_or_narrower && film->container()->id() == "185") { + hint = true; + _text->WriteText (_("All of your content is in Scope (2.39:1) but your DCP's container is Flat (1.85:1). This will letter-box your content inside a Flat (1.85:1) frame. You may prefer to set your DCP's container to Scope (2.39:1) in the \"DCP\" tab.")); + _text->Newline (); + } + + if (!scope && flat_or_narrower && film->container()->id() == "239") { + hint = true; + _text->WriteText (_("All of your content is at 1.85:1 or narrower but your DCP's container is Scope (2.39:1). This will pillar-box your content inside a Flat (1.85:1) frame. You may prefer to set your DCP's container to Flat (1.85:1) in the \"DCP\" tab.")); + _text->Newline (); + } + if (film->video_frame_rate() != 24 && film->video_frame_rate() != 48) { hint = true; _text->WriteText (wxString::Format (_("Your DCP frame rate (%d fps) may cause problems in a few (mostly older) projectors. Use 24 or 48 frames per second to be on the safe side."), film->video_frame_rate())); _text->Newline (); } - ContentList content = film->content (); int vob = 0; for (ContentList::const_iterator i = content.begin(); i != content.end(); ++i) { if (boost::algorithm::starts_with ((*i)->path(0).filename().string(), "VTS_")) { -- 2.30.2