CineEncoder / cine-encoder

Cine Encoder is an application that allow to convert media files while preserving HDR metadata.
GNU General Public License v3.0
98 stars 12 forks source link

Replace 'ini' hosted presets with XML #77

Open philstopford opened 11 months ago

philstopford commented 11 months ago

This builds on earlier PRs to replace preset.ini files with XML files. The intent of this change is to make the preset system more flexible. Settings are now retrieved by tags instead of a relative index in a file; this makes it easier to deal with version upgrades and managing settings. There is no need to throw away the user's settings - we can retrieve the preset information from the user and modify an internal 'default' preset to add (or ignore) values we don't care about in the current tool version. This PR retains the version tag in the XML, in case some future need arises, but the approach of using the preset-defined values to modify a 'default' preset should make this largely robust.

The XML also makes it trivial for the user to make batch changes externally, should they wish, via a text editor for search and replace. I also tend to think this makes the code easier to understand internally because the intent for a setting is explicit rather than implied by some index.