Fix thinko.
[dcpomatic.git] / src / lib / video_content.cc
index ac038678c9762d7898953267e6e82fcc2ab03584..9bb065babc3506c6751c4029b5c5fd43f59ca8e0 100644 (file)
@@ -30,7 +30,6 @@
 #include "exceptions.h"
 #include "frame_rate_change.h"
 #include "log.h"
-#include "locale_convert.h"
 #include <dcp/raw_convert.h>
 #include <libcxml/cxml.h>
 #include <dcp/colour_matrix.h>
@@ -408,11 +407,11 @@ VideoContent::processing_description () const
        if ((crop().left || crop().right || crop().top || crop().bottom) && size() != dcp::Size (0, 0)) {
                dcp::Size cropped = size_after_crop ();
                d += String::compose (
-                       _("Cropped to %1x%2"),
+                       _("\nCropped to %1x%2"),
                        cropped.width, cropped.height
                        );
 
-               snprintf (buffer, sizeof(buffer), " (%.2f:1)\n", cropped.ratio());
+               snprintf (buffer, sizeof(buffer), " (%.2f:1)", cropped.ratio());
                d += buffer;
        }
 
@@ -422,33 +421,33 @@ VideoContent::processing_description () const
 
        if (scaled != size_after_crop ()) {
                d += String::compose (
-                       _("Scaled to %1x%2"),
+                       _("\nScaled to %1x%2"),
                        scaled.width, scaled.height
                        );
 
-               snprintf (buffer, sizeof(buffer), _(" (%.2f:1)\n"), scaled.ratio());
+               snprintf (buffer, sizeof(buffer), _(" (%.2f:1)"), scaled.ratio());
                d += buffer;
        }
 
        if (scaled != container_size) {
                d += String::compose (
-                       _("Padded with black to fit container %1 (%2x%3)"),
+                       _("\nPadded with black to fit container %1 (%2x%3)"),
                        film->container()->nickname (),
                        container_size.width, container_size.height
                        );
 
-               snprintf (buffer, sizeof(buffer), _(" (%.2f:1)\n"), container_size.ratio());
+               snprintf (buffer, sizeof(buffer), _(" (%.2f:1)"), container_size.ratio());
                d += buffer;
        }
 
        if (_parent->video_frame_rate()) {
                double const vfr = _parent->video_frame_rate().get ();
 
-               snprintf (buffer, sizeof(buffer), _("Content frame rate %.4f\n"), vfr);
+               snprintf (buffer, sizeof(buffer), _("\nContent frame rate %.4f\n"), vfr);
                d += buffer;
 
                FrameRateChange frc (vfr, film->video_frame_rate ());
-               d += frc.description () + "\n";
+               d += frc.description ();
        }
 
        return d;
@@ -458,7 +457,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
@@ -526,3 +525,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;
+}