frei0r: fix plugin loading for frei0r elements that have no info.explanation

We don't allow empty descriptions for elements any more.
This commit is contained in:
Tim-Philipp Müller 2012-09-29 13:21:18 +01:00
parent 4712247e4f
commit f1f7171aa9
3 changed files with 15 additions and 3 deletions

View file

@ -185,6 +185,7 @@ gst_frei0r_filter_class_init (GstFrei0rFilterClass * klass,
GstElementClass *gstelement_class = (GstElementClass *) klass;
GstBaseTransformClass *gsttrans_class = (GstBaseTransformClass *) klass;
GstPadTemplate *templ;
const gchar *desc;
GstCaps *caps;
gchar *author;
@ -205,8 +206,11 @@ gst_frei0r_filter_class_init (GstFrei0rFilterClass * klass,
g_strdup_printf
("Sebastian Dröge <sebastian.droege@collabora.co.uk>, %s",
class_data->info.author);
desc = class_data->info.explanation;
if (desc == NULL || *desc == '\0')
desc = "No details";
gst_element_class_set_metadata (gstelement_class, class_data->info.name,
"Filter/Effect/Video", class_data->info.explanation, author);
"Filter/Effect/Video", desc, author);
g_free (author);
caps = gst_frei0r_caps_from_color_model (class_data->info.color_model);

View file

@ -613,6 +613,7 @@ gst_frei0r_mixer_class_init (GstFrei0rMixerClass * klass,
GObjectClass *gobject_class = (GObjectClass *) klass;
GstElementClass *gstelement_class = (GstElementClass *) klass;
GstPadTemplate *templ;
const gchar *desc;
GstCaps *caps;
gchar *author;
@ -633,8 +634,11 @@ gst_frei0r_mixer_class_init (GstFrei0rMixerClass * klass,
g_strdup_printf
("Sebastian Dröge <sebastian.droege@collabora.co.uk>, %s",
class_data->info.author);
desc = class_data->info.explanation;
if (desc == NULL || *desc == '\0')
desc = "No details";
gst_element_class_set_metadata (gstelement_class, class_data->info.name,
"Filter/Editor/Video", class_data->info.explanation, author);
"Filter/Editor/Video", desc, author);
g_free (author);
caps = gst_frei0r_caps_from_color_model (class_data->info.color_model);

View file

@ -316,6 +316,7 @@ gst_frei0r_src_class_init (GstFrei0rSrcClass * klass,
GstPushSrcClass *gstpushsrc_class = (GstPushSrcClass *) klass;
GstBaseSrcClass *gstbasesrc_class = (GstBaseSrcClass *) klass;
GstPadTemplate *templ;
const gchar *desc;
GstCaps *caps;
gchar *author;
@ -336,8 +337,11 @@ gst_frei0r_src_class_init (GstFrei0rSrcClass * klass,
g_strdup_printf
("Sebastian Dröge <sebastian.droege@collabora.co.uk>, %s",
class_data->info.author);
desc = class_data->info.explanation;
if (desc == NULL || *desc == '\0')
desc = "No details";
gst_element_class_set_metadata (gstelement_class, class_data->info.name,
"Src/Video", class_data->info.explanation, author);
"Src/Video", desc, author);
g_free (author);
caps = gst_frei0r_caps_from_color_model (class_data->info.color_model);