summaryrefslogtreecommitdiff
path: root/src/mxf.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-07-10 16:16:51 +0100
committerCarl Hetherington <cth@carlh.net>2014-07-10 16:16:51 +0100
commita75132724be4962225e5cb0f5ef5297e2e78aeee (patch)
tree8bd6860f89de21e2ec14226a4eb8d1d6ba87aff4 /src/mxf.cc
parent1045480655c09c6fdf0d81f5d9714cb218933c19 (diff)
Move _intrinsic_duration and _edit_rate up to the MXF class as XML subtitle files do not contain this information (whereas MXF files do).
Diffstat (limited to 'src/mxf.cc')
-rw-r--r--src/mxf.cc18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/mxf.cc b/src/mxf.cc
index def53c15..f5282f1c 100644
--- a/src/mxf.cc
+++ b/src/mxf.cc
@@ -42,19 +42,21 @@ using boost::dynamic_pointer_cast;
using namespace dcp;
MXF::MXF (Fraction edit_rate)
- : Content (edit_rate)
+ : _edit_rate (edit_rate)
+ , _intrinsic_duration (0)
, _encryption_context (0)
, _decryption_context (0)
{
-
+ /* _intrinsic_duration must be set up up by a subclass */
}
MXF::MXF (boost::filesystem::path file)
: Content (file)
+ , _intrinsic_duration (0)
, _encryption_context (0)
, _decryption_context (0)
{
-
+ /* _edit_rate and _intrinsic_duration must be set up up by a subclass */
}
MXF::~MXF ()
@@ -102,6 +104,16 @@ MXF::equals (shared_ptr<const Content> other, EqualityOptions opt, boost::functi
return false;
}
+ if (_edit_rate != other_mxf->_edit_rate) {
+ note (DCP_ERROR, "content edit rates differ");
+ return false;
+ }
+
+ if (_intrinsic_duration != other_mxf->_intrinsic_duration) {
+ note (DCP_ERROR, "asset intrinsic durations differ");
+ return false;
+ }
+
if (_file != other_mxf->file ()) {
note (DCP_ERROR, "MXF names differ");
if (!opt.mxf_names_can_differ) {