Checking for available libheif codecs at compile-time
The meson.build
file is currently checking for available HEIF codecs at compile-time:
https://gitlab.gnome.org/GNOME/gimp/-/blob/4b6ff68094abd7bd3dd9a074d0ee1dacd3b9ff00/meson.build#L755-770
This check will not be accurate anymore with libheif >= 1.14.0 because codecs can be added as libheif plugins at runtime. This was added so that various codecs can be installed as separate packages instead of building everything into the libheif library as a big dependency blob.
Consequently, it is not possible anymore to tell at compile-time which codecs the user will have installed.
The variables builtin_????_encoder
are now always set to 'yes' (https://github.com/strukturag/libheif/issues/758).
Thus, your current check will still work, but may return more codecs than are actually available. When trying to use them, you will get a runtime error instead.
You can also check for available codecs with heif_have_encoder_for_format()
after library initialization (heif_init()
) to check the availability. For example in order to disable some codecs in the UI.