Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the rank of a Gstreamer plugin?

I've downloaded and compiled the vaapi plugin set, and for some specific cases it works great, but it also breaks many of my existing pipelines. I'd like to modify Gstreamer to use other decoders first.

Is there a way to alter the rank of Gstreamer plugins without modifying the original sources?

like image 805
mpr Avatar asked Dec 10 '25 22:12

mpr


1 Answers

I don't see a means of doing this at a configuration level in the Gstreamer registry file. This code does the trick though:

GstRegistry* reg = gst_registry_get();

GstPluginFeature* vaapi_decode = gst_registry_lookup_feature(reg, "vaapidecode");

if(vaapi_decode == NULL) {
    return;
}

gst_plugin_feature_set_rank(vaapi_decode, GST_RANK_PRIMARY - 1);

gst_object_unref(vaapi_decode);
like image 75
mpr Avatar answered Dec 16 '25 23:12

mpr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!