WebPGetFeatures not exposed externally?

52 views
Skip to first unread message

gotson

unread,
Mar 20, 2022, 12:14:41 AM3/20/22
to WebP Discussion
Hi,

i am trying to use libwebp via https://github.com/jnr/jnr-ffi
The problem i have is that some functions like WebPGetFeatures are not exposed externally, and thus not usable.

I can use WebPGetFeaturesInternal, but I need to pass the WEBP_DECODER_ABI_VERSION.
However, I didn't find any way to get WEBP_DECODER_ABI_VERSION from the library.

There is a WebPGetDecoderVersion, but that doesn't return the ABI version, so I can't use that.

I could hardcode the ABI version, but that wouldn't really be future proof.

Is there a way to retrieve the ABI version dynamically ?

Thanks

James Zern

unread,
Mar 21, 2022, 7:41:20 PM3/21/22
to WebP Discussion
Hi,

On Sat, Mar 19, 2022 at 9:14 PM gotson <gauthier....@gmail.com> wrote:
Hi,

i am trying to use libwebp via https://github.com/jnr/jnr-ffi
The problem i have is that some functions like WebPGetFeatures are not exposed externally, and thus not usable.

This is part of the API, but it's true that the definition is contained in the headers (webp/decode.h in this case and not the library itself).
 

I can use WebPGetFeaturesInternal, but I need to pass the WEBP_DECODER_ABI_VERSION.
However, I didn't find any way to get WEBP_DECODER_ABI_VERSION from the library.

There is a WebPGetDecoderVersion, but that doesn't return the ABI version, so I can't use that.

I could hardcode the ABI version, but that wouldn't really be future proof.

Is there a way to retrieve the ABI version dynamically ?

No, that would defeat the purpose since the intent is to use the value the code was built with to avoid a mismatch in struct/function signatures. In your case your code will be calling functions that were defined at a particular ABI so it would make sense to use the value that the code was created with. If the function signatures changed for some reason your code would need to be reworked assuming the java wrapper faithfully exposes the functions.
 

Thanks

--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webp-discuss...@webmproject.org.
To view this discussion on the web visit https://groups.google.com/a/webmproject.org/d/msgid/webp-discuss/8a0a7ea3-ebfb-4993-ba90-d0037d921b6fn%40webmproject.org.
Reply all
Reply to author
Forward
0 new messages