From a75132724be4962225e5cb0f5ef5297e2e78aeee Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 10 Jul 2014 16:16:51 +0100 Subject: Move _intrinsic_duration and _edit_rate up to the MXF class as XML subtitle files do not contain this information (whereas MXF files do). --- src/mxf.cc | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/mxf.cc') 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 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) { -- cgit v1.2.3