decoder: Load HEIC/x265 as plugin

Closes #85

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/123>
This commit is contained in:
Sophie Herold 2023-03-05 21:18:31 +01:00 • committed by Christopher Davis
parent 670c79bc1a
commit ddf4b8c2fa
4 changed files with 57 additions and 7 deletions

View file

@ -44,6 +44,19 @@
"*.la",
"*.a"
],
"add-extensions": {
/* Exile HEIC (x265) codec into extension */
"org.gnome.Loupe.Devel.HEIC" : {
/* Relative to app dir */
"directory" : "lib/libheif-heic",
/* Relative to directory above */
"add-ld-path" : "lib",
/* Remove extension data from main flatpak package */
"bundle" : true,
/* Remove this extension when Loupe is deinstalled */
"autodelete" : true
}
},
"modules" : [
{
"name": "geocode-glib",
@ -91,10 +104,42 @@
]
},
{
/* HEIC (x265) decoder */
"name" : "libde265",
"buildsystem" : "cmake",
"config-opts": [
/* Install into folder for extension */
"-DCMAKE_INSTALL_PREFIX=/app/lib/libheif-heic",
"-DENABLE_SDL=Off"
],
"sources" : [
{
"type" : "git",
"url" : "https://github.com/strukturag/libde265.git",
"tag" : "v1.0.11"
}
]
},
{
"name" : "libheif",
"buildsystem" : "cmake",
"config-opts": [
/* Build HEIC (x265) as plugin */
"-DWITH_LIBDE265_PLUGIN=On",
"-DPLUGIN_DIRECTORY=/app/lib/libheif-heic/lib",
"-DLIBDE265_INCLUDE_DIR=/app/lib/libheif-heic/include",
"-DLIBDE265_PKGCONF_LIBRARY_DIRS=/app/lib/libheif-heic/lib",
/* Turn all encoders off */
"-DWITH_X265=Off",
"-DWITH_SvtEnc=Off",
"-DWITH_SvtEnc_PLUGIN=Off",
"-DWITH_AOM_ENCODER=Off",
/* Turn off plugins for AV1 */
"-DWITH_RAV1E_PLUGIN=Off",
/* Turn off unused AV1 decoders */
"-DWITH_RAV1E=Off",
/* No need for examples */
"-DWITH_EXAMPLES=Off"
],
"sources" : [
{