Make jump-to-content-start on selection in the content list optional.
[dcpomatic.git] / src / lib / video_content.cc
index 026696f805af078f671c505aa56ad2446c927029..36438fc2a9041f34ec31027fd4c76ffb5f541746 100644 (file)
@@ -32,7 +32,6 @@
 #include "log.h"
 #include <dcp/raw_convert.h>
 #include <libcxml/cxml.h>
-#include <dcp/colour_matrix.h>
 #include <libxml++/libxml++.h>
 #include <iomanip>
 #include <iostream>
@@ -141,7 +140,6 @@ VideoContent::VideoContent (Content* parent, cxml::ConstNodePtr node, int versio
                _scale = VideoContentScale (node->node_child ("Scale"));
        }
 
-
        if (node->optional_node_child ("ColourConversion")) {
                _colour_conversion = ColourConversion (node->node_child ("ColourConversion"), version);
        }
@@ -400,7 +398,7 @@ VideoContent::processing_description () const
                        ratio *= sample_aspect_ratio().get ();
                }
 
-               snprintf (buffer, sizeof(buffer), _("\nDisplay aspect ratio %.2f:1\n"), ratio);
+               snprintf (buffer, sizeof(buffer), _("\nDisplay aspect ratio %.2f:1"), ratio);
                d += buffer;
        }
 
@@ -457,7 +455,7 @@ void
 VideoContent::add_properties (list<UserProperty>& p) const
 {
        p.push_back (UserProperty (UserProperty::VIDEO, _("Length"), length (), _("video frames")));
-       p.push_back (UserProperty (UserProperty::VIDEO, _("Size"), size().width + "x" + size().height));
+       p.push_back (UserProperty (UserProperty::VIDEO, _("Size"), String::compose ("%1x%2", size().width, size().height)));
 }
 
 void
@@ -525,3 +523,14 @@ VideoContent::set_fade_out (Frame t)
 {
        maybe_set (_fade_out, t, VideoContentProperty::FADE_OUT);
 }
+
+void
+VideoContent::use_template (shared_ptr<const VideoContent> c)
+{
+       _colour_conversion = c->_colour_conversion;
+       _frame_type = c->_frame_type;
+       _crop = c->_crop;
+       _scale = c->_scale;
+       _fade_in = c->_fade_in;
+       _fade_out = c->_fade_out;
+}