summaryrefslogtreecommitdiff
path: root/src/lib/video_content.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-10-02 11:34:01 +0200
committerCarl Hetherington <cth@carlh.net>2021-10-02 11:34:01 +0200
commit6d1a6b588c1c8add26a42dafc971146462cfccf0 (patch)
tree4ce47b80f6e161650182d4d8efb1d52d88b94c85 /src/lib/video_content.h
parentfae11d166fd4f1d56ce8cfe59a3af78feb336733 (diff)
Replace crop() with actual_crop and requested_crop()yuv-cropping
This means that the crop rounding we do is reported properly, not done behind the user's back.
Diffstat (limited to 'src/lib/video_content.h')
-rw-r--r--src/lib/video_content.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lib/video_content.h b/src/lib/video_content.h
index 31346ffcd..d670f72c8 100644
--- a/src/lib/video_content.h
+++ b/src/lib/video_content.h
@@ -112,27 +112,29 @@ public:
return _frame_type;
}
- Crop crop () const {
+ Crop actual_crop () const;
+
+ Crop requested_crop () const {
boost::mutex::scoped_lock lm (_mutex);
return _crop;
}
- int left_crop () const {
+ int requested_left_crop () const {
boost::mutex::scoped_lock lm (_mutex);
return _crop.left;
}
- int right_crop () const {
+ int requested_right_crop () const {
boost::mutex::scoped_lock lm (_mutex);
return _crop.right;
}
- int top_crop () const {
+ int requested_top_crop () const {
boost::mutex::scoped_lock lm (_mutex);
return _crop.top;
}
- int bottom_crop () const {
+ int requested_bottom_crop () const {
boost::mutex::scoped_lock lm (_mutex);
return _crop.bottom;
}
@@ -227,6 +229,7 @@ private:
boost::optional<ColourConversion> _colour_conversion;
dcp::Size _size;
VideoFrameType _frame_type;
+ /** crop that the user has asked for; it may be rounded if we are cropping a subsampled source */
Crop _crop;
/** ratio to scale cropped image to (or none to guess); i.e. if set, scale to _custom_ratio:1 */
boost::optional<float> _custom_ratio;