summaryrefslogtreecommitdiff
path: root/src/lib/config.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-05-31 02:40:50 +0200
committerCarl Hetherington <cth@carlh.net>2025-06-17 00:04:03 +0200
commitdce8911cbc577f9f8f272d78c455e708c0b47aa9 (patch)
tree7884dc6b40bd88c3bef6e4b354799c7044e32756 /src/lib/config.cc
parentec06811bae7ed4fc6bd80c3154fd473028ee8e13 (diff)
Support cropping of content on playback (#3041).
This is to allow, for example, pillarboxed 1.78:1 DCPs to be played nicely on 1.78:1 projectors. DCP-o-matic can now crop the pillarboxing before display, rather than putting the pillarboxed 1.85:1 onto a 1.78:1 monitor, thereby adding letterboxing.
Diffstat (limited to 'src/lib/config.cc')
-rw-r--r--src/lib/config.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc
index d8402e2ec..5f3f2f6fe 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -614,6 +614,8 @@ try
_player_restricted_menus = f.optional_bool_child("PlayerRestrictedMenus").get_value_or(false);
_playlist_editor_restricted_menus = f.optional_bool_child("PlaylistEditorRestrictedMenus").get_value_or(false);
+ _player_crop_output_ratio = f.optional_number_child<float>("PlayerCropOutputRatio");
+
_image_display = f.optional_number_child<int>("ImageDisplay").get_value_or(0);
auto vc = f.optional_string_child("VideoViewType");
if (vc && *vc == "opengl") {
@@ -1081,6 +1083,10 @@ Config::write_config() const
cxml::add_text_child(root, "PlaylistEditorRestrictedMenus", "1");
}
+ if (_player_crop_output_ratio) {
+ cxml::add_text_child(root, "PlayerCropOutputRatio", fmt::to_string(*_player_crop_output_ratio));
+ }
+
/* [XML] ImageDisplay Screen number to put image on in dual-screen player mode. */
cxml::add_text_child(root, "ImageDisplay", fmt::to_string(_image_display));
switch (_video_view_type) {