Skip to content

gst-inspect: fix --exists for plugins with versions other than GStreamer's version, like the Rust plugins

The gst_plugin_feature_check_version is incorrect here as it is being used to compare the plugin's own version against the gstreamer library version, which are not related.

Related Thread

The main issue at hand is when checking if an element exists via gst-inspect-1.0 --exists <element> will return non-zero if the plugin's version does not fit within the major/minor versions of the GStreamer library itself. You can view this behavior in the log by setting GST_DEBUG=*:DEBUG and running the command. The log will end with something like the following (in this example, against 1.22.9) before returning 1:

Checking whether 0.2.1 >= 1.22.0? no

Conversely, running gst-inspect-1.0 <element> succeeds and prints the element's information (and a zero exit value).

Edited by Thomas Goodwin

Merge request reports