diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-08-31 17:21:09 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-08-31 17:21:09 +0100 |
| commit | 62c2a014a82399dd7425d5939fb491c78ea1c539 (patch) | |
| tree | 6f55c3370afd70a72ff0de1b91543a9eeb176137 /src | |
| parent | af014eeb1c79bcc70a0261bcb8ea07d2304f01bc (diff) | |
Hint when there may be a better DCP container option (#392).
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/hints_dialog.cc | 33 |
1 files changed, 32 insertions, 1 deletions
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 <boost/algorithm/string.hpp> #include <wx/richtext/richtextctrl.h> #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<Film> f) : wxDialog (parent, wxID_ANY, _("Hints")) , _film (f) @@ -44,6 +48,7 @@ HintsDialog::HintsDialog (wxWindow* parent, boost::weak_ptr<Film> f) boost::shared_ptr<Film> 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<VideoContent> vc = dynamic_pointer_cast<VideoContent> (*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_")) { |
