using std::max;
using std::pair;
using boost::shared_ptr;
+using boost::optional;
using dcp::raw_convert;
using dcp::locale_convert;
void
Content::set_position (DCPTime p)
{
+ /* video content can modify its position */
+ if (video) {
+ video->modify_position (p);
+ }
+
{
boost::mutex::scoped_lock lm (_mutex);
if (p == _position) {
void
Content::set_trim_start (ContentTime t)
{
+ /* video content can modify its start trim */
+ if (video) {
+ video->modify_trim_start (t);
+ }
+
{
boost::mutex::scoped_lock lm (_mutex);
_trim_start = t;
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().ceil (film()->video_frame_rate()));
+ /* This is only called for video content and such content has its position forced
+ to start on a frame boundary.
+ */
+ t.push_back (position());
return t;
}
signal_changed (ContentProperty::VIDEO_FRAME_RATE);
}
+void
+Content::unset_video_frame_rate ()
+{
+ {
+ boost::mutex::scoped_lock lm (_mutex);
+ _video_frame_rate = optional<double>();
+ }
+
+ signal_changed (ContentProperty::VIDEO_FRAME_RATE);
+}
+
double
Content::active_video_frame_rate () const
{
}
}
+/** Take settings from the given content if it is of the correct type */
void
-Content::use_template (shared_ptr<const Content> c)
+Content::take_settings_from (shared_ptr<const Content> c)
{
if (video && c->video) {
- video->use_template (c->video);
+ video->take_settings_from (c->video);
}
if (audio && c->audio) {
- audio->use_template (c->audio);
+ audio->take_settings_from (c->audio);
}
if (subtitle && c->subtitle) {
- subtitle->use_template (c->subtitle);
+ subtitle->take_settings_from (c->subtitle);
}
}