From 8726c70cc1b14dc996c18670cdcda0b4d670605e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 14 Oct 2016 23:38:16 +0100 Subject: Update content list when selected CPL changes in DCP content. --- src/lib/dcp_content.cc | 6 ++++++ src/lib/dcp_content.h | 6 ++++++ src/wx/content_panel.cc | 8 +++++++- 3 files changed, 19 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index 0d36118e7..dc32a243e 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -59,6 +59,7 @@ int const DCPContentProperty::NEEDS_KDM = 601; int const DCPContentProperty::REFERENCE_VIDEO = 602; int const DCPContentProperty::REFERENCE_AUDIO = 603; int const DCPContentProperty::REFERENCE_SUBTITLE = 604; +int const DCPContentProperty::NAME = 605; DCPContent::DCPContent (shared_ptr film, boost::filesystem::path p) : Content (film) @@ -138,6 +139,7 @@ DCPContent::examine (shared_ptr job) { bool const needed_assets = needs_assets (); bool const needed_kdm = needs_kdm (); + string const old_name = name (); job->set_progress_unknown (); Content::examine (job); @@ -180,6 +182,10 @@ DCPContent::examine (shared_ptr job) signal_changed (DCPContentProperty::NEEDS_KDM); } + if (old_name != name ()) { + signal_changed (DCPContentProperty::NAME); + } + video->set_frame_type (_three_d ? VIDEO_FRAME_TYPE_3D : VIDEO_FRAME_TYPE_2D); } diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h index 21b654c96..1212b8b0f 100644 --- a/src/lib/dcp_content.h +++ b/src/lib/dcp_content.h @@ -37,6 +37,7 @@ public: static int const REFERENCE_VIDEO; static int const REFERENCE_AUDIO; static int const REFERENCE_SUBTITLE; + static int const NAME; }; class ContentPart; @@ -135,6 +136,11 @@ private: std::list& why_not ) const; + std::string name () const { + boost::mutex::scoped_lock lm (_mutex); + return _name; + } + std::string _name; /** true if our DCP is encrypted */ bool _encrypted; diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc index 7bea51687..ea1d50766 100644 --- a/src/wx/content_panel.cc +++ b/src/wx/content_panel.cc @@ -481,7 +481,13 @@ ContentPanel::set_selection (ContentList cl) void ContentPanel::film_content_changed (int property) { - if (property == ContentProperty::PATH || property == DCPContentProperty::NEEDS_ASSETS || property == DCPContentProperty::NEEDS_KDM) { + if ( + property == ContentProperty::PATH || + property == DCPContentProperty::NEEDS_ASSETS || + property == DCPContentProperty::NEEDS_KDM || + property == DCPContentProperty::NAME + ) { + setup (); } -- cgit v1.2.3 From 9476c535e929974cc11070002938bbc9476cce32 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 15 Oct 2016 00:52:58 +0100 Subject: Add KDMs after resolving asset references; don't complain if a single KDM fails to decrypt a VF/OV combination. --- src/lib/dcp.cc | 9 ++++++--- src/wx/content_menu.cc | 19 +------------------ src/wx/content_menu.h | 1 - 3 files changed, 7 insertions(+), 22 deletions(-) (limited to 'src') diff --git a/src/lib/dcp.cc b/src/lib/dcp.cc index 6d5c0b291..f58b06b57 100644 --- a/src/lib/dcp.cc +++ b/src/lib/dcp.cc @@ -38,9 +38,6 @@ DCP::cpls () const BOOST_FOREACH (boost::filesystem::path i, _dcp_content->directories()) { shared_ptr dcp (new dcp::DCP (i)); dcp->read (false, 0, true); - if (_dcp_content->kdm ()) { - dcp->add (dcp::DecryptedKDM (_dcp_content->kdm().get(), Config::instance()->decryption_chain()->key().get ())); - } dcps.push_back (dcp); BOOST_FOREACH (shared_ptr i, dcp->cpls()) { cpls.push_back (i); @@ -55,5 +52,11 @@ DCP::cpls () const } } + if (_dcp_content->kdm ()) { + BOOST_FOREACH (shared_ptr i, dcps) { + i->add (dcp::DecryptedKDM (_dcp_content->kdm().get(), Config::instance()->decryption_chain()->key().get ())); + } + } + return cpls; } diff --git a/src/wx/content_menu.cc b/src/wx/content_menu.cc index ad6d6fc65..de3aceac0 100644 --- a/src/wx/content_menu.cc +++ b/src/wx/content_menu.cc @@ -379,29 +379,12 @@ ContentMenu::kdm () shared_ptr film = _film.lock (); DCPOMATIC_ASSERT (film); - shared_ptr j (new ExamineContentJob (film, dcp)); - _job_connections.push_back ( - j->Finished.connect (bind (&ContentMenu::check_kdm_validity, this, weak_ptr (dcp))) - ); - JobManager::instance()->add (j); + JobManager::instance()->add (shared_ptr (new ExamineContentJob (film, dcp))); } d->Destroy (); } -void -ContentMenu::check_kdm_validity (weak_ptr wp) -{ - shared_ptr dcp = wp.lock (); - if (!dcp) { - return; - } - - if (dcp->needs_kdm ()) { - error_dialog (0, _("The KDM does not decrypt the DCP. Perhaps it is targeted at the wrong CPL.")); - } -} - void ContentMenu::ov () { diff --git a/src/wx/content_menu.h b/src/wx/content_menu.h index 7b1e663fa..84daa71a5 100644 --- a/src/wx/content_menu.h +++ b/src/wx/content_menu.h @@ -50,7 +50,6 @@ private: void remove (); void maybe_found_missing (boost::weak_ptr, boost::weak_ptr, boost::weak_ptr); void cpl_selected (wxCommandEvent& ev); - void check_kdm_validity (boost::weak_ptr wp); wxMenu* _menu; wxMenu* _cpl_menu; -- cgit v1.2.3 From ab8fa1cdf0e5e17d130ef23323c0e14a79a61533 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 15 Oct 2016 16:23:14 +0100 Subject: Tweak ordering of lists. --- src/wx/about_dialog.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/wx/about_dialog.cc b/src/wx/about_dialog.cc index 9364b5427..65edc436a 100644 --- a/src/wx/about_dialog.cc +++ b/src/wx/about_dialog.cc @@ -144,8 +144,8 @@ AboutDialog::AboutDialog (wxWindow* parent) supported_by.Add (wxT ("Silvio Bonomi")); supported_by.Add (wxT ("Jeff Boot")); supported_by.Add (wxT ("Paul Carey")); - supported_by.Add (wxT ("Kieran Carroll")); supported_by.Add (wxT ("Nathan Carpenter")); + supported_by.Add (wxT ("Kieran Carroll")); supported_by.Add (wxT ("Matt Carter")); supported_by.Add (wxT ("Frank Cianciolo")); supported_by.Add (wxT ("Central Cinema")); @@ -195,16 +195,9 @@ AboutDialog::AboutDialog (wxWindow* parent) supported_by.Add (wxT ("Filip Kovcin")); supported_by.Add (wxT ("Cihan Kulaber")); supported_by.Add (wxT ("Carsten Kurz")); - supported_by.Add (wxT ("Robert Legato")); - supported_by.Add (wxT ("Mandorla")); - supported_by.Add (wxT ("Andrea Maguolo")); - supported_by.Add (wxT ("Gerard Manshanden")); - supported_by.Add (wxT ("Daniel Martinez Lara")); - supported_by.Add (wxT ("Stefan Massopust")); - supported_by.Add (wxT ("P. Meijer")); - supported_by.Add (wxT ("Michal Moc")); supported_by.Add (wxT ("David Armati Lechner")); supported_by.Add (wxT ("Lilian Lefranc")); + supported_by.Add (wxT ("Robert Legato")); supported_by.Add (wxT ("Sean Leigh")); supported_by.Add (wxT ("Olivier Lemaire")); supported_by.Add (wxT ("Gavin Lewarne")); @@ -212,6 +205,13 @@ AboutDialog::AboutDialog (wxWindow* parent) supported_by.Add (wxT ("Paweł Lipiński")); supported_by.Add (wxT ("Marco Löber")); supported_by.Add (wxT ("Juan Marin Lorenzo")); + supported_by.Add (wxT ("Mandorla")); + supported_by.Add (wxT ("Andrea Maguolo")); + supported_by.Add (wxT ("Gerard Manshanden")); + supported_by.Add (wxT ("Daniel Martinez Lara")); + supported_by.Add (wxT ("Stefan Massopust")); + supported_by.Add (wxT ("P. Meijer")); + supported_by.Add (wxT ("Michal Moc")); supported_by.Add (wxT ("Richard Malmberg")); supported_by.Add (wxT ("Adrian Manolescu")); supported_by.Add (wxT ("Mattias Mattsson")); -- cgit v1.2.3 From 2df052b9e1811873d9ac90877836fadcd86ca6fb Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 15 Oct 2016 16:26:17 +0100 Subject: More name reordering. --- src/wx/about_dialog.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/wx/about_dialog.cc b/src/wx/about_dialog.cc index 65edc436a..70cfed4e1 100644 --- a/src/wx/about_dialog.cc +++ b/src/wx/about_dialog.cc @@ -210,17 +210,17 @@ AboutDialog::AboutDialog (wxWindow* parent) supported_by.Add (wxT ("Gerard Manshanden")); supported_by.Add (wxT ("Daniel Martinez Lara")); supported_by.Add (wxT ("Stefan Massopust")); - supported_by.Add (wxT ("P. Meijer")); - supported_by.Add (wxT ("Michal Moc")); supported_by.Add (wxT ("Richard Malmberg")); supported_by.Add (wxT ("Adrian Manolescu")); supported_by.Add (wxT ("Mattias Mattsson")); supported_by.Add (wxT ("George Mazarakis")); supported_by.Add (wxT ("Gordon McLeod")); + supported_by.Add (wxT ("P. Meijer")); supported_by.Add (wxT ("Brian Mendelssohn")); supported_by.Add (wxT ("Kjarten Michaelsen")); supported_by.Add (wxT ("Aldo Midali")); supported_by.Add (wxT ("Sylvain Mielle")); + supported_by.Add (wxT ("Michal Moc")); supported_by.Add (wxT ("Howard Molton")); supported_by.Add (wxT ("Lindsay Morris")); supported_by.Add (wxT ("NT Next")); -- cgit v1.2.3