show the rank of a plugin feature. (actually, only element factory at this time)

Original commit message from CVS:
show the rank of a plugin feature.  (actually, only element factory
at this time)
This commit is contained in:
David Schleef 2003-08-21 05:57:05 +00:00
parent 0bdeb40920
commit 6da01e65b9

View file

@ -448,6 +448,23 @@ print_element_properties (GstElement *element)
g_print (" none\n");
}
static char *
get_rank_name (gint rank)
{
switch(rank){
case GST_ELEMENT_RANK_NONE:
return "none";
case GST_ELEMENT_RANK_MARGINAL:
return "marginal";
case GST_ELEMENT_RANK_SECONDARY:
return "secondary";
case GST_ELEMENT_RANK_PRIMARY:
return "primary";
default:
return "unknown";
}
}
static gint
print_element_info (GstElementFactory *factory)
{
@ -480,6 +497,7 @@ print_element_info (GstElementFactory *factory)
g_print (" Version:\t%s\n", factory->details->version);
g_print (" Author(s):\t%s\n", factory->details->author);
g_print (" Copyright:\t%s\n", factory->details->copyright);
g_print (" Rank:\t\t%s\n", get_rank_name(GST_PLUGIN_FEATURE(factory)->rank));
g_print ("\n");
output_hierarchy (G_OBJECT_TYPE (element), 0, &maxlevel);