projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f74ed42
)
Disallow referencing of Interop DCPs in SMPTE films, and vice versa (#804).
author
Carl Hetherington
<cth@carlh.net>
Tue, 24 May 2016 10:44:16 +0000
(11:44 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 24 May 2016 10:44:16 +0000
(11:44 +0100)
ChangeLog
patch
|
blob
|
history
cscript
patch
|
blob
|
history
src/lib/dcp_content.cc
patch
|
blob
|
history
src/lib/dcp_content.h
patch
|
blob
|
history
src/lib/dcp_examiner.cc
patch
|
blob
|
history
src/lib/dcp_examiner.h
patch
|
blob
|
history
src/wx/video_panel.cc
patch
|
blob
|
history
diff --git
a/ChangeLog
b/ChangeLog
index 8092617c5466cebb755148217888dbed48ed5924..bf30c5f1c846a80ed57bc4571bb986a524b32947 100644
(file)
--- a/
ChangeLog
+++ b/
ChangeLog
@@
-1,3
+1,8
@@
+2016-05-24 c.hetherington <cth@carlh.net>
+
+ * Disallow referencing of Interop DCPs in SMPTE
+ films, and vice versa (#804).
+
2016-05-23 c.hetherington <cth@carlh.net>
* Fix missing words in properties window (#874).
2016-05-23 c.hetherington <cth@carlh.net>
* Fix missing words in properties window (#874).
diff --git
a/cscript
b/cscript
index 3854d29a09984034b6a457ec40d48a383e13a1df..e969a523614b349f9911d4f6fb43564bb2872636 100644
(file)
--- a/
cscript
+++ b/
cscript
@@
-236,7
+236,7
@@
def dependencies(target):
ffmpeg_options = {}
return (('ffmpeg-cdist', 'cd922b8', ffmpeg_options),
ffmpeg_options = {}
return (('ffmpeg-cdist', 'cd922b8', ffmpeg_options),
- ('libdcp', '
4e6b78d
'),
+ ('libdcp', '
043d382
'),
('libsub', 'b082fb6'))
def configure_options(target):
('libsub', 'b082fb6'))
def configure_options(target):
diff --git
a/src/lib/dcp_content.cc
b/src/lib/dcp_content.cc
index 023af8e951aab073a10ae383567a4271e5c80fdc..d41a59b7161addfa4ff2ffd6e2c3d99b9b5c9445 100644
(file)
--- a/
src/lib/dcp_content.cc
+++ b/
src/lib/dcp_content.cc
@@
-97,6
+97,16
@@
DCPContent::DCPContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, in
_reference_video = node->optional_bool_child ("ReferenceVideo").get_value_or (false);
_reference_audio = node->optional_bool_child ("ReferenceAudio").get_value_or (false);
_reference_subtitle = node->optional_bool_child ("ReferenceSubtitle").get_value_or (false);
_reference_video = node->optional_bool_child ("ReferenceVideo").get_value_or (false);
_reference_audio = node->optional_bool_child ("ReferenceAudio").get_value_or (false);
_reference_subtitle = node->optional_bool_child ("ReferenceSubtitle").get_value_or (false);
+ if (node->optional_string_child("Standard")) {
+ string const s = node->optional_string_child("Standard").get();
+ if (s == "Interop") {
+ _standard = dcp::INTEROP;
+ } else if (s == "SMPTE") {
+ _standard = dcp::SMPTE;
+ } else {
+ DCPOMATIC_ASSERT (false);
+ }
+ }
}
void
}
void
@@
-143,6
+153,7
@@
DCPContent::examine (shared_ptr<Job> job)
}
_encrypted = examiner->encrypted ();
_kdm_valid = examiner->kdm_valid ();
}
_encrypted = examiner->encrypted ();
_kdm_valid = examiner->kdm_valid ();
+ _standard = examiner->standard ();
}
if (could_be_played != can_be_played ()) {
}
if (could_be_played != can_be_played ()) {
@@
-197,6
+208,18
@@
DCPContent::as_xml (xmlpp::Node* node) const
node->add_child("ReferenceVideo")->add_child_text (_reference_video ? "1" : "0");
node->add_child("ReferenceAudio")->add_child_text (_reference_audio ? "1" : "0");
node->add_child("ReferenceSubtitle")->add_child_text (_reference_subtitle ? "1" : "0");
node->add_child("ReferenceVideo")->add_child_text (_reference_video ? "1" : "0");
node->add_child("ReferenceAudio")->add_child_text (_reference_audio ? "1" : "0");
node->add_child("ReferenceSubtitle")->add_child_text (_reference_subtitle ? "1" : "0");
+ if (_standard) {
+ switch (_standard.get ()) {
+ case dcp::INTEROP:
+ node->add_child("Standard")->add_child_text ("Interop");
+ break;
+ case dcp::SMPTE:
+ node->add_child("Standard")->add_child_text ("SMPTE");
+ break;
+ default:
+ DCPOMATIC_ASSERT (false);
+ }
+ }
}
DCPTime
}
DCPTime
@@
-331,13
+354,24
@@
DCPContent::reel_split_points () const
bool
DCPContent::can_reference (function<shared_ptr<ContentPart> (shared_ptr<const Content>)> part, string overlapping, list<string>& why_not) const
{
bool
DCPContent::can_reference (function<shared_ptr<ContentPart> (shared_ptr<const Content>)> part, string overlapping, list<string>& why_not) const
{
+ /* We must be using the same standard as the film */
+ if (_standard) {
+ if (_standard.get() == dcp::INTEROP && !film()->interop()) {
+ why_not.push_back (_("The film is set to SMPTE and this DCP is Interop."));
+ return false;
+ } else if (_standard.get() == dcp::SMPTE && film()->interop()) {
+ why_not.push_back (_("The film is set to Interop and this DCP is SMPTE."));
+ return false;
+ }
+ }
+
list<DCPTimePeriod> const fr = film()->reels ();
/* fr must contain reels(). It can also contain other reels, but it must at
least contain reels().
*/
BOOST_FOREACH (DCPTimePeriod i, reels()) {
if (find (fr.begin(), fr.end(), i) == fr.end ()) {
list<DCPTimePeriod> const fr = film()->reels ();
/* fr must contain reels(). It can also contain other reels, but it must at
least contain reels().
*/
BOOST_FOREACH (DCPTimePeriod i, reels()) {
if (find (fr.begin(), fr.end(), i) == fr.end ()) {
- why_not.push_back (_("Reel lengths in the
project
differ from those in the DCP; set the reel mode to 'split by video content'."));
+ why_not.push_back (_("Reel lengths in the
film
differ from those in the DCP; set the reel mode to 'split by video content'."));
return false;
}
}
return false;
}
}
diff --git
a/src/lib/dcp_content.h
b/src/lib/dcp_content.h
index 489151e03cb912c50afaab1a719b3415c2979559..7ea9c3500f95b1284b05c9c9210cd742ad5004ff 100644
(file)
--- a/
src/lib/dcp_content.h
+++ b/
src/lib/dcp_content.h
@@
-138,6
+138,8
@@
private:
* rather than by rewrapping.
*/
bool _reference_subtitle;
* rather than by rewrapping.
*/
bool _reference_subtitle;
+
+ boost::optional<dcp::Standard> _standard;
};
#endif
};
#endif
diff --git
a/src/lib/dcp_examiner.cc
b/src/lib/dcp_examiner.cc
index 81cb98b986b4ad09236d31eb28f1b26bb34c45d9..93d553476ed005f7b297e124b3def7634d559008 100644
(file)
--- a/
src/lib/dcp_examiner.cc
+++ b/
src/lib/dcp_examiner.cc
@@
-134,4
+134,6
@@
DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content)
throw runtime_error (_("The KDM does not decrypt the DCP. Perhaps it is targeted at the wrong CPL."));
}
}
throw runtime_error (_("The KDM does not decrypt the DCP. Perhaps it is targeted at the wrong CPL."));
}
}
+
+ _standard = dcp.standard ();
}
}
diff --git
a/src/lib/dcp_examiner.h
b/src/lib/dcp_examiner.h
index f2609ed3e4b262b72340643c2b23f93455f9d844..542f018c9eac9b806c9b41999bed8f5b247f2027 100644
(file)
--- a/
src/lib/dcp_examiner.h
+++ b/
src/lib/dcp_examiner.h
@@
-75,6
+75,10
@@
public:
return _kdm_valid;
}
return _kdm_valid;
}
+ boost::optional<dcp::Standard> standard () const {
+ return _standard;
+ }
+
private:
boost::optional<double> _video_frame_rate;
boost::optional<dcp::Size> _video_size;
private:
boost::optional<double> _video_frame_rate;
boost::optional<dcp::Size> _video_size;
@@
-86,4
+90,5
@@
private:
bool _has_subtitles;
bool _encrypted;
bool _kdm_valid;
bool _has_subtitles;
bool _encrypted;
bool _kdm_valid;
+ boost::optional<dcp::Standard> _standard;
};
};
diff --git
a/src/wx/video_panel.cc
b/src/wx/video_panel.cc
index a8a1d98c8e97f17e5994df4ec6cee21436a5bbec..3ab78727e01a59fc7955ae0e66fef68c0a1d5582 100644
(file)
--- a/
src/wx/video_panel.cc
+++ b/
src/wx/video_panel.cc
@@
-256,6
+256,7
@@
VideoPanel::film_changed (Film::Property property)
setup_description ();
break;
case Film::REEL_TYPE:
setup_description ();
break;
case Film::REEL_TYPE:
+ case Film::INTEROP:
setup_sensitivity ();
default:
break;
setup_sensitivity ();
default:
break;