Merge master.
[dcpomatic.git] / src / lib / dcp_video.cc
index d849866512d4cdc0e983ca42201631fe3fe88d70..ccfc800c8389f275518b774d3e8e4daa7c1157dd 100644 (file)
@@ -315,3 +315,18 @@ DCPVideo::eyes () const
        return _frame->eyes ();
 }
 
+/** @return true if this DCPVideo is definitely the same as another;
+ *  (apart from the frame index), false if it is probably not.
+ */
+bool
+DCPVideo::same (shared_ptr<const DCPVideo> other) const
+{
+       if (_frames_per_second != other->_frames_per_second ||
+           _j2k_bandwidth != other->_j2k_bandwidth ||
+           _resolution != other->_resolution ||
+           _burn_subtitles != other->_burn_subtitles) {
+               return false;
+       }
+
+       return _frame->same (other->_frame);
+}