From: Carl Hetherington Date: Tue, 16 Feb 2016 12:15:38 +0000 (+0000) Subject: Move reel_split_points from VideoContent to Content. X-Git-Tag: v2.6.23~22 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=797648ddcfe72bb428d8355672da3a1b6fac54fc Move reel_split_points from VideoContent to Content. --- diff --git a/src/lib/content.cc b/src/lib/content.cc index af85e0ff0..2c89f7c34 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -295,3 +295,13 @@ Content::film () const DCPOMATIC_ASSERT (film); return film; } + +/** @return DCP times of points within this content where a reel split could occur */ +list +Content::reel_split_points () const +{ + list t; + /* XXX: this is questionable; perhaps the position itself should be forced to be on a frame boundary */ + t.push_back (position().round_up (film()->video_frame_rate())); + return t; +} diff --git a/src/lib/content.h b/src/lib/content.h index b91b5778c..7301546eb 100644 --- a/src/lib/content.h +++ b/src/lib/content.h @@ -86,6 +86,10 @@ public: virtual void as_xml (xmlpp::Node *) const; virtual DCPTime full_length () const = 0; virtual std::string identifier () const; + /** @return points at which to split this content when + * REELTYPE_BY_VIDEO_CONTENT is in use. + */ + virtual std::list reel_split_points () const; std::list > properties () const; diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index fcf7e3229..514ecae2e 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -586,15 +586,6 @@ VideoContent::add_properties (list >& p) const p.push_back (make_pair (_("Video frame rate"), raw_convert (video_frame_rate()) + " " + _("frames per second"))); } -list -VideoContent::reel_split_points () const -{ - list t; - /* XXX: this is questionable; perhaps the position should be forced to be on a frame boundary */ - t.push_back (position().round_up (film()->video_frame_rate())); - return t; -} - double VideoContent::video_frame_rate () const { diff --git a/src/lib/video_content.h b/src/lib/video_content.h index 689655131..0e58bd1b1 100644 --- a/src/lib/video_content.h +++ b/src/lib/video_content.h @@ -55,11 +55,6 @@ public: virtual void set_default_colour_conversion (); - /** @return points at which to split this content when - * REELTYPE_BY_VIDEO_CONTENT is in use. - */ - virtual std::list reel_split_points () const; - Frame video_length () const { boost::mutex::scoped_lock lm (_mutex); return _video_length;