- optional<float> const ar = d->sample_aspect_ratio ();
-
- {
- boost::mutex::scoped_lock lm (_mutex);
- _video_size = vs;
- /* Default video frame rate to 24fps if the examiner doesn't know */
- _video_frame_rate = vfr.get_value_or (24);
- _video_length = vl;
- _sample_aspect_ratio = ar;
-
- /* Guess correct scale from size and sample aspect ratio */
- _scale = VideoContentScale (
- Ratio::nearest_from_ratio (float (_video_size.width) * ar.get_value_or (1) / _video_size.height)
- );
- }
-
- shared_ptr<const Film> film = _film.lock ();
- DCPOMATIC_ASSERT (film);
- 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);
- signal_changed (ContentProperty::LENGTH);
-}
-
-void
-VideoContent::set_left_crop (int c)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
-
- if (_crop.left == c) {
- return;
- }
-
- _crop.left = c;
- }
-
- signal_changed (VideoContentProperty::VIDEO_CROP);
-}
-
-void
-VideoContent::set_right_crop (int c)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- if (_crop.right == c) {
- return;
- }
-
- _crop.right = c;
- }
-
- signal_changed (VideoContentProperty::VIDEO_CROP);
-}