如何更改Gstreamer插件的等级? [英] How do I change the rank of a Gstreamer plugin?

查看:150
本文介绍了如何更改Gstreamer插件的等级?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载并编译了vaapi插件集,在某些特定情况下,它很好用,但同时也破坏了我现有的许多管道.我想将Gstreamer修改为首先使用其他解码器.

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.

是否可以在不修改原始来源的情况下更改Gstreamer插件的等级?

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

推荐答案

我在Gstreamer注册表文件中看不到在配置级别执行此操作的方法.这段代码可以解决问题:

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);

这篇关于如何更改Gstreamer插件的等级?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆