+ << "_" << crop().bottom
+ << "_" << scale().id()
+ << "_" << colour_conversion().identifier ();
+
+ return s.str ();
+}
+
+void
+VideoContent::set_video_frame_type (VideoFrameType t)
+{
+ {
+ boost::mutex::scoped_lock lm (_mutex);
+ _video_frame_type = t;
+ }
+
+ signal_changed (VideoContentProperty::VIDEO_FRAME_TYPE);
+}
+
+string
+VideoContent::technical_summary () const
+{
+ return String::compose (
+ "video: length %1, size %2x%3, rate %4",
+ video_length().seconds(),
+ video_size().width,
+ video_size().height,
+ video_frame_rate()
+ );
+}
+
+dcp::Size
+VideoContent::video_size_after_3d_split () const
+{
+ dcp::Size const s = video_size ();
+ switch (video_frame_type ()) {
+ case VIDEO_FRAME_TYPE_2D:
+ return s;
+ case VIDEO_FRAME_TYPE_3D_LEFT_RIGHT:
+ return dcp::Size (s.width / 2, s.height);
+ case VIDEO_FRAME_TYPE_3D_TOP_BOTTOM:
+ return dcp::Size (s.width, s.height / 2);
+ }
+
+ assert (false);
+}
+
+void
+VideoContent::set_colour_conversion (ColourConversion c)
+{
+ {
+ boost::mutex::scoped_lock lm (_mutex);
+ _colour_conversion = c;
+ }
+
+ signal_changed (VideoContentProperty::COLOUR_CONVERSION);
+}
+
+/** @return Video size after 3D split and crop */
+dcp::Size
+VideoContent::video_size_after_crop () const
+{
+ return crop().apply (video_size_after_3d_split ());
+}
+
+/** @param t A time offset from the start of this piece of content.
+ * @return Corresponding time with respect to the content.
+ */
+ContentTime
+VideoContent::dcp_time_to_content_time (DCPTime t) const
+{
+ shared_ptr<const Film> film = _film.lock ();
+ assert (film);
+ return ContentTime (t, FrameRateChange (video_frame_rate(), film->video_frame_rate()));
+}
+
+VideoContentScale::VideoContentScale (Ratio const * r)
+ : _ratio (r)
+ , _scale (true)
+{
+
+}
+
+VideoContentScale::VideoContentScale ()
+ : _ratio (0)
+ , _scale (false)
+{