Cykooz / libheif-rs

Safe wrapper to libheif-sys for parsing heif/heic files
MIT License
34 stars 11 forks source link

Plugin support #10

Closed sophie-h closed 1 year ago

sophie-h commented 1 year ago

We have merged HEIF support into Loupe by now and it's working great :)

However, we have to move HEIC support into a libheif plugin for some situations because of licensing. Therefore it would be nice to have a safe binding for

And it looks like

would also be helpful. (However, I'm not sure yet if they should be called before and after every use of the decoder?)

It looks like the following function would allow seeing if the plugin is already loaded. So would also be nice to have them available (not in -sys yet)

And finally, something like this would be nice for debug summaries

Thanks a lot for your support so far!

Cykooz commented 1 year ago

@sophie-h How about load_plugins(path) to load all plugins from a given directory instead of load_plugin(path)?

Cykooz commented 1 year ago
  • heif_get_decoder_descriptors (not in -sys as far as I can see)
  • heif_decoder_descriptor_get_name
  • heif_decoder_descriptor_get_id_name

These functions was added in v1.15 of libheif. But I use version from Ubuntu PPA of libheif. @strukturag has not yet published v1.15 in this PPA.

sophie-h commented 1 year ago

How about load_plugins(path) to load all plugins from a given directory instead of load_plugin(path)?

Ah, I missed that this function is for a directory. Yes, that sounds good

sophie-h commented 1 year ago

These functions was added in v1.15

Good point. Maybe Loupe doesn't want to depend on 1.15 yet because we want to give distros the chance to try it out early to give feedback before it becomes a GNOME Core app.

Cykooz commented 1 year ago

@sophie-h I have released v0.19.0