2015-11-04 31 views
0

我已經下載並編譯了vaapi插件集,並且對於一些特定的情況,它工作的很好,但它也打破了我現有的許多管道。我想修改Gstreamer首先使用其他解碼器。如何更改Gstreamer插件的排名?

有沒有辦法改變Gstreamer插件的排名而不修改原始來源?

回答

1

我沒有看到在Gstreamer註冊表文件中的配置級別執行此操作的方法。儘管如此,這段代碼的確如此:

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