#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>
_scale = VideoContentScale (node->node_child ("Scale"));
}
-
if (node->optional_node_child ("ColourConversion")) {
_colour_conversion = ColourConversion (node->node_child ("ColourConversion"), version);
}
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;
}
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;
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
{
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;
+}