summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-10-17 14:39:08 +0100
committerCarl Hetherington <cth@carlh.net>2016-10-17 14:39:08 +0100
commit894d6e4cbfab5217adf6f39b1c097cec2a8f948c (patch)
treec618263a57215bc7b1b08fb97223520532724bb2 /src/lib
parent987238a22e696862aaad92adf9f32fd77aef0e07 (diff)
parent2df052b9e1811873d9ac90877836fadcd86ca6fb (diff)
Fix merge.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dcp.cc9
-rw-r--r--src/lib/dcp_content.cc6
-rw-r--r--src/lib/dcp_content.h6
3 files changed, 18 insertions, 3 deletions
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::DCP> 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<dcp::CPL> i, dcp->cpls()) {
cpls.push_back (i);
@@ -55,5 +52,11 @@ DCP::cpls () const
}
}
+ if (_dcp_content->kdm ()) {
+ BOOST_FOREACH (shared_ptr<dcp::DCP> i, dcps) {
+ i->add (dcp::DecryptedKDM (_dcp_content->kdm().get(), Config::instance()->decryption_chain()->key().get ()));
+ }
+ }
+
return cpls;
}
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<const Film> film, boost::filesystem::path p)
: Content (film)
@@ -138,6 +139,7 @@ DCPContent::examine (shared_ptr<Job> 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> 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<std::string>& 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;