From d1125d09c7741d05b57b1520531a0451663ad66c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 26 Jun 2014 14:35:33 +0100 Subject: Allow user to set video frame rate of video sources (to override the detected one). --- src/lib/video_content.cc | 15 +++++++++++++++ src/lib/video_content.h | 1 + 2 files changed, 16 insertions(+) (limited to 'src/lib') diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index 6f6b2c441..676a694da 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -405,6 +405,21 @@ VideoContent::scale_and_crop_to_fit_height () set_right_crop (crop / 2); } +void +VideoContent::set_video_frame_rate (float r) +{ + { + boost::mutex::scoped_lock lm (_mutex); + if (_video_frame_rate == r) { + return; + } + + _video_frame_rate = r; + } + + signal_changed (VideoContentProperty::VIDEO_FRAME_RATE); +} + VideoContentScale::VideoContentScale (Ratio const * r) : _ratio (r) , _scale (true) diff --git a/src/lib/video_content.h b/src/lib/video_content.h index f23bf0abe..d0b907cb8 100644 --- a/src/lib/video_content.h +++ b/src/lib/video_content.h @@ -116,6 +116,7 @@ public: } void set_video_frame_type (VideoFrameType); + void set_video_frame_rate (float); void set_left_crop (int); void set_right_crop (int); -- cgit v1.2.3