_sample_aspect_ratio = ar;
_yuv = yuv;
- /* Guess correct scale from size and sample aspect ratio */
- _scale = VideoContentScale (
- Ratio::nearest_from_ratio (double (_size.width) * ar.get_value_or (1) / _size.height)
- );
+ if (Config::instance()->default_scale_to ()) {
+ _scale = VideoContentScale (Config::instance()->default_scale_to ());
+ } else {
+ /* Guess correct scale from size and sample aspect ratio */
+ _scale = VideoContentScale (
+ Ratio::nearest_from_ratio (double (_size.width) * ar.get_value_or (1) / _size.height)
+ );
+ }
}
LOG_GENERAL ("Video length obtained from header as %1 frames", _length);
if (scaled != container_size) {
d += String::compose (
_("\nPadded with black to fit container %1 (%2x%3)"),
- film->container()->nickname (),
+ film->container()->container_nickname (),
container_size.width, container_size.height
);
_fade_in = c->_fade_in;
_fade_out = c->_fade_out;
}
+
+void
+VideoContent::modify_position (DCPTime& pos) const
+{
+ pos = pos.ceil (_parent->film()->video_frame_rate());
+}