v4l2transform: Implement stable element name

The first converter to be found will now gain the name v4l2convert.
Other converters will be named after the m2m dev node end point they are
attached to.

https://bugzilla.gnome.org/show_bug.cgi?id=784958
This commit is contained in:
Michael Tretter 2018-07-01 15:27:32 -04:00 committed by Nicolas Dufresne
parent 4c10a1ba27
commit 442c377b87

View file

@ -1184,7 +1184,10 @@ gst_v4l2_transform_register (GstPlugin * plugin, const gchar * basename,
type_info.class_data = cdata;
type_info.instance_init = gst_v4l2_transform_subinstance_init;
if (g_type_from_name ("v4l2convert") != 0)
type_name = g_strdup_printf ("v4l2%sconvert", basename);
else
type_name = g_strdup ("v4l2convert");
subtype = g_type_register_static (type, type_name, &type_info, 0);
if (!gst_element_register (plugin, type_name, GST_RANK_NONE, subtype))