Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
authorCarl Hetherington <cth@carlh.net>
Thu, 22 Sep 2016 15:30:01 +0000 (16:30 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 22 Sep 2016 15:30:01 +0000 (16:30 +0100)
ChangeLog
cscript
debian/changelog
src/lib/dcp_content.cc
src/lib/dcp_content.h
src/lib/dcp_examiner.cc
src/lib/player.cc
src/wx/content_panel.cc
src/wx/job_view.cc
wscript

index 4bb09cf873fedaebd1ffe7d2a7f873dfb00cc0ee..a91254bed7644cdc0386d68c7b95aecdebae7542 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2016-09-22  Carl Hetherington  <cth@carlh.net>
+
+       * Version 2.9.26 released.
+
+2016-09-21  Carl Hetherington  <cth@carlh.net>
+
+       * Add confirm dialogue for job cancellation.
+
+       * Version 2.9.25 released.
+
 2016-09-21  Carl Hetherington  <cth@carlh.net>
 
        * Version 2.9.24 released.
diff --git a/cscript b/cscript
index ef67e544ffad96120bd645f2632263a3c79c634a..c5accebbb323ee05bd3eefc5ad91363f906d0389 100644 (file)
--- a/cscript
+++ b/cscript
@@ -233,7 +233,7 @@ def dependencies(target):
         ffmpeg_options = {}
 
     return (('ffmpeg-cdist', '1d4a1a4', ffmpeg_options),
-            ('libdcp', 'd6fda12'),
+            ('libdcp', '0acd045'),
             ('libsub', '3db5052'))
 
 def configure_options(target):
index 18eddcb1e97e312b5acb82c44ef1e980f7c2e179..b5226d82cacbd0225b2090592075037f1f468164 100644 (file)
@@ -1,4 +1,4 @@
-dcpomatic (2.9.24-1) UNRELEASED; urgency=low
+dcpomatic (2.9.26-1) UNRELEASED; urgency=low
 
   [ Carl Hetherington ]
   * New upstream release.
@@ -462,8 +462,10 @@ dcpomatic (2.9.24-1) UNRELEASED; urgency=low
   * New upstream release.
   * New upstream release.
   * New upstream release.
+  * New upstream release.
+  * New upstream release.
 
- -- Carl Hetherington <carl@d1stkfactory>  Wed, 21 Sep 2016 00:24:15 +0100
+ -- Carl Hetherington <carl@d1stkfactory>  Thu, 22 Sep 2016 00:19:23 +0100
 
 dcpomatic (0.87-1) UNRELEASED; urgency=low
 
index c180240c886336ecd2bfb4f403b0e58c81913d30..96e9f17a259f44e11b3b81859d0422b33308e6c0 100644 (file)
@@ -54,10 +54,11 @@ using boost::function;
 using boost::dynamic_pointer_cast;
 using dcp::raw_convert;
 
-int const DCPContentProperty::CAN_BE_PLAYED      = 600;
-int const DCPContentProperty::REFERENCE_VIDEO    = 601;
-int const DCPContentProperty::REFERENCE_AUDIO    = 602;
-int const DCPContentProperty::REFERENCE_SUBTITLE = 603;
+int const DCPContentProperty::NEEDS_ASSETS       = 600;
+int const DCPContentProperty::NEEDS_KDM          = 601;
+int const DCPContentProperty::REFERENCE_VIDEO    = 602;
+int const DCPContentProperty::REFERENCE_AUDIO    = 603;
+int const DCPContentProperty::REFERENCE_SUBTITLE = 604;
 
 DCPContent::DCPContent (shared_ptr<const Film> film, boost::filesystem::path p)
        : Content (film)
@@ -135,7 +136,8 @@ DCPContent::read_directory (boost::filesystem::path p)
 void
 DCPContent::examine (shared_ptr<Job> job)
 {
-       bool const could_be_played = can_be_played ();
+       bool const needed_assets = needs_assets ();
+       bool const needed_kdm = needs_kdm ();
 
        job->set_progress_unknown ();
        Content::examine (job);
@@ -170,8 +172,12 @@ DCPContent::examine (shared_ptr<Job> job)
                _cpl = examiner->cpl ();
        }
 
-       if (could_be_played != can_be_played ()) {
-               signal_changed (DCPContentProperty::CAN_BE_PLAYED);
+       if (needed_assets != needs_assets ()) {
+               signal_changed (DCPContentProperty::NEEDS_ASSETS);
+       }
+
+       if (needed_kdm != needs_kdm ()) {
+               signal_changed (DCPContentProperty::NEEDS_KDM);
        }
 
        video->set_frame_type (_three_d ? VIDEO_FRAME_TYPE_3D : VIDEO_FRAME_TYPE_2D);
index f97045484f7318748093dd33d8c04505dd1c8f80..93a207ed782057f7ce5af9b3fa8ef77a3bef9728 100644 (file)
@@ -32,7 +32,8 @@
 class DCPContentProperty
 {
 public:
-       static int const CAN_BE_PLAYED;
+       static int const NEEDS_KDM;
+       static int const NEEDS_ASSETS;
        static int const REFERENCE_VIDEO;
        static int const REFERENCE_AUDIO;
        static int const REFERENCE_SUBTITLE;
index b2034890b04eab8e58cc52824fd359143bce09e6..e25583cb69064b9ac3dd2fdb7352ab17c13efece 100644 (file)
@@ -35,6 +35,9 @@
 #include <dcp/stereo_picture_asset.h>
 #include <dcp/stereo_picture_asset_reader.h>
 #include <dcp/stereo_picture_frame.h>
+#include <dcp/sound_asset.h>
+#include <dcp/sound_asset_reader.h>
+#include <dcp/subtitle_asset.h>
 #include <dcp/reel_subtitle_asset.h>
 #include <dcp/sound_asset.h>
 #include <boost/foreach.hpp>
@@ -165,12 +168,12 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content)
        _encrypted = cpl->encrypted ();
        _kdm_valid = true;
 
-       /* Check that we can read the first picture frame */
+       /* Check that we can read the first picture, sound and subtitle frames of each reel */
        try {
-               if (!cpl->reels().empty ()) {
-                       shared_ptr<dcp::PictureAsset> asset = cpl->reels().front()->main_picture()->asset ();
-                       shared_ptr<dcp::MonoPictureAsset> mono = dynamic_pointer_cast<dcp::MonoPictureAsset> (asset);
-                       shared_ptr<dcp::StereoPictureAsset> stereo = dynamic_pointer_cast<dcp::StereoPictureAsset> (asset);
+               BOOST_FOREACH (shared_ptr<dcp::Reel> i, cpl->reels()) {
+                       shared_ptr<dcp::PictureAsset> pic = i->main_picture()->asset ();
+                       shared_ptr<dcp::MonoPictureAsset> mono = dynamic_pointer_cast<dcp::MonoPictureAsset> (pic);
+                       shared_ptr<dcp::StereoPictureAsset> stereo = dynamic_pointer_cast<dcp::StereoPictureAsset> (pic);
 
                        if (mono) {
                                mono->start_read()->get_frame(0)->xyz_image ();
@@ -178,6 +181,14 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content)
                                stereo->start_read()->get_frame(0)->xyz_image (dcp::EYE_LEFT);
                        }
 
+                       if (i->main_sound()) {
+                               shared_ptr<dcp::SoundAsset> sound = i->main_sound()->asset ();
+                               i->main_sound()->asset()->start_read()->get_frame(0);
+                       }
+
+                       if (i->main_subtitle()) {
+                               i->main_subtitle()->asset()->subtitles ();
+                       }
                }
        } catch (dcp::DCPReadError& e) {
                _kdm_valid = false;
index c17cdfdc0166d04fd376024e40a7494aa85215e0..69306e3817e94fd378a17ea862e525a19293419f 100644 (file)
@@ -169,7 +169,8 @@ Player::playlist_content_changed (weak_ptr<Content> w, int property, bool freque
                property == ContentProperty::TRIM_END ||
                property == ContentProperty::PATH ||
                property == VideoContentProperty::FRAME_TYPE ||
-               property == DCPContentProperty::CAN_BE_PLAYED ||
+               property == DCPContentProperty::NEEDS_ASSETS ||
+               property == DCPContentProperty::NEEDS_KDM ||
                property == SubtitleContentProperty::COLOUR ||
                property == SubtitleContentProperty::OUTLINE ||
                property == SubtitleContentProperty::SHADOW ||
index 1d9f010bfda2d5808b55c60862cbf5a14fa8768b..5892d9c4cdb7a7127ff3db0dfb3a7e15e848780b 100644 (file)
@@ -468,7 +468,7 @@ ContentPanel::set_selection (weak_ptr<Content> wc)
 void
 ContentPanel::film_content_changed (int property)
 {
-       if (property == ContentProperty::PATH || property == DCPContentProperty::CAN_BE_PLAYED) {
+       if (property == ContentProperty::PATH || property == DCPContentProperty::NEEDS_ASSETS || property == DCPContentProperty::NEEDS_KDM) {
                setup ();
        }
 
index 8718d14e336888fa418e2289b022ef5623a51322..136b18ed39fb75eedf782e1b2ac1caae171a7a2f 100644 (file)
@@ -121,7 +121,9 @@ JobView::details_clicked (wxCommandEvent &)
 void
 JobView::cancel_clicked (wxCommandEvent &)
 {
-       _job->cancel ();
+       if (confirm_dialog (_parent, _("Are you sure you want to cancel this job?"))) {
+               _job->cancel ();
+       }
 }
 
 void
diff --git a/wscript b/wscript
index 4a83a6585ff2defe3d8c180712bbce913534a961..21b462148d8ba56cd9d6bb79dc5dc6f3a7aa7381 100644 (file)
--- a/wscript
+++ b/wscript
@@ -27,7 +27,7 @@ import distutils.spawn
 from waflib import Logs, Context
 
 APPNAME = 'dcpomatic'
-VERSION = '2.9.24devel'
+VERSION = '2.9.26devel'
 
 def options(opt):
     opt.load('compiler_cxx')