mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-07 11:55:10 +00:00
gstreamer-encoder: Also check for lpenc for va plugin
This commit is contained in:
parent
04de0657cf
commit
d561f81855
@ -976,24 +976,28 @@ static gchar *find_best_hw_plugin(const gchar *codec_name)
|
||||
{
|
||||
char plugins[][20] = {"msdk", "va", "vaapi"};
|
||||
gchar *feature_name;
|
||||
int i;
|
||||
const gchar *encode_gpu = get_encode_gpu();
|
||||
if (encode_gpu) {
|
||||
g_strlcat(plugins[1], encode_gpu, sizeof(plugins[1]));
|
||||
}
|
||||
|
||||
int i;
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS(plugins); i++) {
|
||||
feature_name = !codec_name ? g_strconcat(plugins[i], "postproc", NULL) :
|
||||
g_strconcat(plugins[i], codec_name, "enc", NULL);
|
||||
if (!gst_features_lookup(feature_name)) {
|
||||
g_free(feature_name);
|
||||
feature_name = NULL;
|
||||
continue;
|
||||
if (gst_features_lookup(feature_name)) {
|
||||
return feature_name;
|
||||
}
|
||||
g_free(feature_name);
|
||||
if(i == 1 && codec_name){
|
||||
feature_name = g_strconcat(plugins[i], "lpenc", NULL);
|
||||
if (gst_features_lookup(feature_name)) {
|
||||
return feature_name;
|
||||
}
|
||||
g_free(feature_name);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return feature_name;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static gchar *get_hw_gstenc_opts(const gchar *encoder, const gchar *codec_name)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user