summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-06-26 14:35:33 +0100
committerCarl Hetherington <cth@carlh.net>2014-06-26 14:35:33 +0100
commitd1125d09c7741d05b57b1520531a0451663ad66c (patch)
tree3a4dd044fdaf676d13c08e4b9fc207d3900b3251 /src/lib
parent02f028d271677b3b3669b5cdfda1597108a34b80 (diff)
Allow user to set video frame rate of video sources (to override the detected one).
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/video_content.cc15
-rw-r--r--src/lib/video_content.h1
2 files changed, 16 insertions, 0 deletions
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);