mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 10:19:59 +01:00
Making sure disabling accelerated hardware acceleration on codec
decoding discards the corresponding gstreamer decoders.
This commit is contained in:
@@ -137,7 +137,7 @@ string GstToolkit::gst_version()
|
||||
|
||||
// see https://developer.ridgerun.com/wiki/index.php?title=GStreamer_modify_the_elements_rank
|
||||
|
||||
std::list<std::string> GstToolkit::enable_gpu_decoding_plugins()
|
||||
std::list<std::string> GstToolkit::enable_gpu_decoding_plugins(bool enable)
|
||||
{
|
||||
static list<string> pluginslist;
|
||||
static GstRegistry* plugins_register = nullptr;
|
||||
@@ -162,7 +162,7 @@ std::list<std::string> GstToolkit::enable_gpu_decoding_plugins()
|
||||
GstPluginFeature* feature = gst_registry_lookup_feature(plugins_register, plugins[i]);
|
||||
if(feature != NULL) {
|
||||
pluginslist.push_front( string( plugins[i] ) );
|
||||
gst_plugin_feature_set_rank(feature, GST_RANK_PRIMARY + 1);
|
||||
gst_plugin_feature_set_rank(feature, enable ? GST_RANK_PRIMARY + 1 : GST_RANK_MARGINAL);
|
||||
gst_object_unref(feature);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ std::string filename_to_uri(std::string filename);
|
||||
std::string gst_version();
|
||||
|
||||
std::list<std::string> all_plugins();
|
||||
std::list<std::string> enable_gpu_decoding_plugins();
|
||||
std::list<std::string> enable_gpu_decoding_plugins(bool enable = true);
|
||||
|
||||
std::list<std::string> all_plugin_features(std::string pluginname);
|
||||
bool enable_feature (std::string name, bool enable);
|
||||
|
||||
@@ -158,8 +158,8 @@ bool Rendering::init()
|
||||
gst_init (NULL, NULL);
|
||||
|
||||
// increase selection rank for GPU decoding plugins
|
||||
std::list<std::string> gpuplugins = GstToolkit::enable_gpu_decoding_plugins(Settings::application.render.gpu_decoding);
|
||||
if (Settings::application.render.gpu_decoding) {
|
||||
std::list<std::string> gpuplugins = GstToolkit::enable_gpu_decoding_plugins();
|
||||
if (gpuplugins.size() > 0) {
|
||||
Log::Info("Video decoding favoring the following GPU decoding plugin(s):");
|
||||
for(auto it = gpuplugins.begin(); it != gpuplugins.end(); it++)
|
||||
|
||||
Reference in New Issue
Block a user