DCPTime
Content::length_after_trim () const
{
- shared_ptr<const Film> film = _film.lock ();
- DCPOMATIC_ASSERT (film);
- return max (DCPTime (), full_length() - DCPTime (trim_start() + trim_end(), film->active_frame_rate_change (position ())));
+ return max (DCPTime (), full_length() - DCPTime (trim_start() + trim_end(), film()->active_frame_rate_change (position ())));
}
/** @return string which changes when something about this content changes which affects
return s;
}
-/** @return a list of properties that might be interesting to the user; first string is the property name,
- * second is the value.
- */
-list<pair<string, string> >
-Content::properties () const
+/** @return a list of properties that might be interesting to the user */
+list<Content::UserProperty>
+Content::user_properties () const
{
- list<pair<string, string> > p;
+ list<UserProperty> p;
add_properties (p);
return p;
}
+
+shared_ptr<const Film>
+Content::film () const
+{
+ shared_ptr<const Film> film = _film.lock ();
+ 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;
+}