From dce8911cbc577f9f8f272d78c455e708c0b47aa9 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 31 May 2025 02:40:50 +0200 Subject: 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. --- src/lib/config.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/lib/config.cc') 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("PlayerCropOutputRatio"); + _image_display = f.optional_number_child("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) { -- cgit v1.2.3