inspect: add support for the new factory

Handle tracer modules.
This commit is contained in:
Stefan Sauer 2013-10-26 22:05:13 +02:00
parent 4e5d586c7d
commit 6e9f018dc4

View file

@ -1141,6 +1141,7 @@ print_plugin_features (GstPlugin * plugin)
GList *features, *origlist;
gint num_features = 0;
gint num_elements = 0;
gint num_tracers = 0;
gint num_typefinders = 0;
gint num_devproviders = 0;
gint num_other = 0;
@ -1191,6 +1192,10 @@ print_plugin_features (GstPlugin * plugin)
gst_device_provider_factory_get_metadata (factory,
GST_ELEMENT_METADATA_LONGNAME));
num_devproviders++;
} else if (GST_IS_TRACER_FACTORY (feature)) {
n_print (" %s (%s)\n", gst_object_get_name (GST_OBJECT (feature)),
g_type_name (G_OBJECT_TYPE (feature)));
num_tracers++;
} else if (feature) {
n_print (" %s (%s)\n", gst_object_get_name (GST_OBJECT (feature)),
g_type_name (G_OBJECT_TYPE (feature)));
@ -1210,6 +1215,8 @@ print_plugin_features (GstPlugin * plugin)
n_print (" +-- %d typefinders\n", num_typefinders);
if (num_devproviders > 0)
n_print (" +-- %d device providers\n", num_devproviders);
if (num_tracers > 0)
n_print (" +-- %d tracers\n", num_tracers);
if (num_other > 0)
n_print (" +-- %d other objects\n", num_other);
@ -1228,6 +1235,12 @@ print_element_features (const gchar * element_name)
n_print ("%s: a typefind function\n", element_name);
return 0;
}
feature = gst_registry_find_feature (gst_registry_get (), element_name,
GST_TYPE_TRACER_FACTORY);
if (feature) {
n_print ("%s: a tracer module\n", element_name);
return 0;
}
return -1;
}