summaryrefslogtreecommitdiff
path: root/src/lib/dcp_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-09-21 22:16:48 +0100
committerCarl Hetherington <cth@carlh.net>2016-09-21 22:16:48 +0100
commit8457b7c1066da4e14f00a76f3855e60d986b179f (patch)
treebd05cf5865acb87eadff18daa7cb6ba46e272dd8 /src/lib/dcp_content.cc
parent4f139c25251b177878e30dd62350a0ebd5e07e14 (diff)
Correctly spot that a DCP with unencrypted picture but encrypted sound/subtitle needs a KDM.
Diffstat (limited to 'src/lib/dcp_content.cc')
-rw-r--r--src/lib/dcp_content.cc20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc
index c180240c8..96e9f17a2 100644
--- a/src/lib/dcp_content.cc
+++ b/src/lib/dcp_content.cc
@@ -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);