Move reel_split_points from VideoContent to Content.
authorCarl Hetherington <cth@carlh.net>
Tue, 16 Feb 2016 12:15:38 +0000 (12:15 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 16 Feb 2016 12:15:38 +0000 (12:15 +0000)
src/lib/content.cc
src/lib/content.h
src/lib/video_content.cc
src/lib/video_content.h

index af85e0ff08d17fcbf7fd4111ce27988d9fe405dd..2c89f7c346ffdb93374163f7cd4e6efdb19704d1 100644 (file)
@@ -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<DCPTime>
+Content::reel_split_points () const
+{
+       list<DCPTime> 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;
+}
index b91b5778c8be7f855fbb25f3db9d24ed13550968..7301546eb55b380ab93dd1281ff75420db636778 100644 (file)
@@ -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<DCPTime> reel_split_points () const;
 
        std::list<std::pair<std::string, std::string> > properties () const;
 
index fcf7e322966c6ec96ffe0de158a765ec59251516..514ecae2eaa7a12fd6e3f542e89c05d046bdf476 100644 (file)
@@ -586,15 +586,6 @@ VideoContent::add_properties (list<pair<string, string> >& p) const
        p.push_back (make_pair (_("Video frame rate"), raw_convert<string> (video_frame_rate()) + " " + _("frames per second")));
 }
 
-list<DCPTime>
-VideoContent::reel_split_points () const
-{
-       list<DCPTime> 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
 {
index 6896551314eaaf9c2a96ae7d5b28af2e1781d044..0e58bd1b17b88406303819a9cdeae5e0089210d9 100644 (file)
@@ -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<DCPTime> reel_split_points () const;
-
        Frame video_length () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _video_length;