using boost::optional;
using boost::dynamic_pointer_cast;
-VideoContent::VideoContent (shared_ptr<const Film> f)
- : Content (f)
+VideoContent::VideoContent (shared_ptr<const Film> film)
+ : Content (film)
, _video_length (0)
, _video_frame_rate (0)
, _video_frame_type (VIDEO_FRAME_TYPE_2D)
set_default_colour_conversion ();
}
-VideoContent::VideoContent (shared_ptr<const Film> f, DCPTime s, Frame len)
- : Content (f, s)
+VideoContent::VideoContent (shared_ptr<const Film> film, DCPTime s, Frame len)
+ : Content (film, s)
, _video_length (len)
, _video_frame_rate (0)
, _video_frame_type (VIDEO_FRAME_TYPE_2D)
set_default_colour_conversion ();
}
-VideoContent::VideoContent (shared_ptr<const Film> f, boost::filesystem::path p)
- : Content (f, p)
+VideoContent::VideoContent (shared_ptr<const Film> film, boost::filesystem::path p)
+ : Content (film, p)
, _video_length (0)
, _video_frame_rate (0)
, _video_frame_type (VIDEO_FRAME_TYPE_2D)
set_default_colour_conversion ();
}
-VideoContent::VideoContent (shared_ptr<const Film> f, cxml::ConstNodePtr node, int version)
- : Content (f, node)
+VideoContent::VideoContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
+ : Content (film, node)
{
_video_size.width = node->number_child<int> ("VideoWidth");
_video_size.height = node->number_child<int> ("VideoHeight");
_scale = VideoContentScale (node->node_child ("Scale"));
}
-
+
if (node->optional_node_child ("ColourConversion")) {
_colour_conversion = ColourConversion (node->node_child ("ColourConversion"), version);
}
}
}
-VideoContent::VideoContent (shared_ptr<const Film> f, vector<shared_ptr<Content> > c)
- : Content (f, c)
+VideoContent::VideoContent (shared_ptr<const Film> film, vector<shared_ptr<Content> > c)
+ : Content (film, c)
, _video_length (0)
{
shared_ptr<VideoContent> ref = dynamic_pointer_cast<VideoContent> (c[0]);
if (vc->fade_in() != ref->fade_in() || vc->fade_out() != ref->fade_out()) {
throw JoinError (_("Content to be joined must have the same fades."));
}
-
+
_video_length += vc->video_length ();
}
LOG_GENERAL ("Video length obtained from header as %1 frames", _video_length);
set_default_colour_conversion ();
-
+
signal_changed (VideoContentProperty::VIDEO_SIZE);
signal_changed (VideoContentProperty::VIDEO_FRAME_RATE);
signal_changed (VideoContentProperty::VIDEO_SCALE);
{
{
boost::mutex::scoped_lock lm (_mutex);
-
+
if (_crop.left == c) {
return;
}
-
+
_crop.left = c;
}
-
+
signal_changed (VideoContentProperty::VIDEO_CROP);
}
if (_crop.right == c) {
return;
}
-
+
_crop.right = c;
}
-
+
signal_changed (VideoContentProperty::VIDEO_CROP);
}
if (_crop.top == c) {
return;
}
-
+
_crop.top = c;
}
-
+
signal_changed (VideoContentProperty::VIDEO_CROP);
}
if (_crop.bottom == c) {
return;
}
-
+
_crop.bottom = c;
}
if (_video_frame_rate == r) {
return;
}
-
+
_video_frame_rate = r;
}
-
+
signal_changed (VideoContentProperty::VIDEO_FRAME_RATE);
}
VideoContent::fade (Frame f) const
{
DCPOMATIC_ASSERT (f >= 0);
-
+
if (f < fade_in()) {
return float (f) / fade_in();
}
d << " (" << fixed << setprecision(2) << scaled.ratio() << ":1)\n";
}
-
+
if (scaled != container_size) {
d << String::compose (
_("Padded with black to fit container %1 (%2x%3)"),
d << _("Content frame rate");
d << " " << fixed << setprecision(4) << video_frame_rate() << "\n";
-
+
FrameRateChange frc (video_frame_rate(), film->video_frame_rate ());
d << frc.description () << "\n";