2001-01-03 07:38:45 +00:00
|
|
|
#include <gst/gst.h>
|
2002-04-14 10:13:24 +00:00
|
|
|
#include <gst/control/control.h>
|
2001-01-04 10:47:39 +00:00
|
|
|
#include <string.h>
|
2001-01-03 07:38:45 +00:00
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
static void
|
|
|
|
print_prop (GstPropsEntry *prop, gboolean showname, gchar *pfx)
|
|
|
|
{
|
2002-03-30 17:06:45 +00:00
|
|
|
GstPropsType type;
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
|
|
|
|
if (showname)
|
2002-03-30 17:06:45 +00:00
|
|
|
printf("%s%s: ", pfx, gst_props_entry_get_name (prop));
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
else
|
|
|
|
printf(pfx);
|
|
|
|
|
2002-03-30 17:06:45 +00:00
|
|
|
type = gst_props_entry_get_type (prop);
|
|
|
|
|
|
|
|
switch (type) {
|
|
|
|
case GST_PROPS_INT_TYPE:
|
|
|
|
{
|
|
|
|
gint val;
|
|
|
|
gst_props_entry_get_int (prop, &val);
|
|
|
|
printf("Integer: %d\n", val);
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
break;
|
2002-03-30 17:06:45 +00:00
|
|
|
}
|
|
|
|
case GST_PROPS_INT_RANGE_TYPE:
|
|
|
|
{
|
|
|
|
gint min, max;
|
|
|
|
gst_props_entry_get_int_range (prop, &min, &max);
|
|
|
|
printf("Integer range: %d - %d\n", min, max);
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
break;
|
2002-03-30 17:06:45 +00:00
|
|
|
}
|
|
|
|
case GST_PROPS_FLOAT_TYPE:
|
|
|
|
{
|
|
|
|
gfloat val;
|
|
|
|
gst_props_entry_get_float (prop, &val);
|
|
|
|
printf("Float: %f\n", val);
|
2001-04-28 19:16:30 +00:00
|
|
|
break;
|
2002-03-30 17:06:45 +00:00
|
|
|
}
|
|
|
|
case GST_PROPS_FLOAT_RANGE_TYPE:
|
|
|
|
{
|
|
|
|
gfloat min, max;
|
|
|
|
gst_props_entry_get_float_range (prop, &min, &max);
|
|
|
|
printf("Float range: %f - %f\n", min, max);
|
2001-04-28 19:16:30 +00:00
|
|
|
break;
|
2002-03-30 17:06:45 +00:00
|
|
|
}
|
|
|
|
case GST_PROPS_BOOL_TYPE:
|
|
|
|
{
|
|
|
|
gboolean val;
|
|
|
|
gst_props_entry_get_boolean (prop, &val);
|
|
|
|
printf("Boolean: %s\n", val ? "TRUE" : "FALSE");
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
break;
|
2002-03-30 17:06:45 +00:00
|
|
|
}
|
|
|
|
case GST_PROPS_STRING_TYPE:
|
|
|
|
{
|
|
|
|
const gchar *val;
|
|
|
|
gst_props_entry_get_string (prop, &val);
|
|
|
|
printf("String: %s\n", val);
|
2001-03-24 17:22:03 +00:00
|
|
|
break;
|
2002-03-30 17:06:45 +00:00
|
|
|
}
|
|
|
|
case GST_PROPS_FOURCC_TYPE:
|
|
|
|
{
|
|
|
|
guint32 val;
|
|
|
|
gst_props_entry_get_fourcc_int (prop, &val);
|
2001-05-27 23:57:34 +00:00
|
|
|
printf("FourCC: '%c%c%c%c'\n",
|
2002-03-30 17:06:45 +00:00
|
|
|
(gchar)( val & 0xff),
|
|
|
|
(gchar)((val >> 8) & 0xff),
|
|
|
|
(gchar)((val >> 16) & 0xff),
|
|
|
|
(gchar)((val >> 24) & 0xff));
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
break;
|
2002-03-30 17:06:45 +00:00
|
|
|
}
|
|
|
|
case GST_PROPS_LIST_TYPE:
|
|
|
|
{
|
|
|
|
const GList *list;
|
|
|
|
gchar *longprefix;
|
|
|
|
|
|
|
|
gst_props_entry_get_list (prop, &list);
|
|
|
|
printf ("List:\n");
|
|
|
|
longprefix = g_strdup_printf ("%s ", pfx);
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
while (list) {
|
2002-03-30 17:06:45 +00:00
|
|
|
GstPropsEntry *listentry;
|
|
|
|
|
|
|
|
listentry = (GstPropsEntry*) (list->data);
|
|
|
|
print_prop (listentry, FALSE, longprefix);
|
|
|
|
|
|
|
|
list = g_list_next (list);
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
}
|
2002-03-30 17:06:45 +00:00
|
|
|
g_free (longprefix);
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
break;
|
2002-03-30 17:06:45 +00:00
|
|
|
}
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
default:
|
2002-03-30 17:06:45 +00:00
|
|
|
printf("unknown props %d\n", type);
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
static void
|
|
|
|
print_props (GstProps *properties, gchar *pfx)
|
|
|
|
{
|
2001-01-03 20:21:22 +00:00
|
|
|
GList *props;
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
GstPropsEntry *prop;
|
|
|
|
|
|
|
|
props = properties->properties;
|
|
|
|
while (props) {
|
|
|
|
prop = (GstPropsEntry*)(props->data);
|
2001-01-03 20:21:22 +00:00
|
|
|
props = g_list_next(props);
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
|
|
|
|
print_prop(prop,TRUE,pfx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-07-25 21:40:42 +00:00
|
|
|
static void
|
|
|
|
output_hierarchy (GType type, gint level, gint *maxlevel)
|
|
|
|
{
|
|
|
|
GType parent;
|
|
|
|
gint i;
|
|
|
|
|
|
|
|
parent = g_type_parent (type);
|
|
|
|
|
|
|
|
*maxlevel = *maxlevel + 1;
|
|
|
|
level++;
|
|
|
|
|
|
|
|
if (parent)
|
|
|
|
output_hierarchy (parent, level, maxlevel);
|
|
|
|
|
|
|
|
for (i=1; i<*maxlevel-level; i++)
|
|
|
|
g_print (" ");
|
|
|
|
if (*maxlevel-level)
|
|
|
|
g_print (" +----");
|
|
|
|
|
|
|
|
g_print ("%s\n", g_type_name (type));
|
|
|
|
|
|
|
|
if (level == 1)
|
|
|
|
g_print ("\n");
|
|
|
|
}
|
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
static gint
|
2001-03-07 21:52:56 +00:00
|
|
|
print_element_info (GstElementFactory *factory)
|
|
|
|
{
|
2001-01-03 07:38:45 +00:00
|
|
|
GstElement *element;
|
2001-01-29 00:06:02 +00:00
|
|
|
GstObjectClass *gstobject_class;
|
2001-01-03 07:38:45 +00:00
|
|
|
GstElementClass *gstelement_class;
|
2001-03-13 22:21:29 +00:00
|
|
|
GList *pads;
|
|
|
|
GstCaps *caps;
|
2001-01-03 07:38:45 +00:00
|
|
|
GstPad *pad;
|
2001-01-19 02:23:35 +00:00
|
|
|
GstRealPad *realpad;
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
GstPadTemplate *padtemplate;
|
2001-06-25 01:20:11 +00:00
|
|
|
gint num_properties,i;
|
|
|
|
GParamSpec **property_specs;
|
2001-05-25 21:00:07 +00:00
|
|
|
GList *children;
|
|
|
|
GstElement *child;
|
2001-05-20 20:12:45 +00:00
|
|
|
gboolean have_flags;
|
2001-07-25 21:40:42 +00:00
|
|
|
gint maxlevel = 0;
|
2001-01-03 07:38:45 +00:00
|
|
|
|
2002-04-11 20:35:18 +00:00
|
|
|
element = gst_element_factory_create(factory,"element");
|
2001-01-04 10:47:39 +00:00
|
|
|
if (!element) {
|
|
|
|
g_print ("couldn't construct element for some reason\n");
|
2001-01-03 20:21:22 +00:00
|
|
|
return -1;
|
|
|
|
}
|
2001-01-29 00:06:02 +00:00
|
|
|
|
2001-06-25 01:20:11 +00:00
|
|
|
gstobject_class = GST_OBJECT_CLASS (G_OBJECT_GET_CLASS (element));
|
|
|
|
gstelement_class = GST_ELEMENT_CLASS (G_OBJECT_GET_CLASS (element));
|
2001-01-03 07:38:45 +00:00
|
|
|
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
printf("Factory Details:\n");
|
2001-01-03 07:38:45 +00:00
|
|
|
printf(" Long name:\t%s\n",factory->details->longname);
|
|
|
|
printf(" Class:\t%s\n",factory->details->klass);
|
|
|
|
printf(" Description:\t%s\n",factory->details->description);
|
|
|
|
printf(" Version:\t%s\n",factory->details->version);
|
|
|
|
printf(" Author(s):\t%s\n",factory->details->author);
|
|
|
|
printf(" Copyright:\t%s\n",factory->details->copyright);
|
|
|
|
printf("\n");
|
|
|
|
|
2001-07-25 21:40:42 +00:00
|
|
|
output_hierarchy (G_OBJECT_TYPE (element), 0, &maxlevel);
|
|
|
|
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
printf("Pad Templates:\n");
|
2001-01-03 20:55:16 +00:00
|
|
|
if (factory->numpadtemplates) {
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
pads = factory->padtemplates;
|
|
|
|
while (pads) {
|
|
|
|
padtemplate = (GstPadTemplate*)(pads->data);
|
|
|
|
pads = g_list_next(pads);
|
|
|
|
|
|
|
|
if (padtemplate->direction == GST_PAD_SRC)
|
|
|
|
printf(" SRC template: '%s'\n",padtemplate->name_template);
|
|
|
|
else if (padtemplate->direction == GST_PAD_SINK)
|
|
|
|
printf(" SINK template: '%s'\n",padtemplate->name_template);
|
|
|
|
else
|
|
|
|
printf(" UNKNOWN!!! template: '%s'\n",padtemplate->name_template);
|
|
|
|
|
|
|
|
if (padtemplate->presence == GST_PAD_ALWAYS)
|
2001-06-25 01:20:11 +00:00
|
|
|
printf(" Availability: Always\n");
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
else if (padtemplate->presence == GST_PAD_SOMETIMES)
|
2001-06-25 01:20:11 +00:00
|
|
|
printf(" Availability: Sometimes\n");
|
2001-07-11 15:50:16 +00:00
|
|
|
else if (padtemplate->presence == GST_PAD_REQUEST) {
|
2001-06-25 01:20:11 +00:00
|
|
|
printf(" Availability: On request\n");
|
2001-07-11 15:50:16 +00:00
|
|
|
printf(" Has request_new_pad() function: %s\n",
|
|
|
|
GST_DEBUG_FUNCPTR_NAME(gstelement_class->request_new_pad));
|
|
|
|
}
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
else
|
2001-06-25 01:20:11 +00:00
|
|
|
printf(" Availability: UNKNOWN!!!\n");
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
|
|
|
|
if (padtemplate->caps) {
|
|
|
|
printf(" Capabilities:\n");
|
|
|
|
caps = padtemplate->caps;
|
|
|
|
while (caps) {
|
2001-01-03 20:21:22 +00:00
|
|
|
GstType *type;
|
|
|
|
|
2001-03-13 22:21:29 +00:00
|
|
|
printf(" '%s':\n",caps->name);
|
2001-01-03 20:21:22 +00:00
|
|
|
|
2001-03-13 22:21:29 +00:00
|
|
|
type = gst_type_find_by_id (caps->id);
|
2001-01-03 20:21:22 +00:00
|
|
|
if (type)
|
|
|
|
printf(" MIME type: '%s':\n",type->mime);
|
|
|
|
else
|
|
|
|
printf(" MIME type: 'unknown/unknown':\n");
|
|
|
|
|
2001-03-13 22:21:29 +00:00
|
|
|
if (caps->properties)
|
|
|
|
print_props(caps->properties," ");
|
|
|
|
|
|
|
|
caps = caps->next;
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
printf("\n");
|
|
|
|
}
|
|
|
|
} else
|
2001-05-25 21:00:07 +00:00
|
|
|
printf(" none\n");
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
|
2001-05-20 20:12:45 +00:00
|
|
|
have_flags = FALSE;
|
|
|
|
|
2002-03-30 17:06:45 +00:00
|
|
|
printf("\nElement Flags:\n");
|
2001-05-20 20:12:45 +00:00
|
|
|
if (GST_FLAG_IS_SET(element,GST_ELEMENT_COMPLEX)) {
|
2001-01-03 07:38:45 +00:00
|
|
|
printf(" GST_ELEMENT_COMPLEX\n");
|
2001-05-20 20:12:45 +00:00
|
|
|
have_flags = TRUE;
|
|
|
|
}
|
|
|
|
if (GST_FLAG_IS_SET(element,GST_ELEMENT_DECOUPLED)) {
|
2001-01-03 07:38:45 +00:00
|
|
|
printf(" GST_ELEMENT_DECOUPLED\n");
|
2001-05-20 20:12:45 +00:00
|
|
|
have_flags = TRUE;
|
|
|
|
}
|
|
|
|
if (GST_FLAG_IS_SET(element,GST_ELEMENT_THREAD_SUGGESTED)) {
|
2001-01-03 07:38:45 +00:00
|
|
|
printf(" GST_ELEMENT_THREADSUGGESTED\n");
|
2001-05-20 20:12:45 +00:00
|
|
|
have_flags = TRUE;
|
|
|
|
}
|
|
|
|
if (GST_FLAG_IS_SET(element,GST_ELEMENT_NO_SEEK)) {
|
2001-01-03 07:38:45 +00:00
|
|
|
printf(" GST_ELEMENT_NO_SEEK\n");
|
2001-05-20 20:12:45 +00:00
|
|
|
have_flags = TRUE;
|
|
|
|
}
|
|
|
|
if (!have_flags)
|
2001-01-03 07:38:45 +00:00
|
|
|
printf(" no flags set\n");
|
|
|
|
|
2002-03-30 17:06:45 +00:00
|
|
|
if (GST_IS_BIN (element)) {
|
|
|
|
printf("\nBin Flags:\n");
|
|
|
|
if (GST_FLAG_IS_SET(element,GST_BIN_FLAG_MANAGER)) {
|
|
|
|
printf(" GST_BIN_FLAG_MANAGER\n");
|
|
|
|
have_flags = TRUE;
|
|
|
|
}
|
|
|
|
if (GST_FLAG_IS_SET(element,GST_BIN_SELF_SCHEDULABLE)) {
|
|
|
|
printf(" GST_BIN_SELF_SCHEDULABLE\n");
|
|
|
|
have_flags = TRUE;
|
|
|
|
}
|
|
|
|
if (GST_FLAG_IS_SET(element,GST_BIN_FLAG_PREFER_COTHREADS)) {
|
|
|
|
printf(" GST_BIN_FLAG_PREFER_COTHREADS\n");
|
|
|
|
have_flags = TRUE;
|
|
|
|
}
|
|
|
|
if (!have_flags)
|
|
|
|
printf(" no flags set\n");
|
|
|
|
}
|
|
|
|
|
2001-01-03 07:38:45 +00:00
|
|
|
|
2001-05-25 21:00:07 +00:00
|
|
|
|
|
|
|
printf("\nElement Implementation:\n");
|
|
|
|
|
2001-01-03 07:38:45 +00:00
|
|
|
if (element->loopfunc)
|
2001-05-25 21:00:07 +00:00
|
|
|
printf(" loopfunc()-based element: %s\n",GST_DEBUG_FUNCPTR_NAME(element->loopfunc));
|
2001-01-03 07:38:45 +00:00
|
|
|
else
|
|
|
|
printf(" No loopfunc(), must be chain-based or not configured yet\n");
|
|
|
|
|
2001-05-25 21:00:07 +00:00
|
|
|
printf(" Has change_state() function: %s\n",
|
|
|
|
GST_DEBUG_FUNCPTR_NAME(gstelement_class->change_state));
|
2001-10-17 10:21:27 +00:00
|
|
|
#ifndef GST_DISABLE_LOADSAVE
|
2001-05-25 21:00:07 +00:00
|
|
|
printf(" Has custom save_thyself() function: %s\n",
|
|
|
|
GST_DEBUG_FUNCPTR_NAME(gstobject_class->save_thyself));
|
|
|
|
printf(" Has custom restore_thyself() function: %s\n",
|
|
|
|
GST_DEBUG_FUNCPTR_NAME(gstobject_class->restore_thyself));
|
2001-10-17 10:21:27 +00:00
|
|
|
#endif
|
2001-01-03 07:38:45 +00:00
|
|
|
|
2002-03-30 17:06:45 +00:00
|
|
|
have_flags = FALSE;
|
|
|
|
|
|
|
|
printf("\nClocking Interaction:\n");
|
|
|
|
if (element->setclockfunc) {
|
|
|
|
printf(" element requires a clock\n");
|
|
|
|
have_flags = TRUE;
|
|
|
|
}
|
|
|
|
if (element->getclockfunc) {
|
|
|
|
GstClock *clock;
|
|
|
|
|
|
|
|
clock = gst_element_get_clock (element);
|
|
|
|
printf(" element provides a clock: %s\n", GST_OBJECT_NAME(clock));
|
|
|
|
have_flags = TRUE;
|
|
|
|
}
|
|
|
|
if (!have_flags) {
|
|
|
|
printf(" none\n");
|
|
|
|
}
|
2001-05-25 21:00:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
printf("\nPads:\n");
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
if (element->numpads) {
|
|
|
|
pads = gst_element_get_pad_list(element);
|
|
|
|
while (pads) {
|
|
|
|
pad = GST_PAD(pads->data);
|
|
|
|
pads = g_list_next(pads);
|
2001-05-25 21:00:07 +00:00
|
|
|
realpad = GST_PAD_REALIZE(pad);
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
|
|
|
|
if (gst_pad_get_direction(pad) == GST_PAD_SRC)
|
2001-05-25 21:00:07 +00:00
|
|
|
printf(" SRC: '%s'",gst_pad_get_name(pad));
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
else if (gst_pad_get_direction(pad) == GST_PAD_SINK)
|
2001-05-25 21:00:07 +00:00
|
|
|
printf(" SINK: '%s'",gst_pad_get_name(pad));
|
2001-01-03 07:38:45 +00:00
|
|
|
else
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
printf(" UNKNOWN!!!: '%s'\n",gst_pad_get_name(pad));
|
|
|
|
|
2001-05-25 21:00:07 +00:00
|
|
|
if (GST_IS_GHOST_PAD(pad))
|
|
|
|
printf(", ghost of real pad %s:%s\n",GST_DEBUG_PAD_NAME(realpad));
|
|
|
|
else
|
|
|
|
printf("\n");
|
|
|
|
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
printf(" Implementation:\n");
|
2001-01-19 02:23:35 +00:00
|
|
|
if (realpad->chainfunc)
|
|
|
|
printf(" Has chainfunc(): %s\n",GST_DEBUG_FUNCPTR_NAME(realpad->chainfunc));
|
|
|
|
if (realpad->getfunc)
|
|
|
|
printf(" Has getfunc(): %s\n",GST_DEBUG_FUNCPTR_NAME(realpad->getfunc));
|
|
|
|
if (realpad->getregionfunc)
|
|
|
|
printf(" Has getregionfunc(): %s\n",GST_DEBUG_FUNCPTR_NAME(realpad->getregionfunc));
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
|
|
|
|
if (pad->padtemplate)
|
|
|
|
printf(" Pad Template: '%s'\n",pad->padtemplate->name_template);
|
|
|
|
|
2001-01-19 02:23:35 +00:00
|
|
|
if (realpad->caps) {
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
printf(" Capabilities:\n");
|
2001-01-19 02:23:35 +00:00
|
|
|
caps = realpad->caps;
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
while (caps) {
|
2001-01-04 19:16:57 +00:00
|
|
|
GstType *type;
|
|
|
|
|
2001-03-13 22:21:29 +00:00
|
|
|
printf(" '%s':\n",caps->name);
|
2001-01-04 19:16:57 +00:00
|
|
|
|
2001-03-13 22:21:29 +00:00
|
|
|
type = gst_type_find_by_id (caps->id);
|
2001-01-04 19:16:57 +00:00
|
|
|
if (type)
|
|
|
|
printf(" MIME type: '%s':\n",type->mime);
|
|
|
|
else
|
|
|
|
printf(" MIME type: 'unknown/unknown':\n");
|
|
|
|
|
2001-03-13 22:21:29 +00:00
|
|
|
if (caps->properties)
|
|
|
|
print_props(caps->properties," ");
|
|
|
|
|
|
|
|
caps = caps->next;
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else
|
2001-05-25 21:00:07 +00:00
|
|
|
printf(" none\n");
|
|
|
|
|
2001-06-25 01:20:11 +00:00
|
|
|
property_specs = g_object_class_list_properties(G_OBJECT_GET_CLASS (element), &num_properties);
|
2001-05-25 21:00:07 +00:00
|
|
|
printf("\nElement Arguments:\n");
|
2001-06-25 01:20:11 +00:00
|
|
|
|
|
|
|
for (i=0;i<num_properties;i++) {
|
|
|
|
GValue value = { 0, };
|
|
|
|
GParamSpec *param = property_specs[i];
|
|
|
|
|
2002-03-30 17:06:45 +00:00
|
|
|
if (param->flags & G_PARAM_READABLE) {
|
|
|
|
g_value_init (&value, param->value_type);
|
|
|
|
g_object_get_property (G_OBJECT (element), param->name, &value);
|
|
|
|
}
|
2001-06-25 01:20:11 +00:00
|
|
|
|
|
|
|
printf(" %-40.40s: ",param->name);
|
|
|
|
switch (G_VALUE_TYPE (&value)) {
|
2002-04-14 10:13:24 +00:00
|
|
|
case G_TYPE_STRING:
|
|
|
|
printf("String (Default \"%s\")", g_value_get_string (&value));
|
|
|
|
break;
|
|
|
|
case G_TYPE_POINTER:
|
|
|
|
printf("Pointer (Default \"%p\")", g_value_get_pointer (&value));
|
|
|
|
break;
|
|
|
|
case G_TYPE_BOOLEAN:
|
|
|
|
printf("Boolean (Default %s)", (g_value_get_boolean (&value)?"true":"false"));
|
|
|
|
break;
|
|
|
|
case G_TYPE_ULONG:
|
|
|
|
printf("Unsigned Long (Default %lu, Range %lu -> %lu)", g_value_get_ulong (&value),
|
|
|
|
((GParamSpecULong*)param)->minimum, ((GParamSpecULong*)param)->maximum);
|
|
|
|
break;
|
|
|
|
case G_TYPE_LONG:
|
|
|
|
printf("Long (Default %ld, Range %ld -> %ld)", g_value_get_long (&value),
|
|
|
|
((GParamSpecLong*)param)->minimum, ((GParamSpecLong*)param)->maximum);
|
|
|
|
break;
|
|
|
|
case G_TYPE_UINT:
|
|
|
|
printf("Unsigned Integer (Default %u, Range %u -> %u)", g_value_get_uint (&value),
|
|
|
|
((GParamSpecUInt*)param)->minimum, ((GParamSpecUInt*)param)->maximum);
|
|
|
|
break;
|
|
|
|
case G_TYPE_INT:
|
|
|
|
printf("Integer (Default %d, Range %d -> %d)", g_value_get_int (&value),
|
|
|
|
((GParamSpecInt*)param)->minimum, ((GParamSpecInt*)param)->maximum);
|
|
|
|
break;
|
|
|
|
case G_TYPE_INT64:
|
|
|
|
printf("64 Bit Integer (Default %lld, Range %lld -> %lld)", g_value_get_int64 (&value),
|
|
|
|
((GParamSpecInt64*)param)->minimum, ((GParamSpecInt64*)param)->maximum);
|
|
|
|
break;
|
|
|
|
case G_TYPE_FLOAT:
|
|
|
|
printf("Float (Default %f, Range %f -> %f)", g_value_get_float (&value),
|
|
|
|
((GParamSpecFloat*)param)->minimum, ((GParamSpecFloat*)param)->maximum);
|
|
|
|
break;
|
|
|
|
case G_TYPE_DOUBLE:
|
|
|
|
printf("Double (Default %f, Range %f -> %f)", g_value_get_double (&value),
|
|
|
|
((GParamSpecDouble*)param)->minimum, ((GParamSpecDouble*)param)->maximum);
|
|
|
|
break;
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
default:
|
2001-06-25 01:20:11 +00:00
|
|
|
if (param->value_type == GST_TYPE_FILENAME)
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
printf("Filename");
|
2001-06-25 01:20:11 +00:00
|
|
|
else if (G_IS_PARAM_SPEC_ENUM (param)) {
|
|
|
|
GEnumValue *values;
|
2001-01-04 18:57:29 +00:00
|
|
|
guint j = 0;
|
|
|
|
|
2001-06-25 01:20:11 +00:00
|
|
|
printf("Enum \"%s\" (default %d)", g_type_name (G_VALUE_TYPE (&value)),
|
|
|
|
g_value_get_enum (&value));
|
|
|
|
values = G_ENUM_CLASS (g_type_class_ref (param->value_type))->values;
|
2002-02-06 16:35:16 +00:00
|
|
|
|
2001-01-04 18:57:29 +00:00
|
|
|
while (values[j].value_name) {
|
|
|
|
printf("\n (%d): \t%s", values[j].value, values[j].value_nick);
|
|
|
|
j++;
|
|
|
|
}
|
2001-12-14 20:56:51 +00:00
|
|
|
/* g_type_class_unref (ec); */
|
2001-01-04 18:57:29 +00:00
|
|
|
}
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
else
|
2002-03-30 17:06:45 +00:00
|
|
|
printf("unknown %ld", param->value_type);
|
Updates, it prints a lot more stuff now, like padtemplates, caps/props, and arguments. More stuff can be done, but n...
Original commit message from CVS:
Updates, it prints a lot more stuff now, like padtemplates, caps/props,
and arguments. More stuff can be done, but not now, I must sleep.
2001-01-03 08:48:36 +00:00
|
|
|
break;
|
2001-01-03 07:38:45 +00:00
|
|
|
}
|
|
|
|
printf("\n");
|
|
|
|
}
|
2001-06-25 01:20:11 +00:00
|
|
|
/*
|
2001-01-09 04:39:35 +00:00
|
|
|
g_free (args);
|
2001-06-25 01:20:11 +00:00
|
|
|
*/
|
2001-07-25 21:40:42 +00:00
|
|
|
if (num_properties == 0) g_print (" none\n");
|
|
|
|
|
2002-04-14 10:13:24 +00:00
|
|
|
/* Dynamic Parameters block */
|
|
|
|
{
|
|
|
|
GstDParamManager* dpman;
|
|
|
|
GParamSpec** specs;
|
|
|
|
gint x;
|
|
|
|
|
|
|
|
printf("\nDynamic Parameters:\n");
|
|
|
|
if((dpman = gst_dpman_get_manager (element))){
|
|
|
|
specs = gst_dpman_list_dparam_specs(dpman);
|
|
|
|
for (x=0; specs[x] != NULL; x++){
|
|
|
|
printf(" %-40.40s: ",g_param_spec_get_name(specs[x]));
|
|
|
|
|
|
|
|
switch (G_PARAM_SPEC_VALUE_TYPE (specs[x])) {
|
|
|
|
case G_TYPE_INT64:
|
|
|
|
printf("64 Bit Integer (Default %lld, Range %lld -> %lld)",
|
|
|
|
((GParamSpecInt64*)specs[x])->default_value,
|
|
|
|
((GParamSpecInt64*)specs[x])->minimum,
|
|
|
|
((GParamSpecInt64*)specs[x])->maximum);
|
|
|
|
break;
|
|
|
|
case G_TYPE_INT:
|
|
|
|
printf("Integer (Default %d, Range %d -> %d)",
|
|
|
|
((GParamSpecInt*)specs[x])->default_value,
|
|
|
|
((GParamSpecInt*)specs[x])->minimum,
|
|
|
|
((GParamSpecInt*)specs[x])->maximum);
|
|
|
|
break;
|
|
|
|
case G_TYPE_FLOAT:
|
|
|
|
printf("Float (Default %f, Range %f -> %f)",
|
|
|
|
((GParamSpecFloat*)specs[x])->default_value,
|
|
|
|
((GParamSpecFloat*)specs[x])->minimum,
|
|
|
|
((GParamSpecFloat*)specs[x])->maximum);
|
|
|
|
break;
|
|
|
|
default: printf("unknown %ld", G_PARAM_SPEC_VALUE_TYPE (specs[x]));
|
|
|
|
}
|
|
|
|
printf("\n");
|
|
|
|
}
|
|
|
|
g_free(specs);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
g_print (" none\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Signals Block */
|
2001-07-25 21:40:42 +00:00
|
|
|
{
|
|
|
|
guint *signals;
|
|
|
|
guint nsignals;
|
|
|
|
gint i;
|
2001-07-27 16:35:27 +00:00
|
|
|
GSignalQuery *query;
|
2001-07-25 21:40:42 +00:00
|
|
|
|
|
|
|
printf("\nElement Signals:\n");
|
|
|
|
|
|
|
|
signals = g_signal_list_ids (G_OBJECT_TYPE (element), &nsignals);
|
2001-01-03 07:38:45 +00:00
|
|
|
|
2001-07-25 21:40:42 +00:00
|
|
|
for (i=0; i<nsignals; i++) {
|
|
|
|
gint n_params;
|
|
|
|
GType return_type;
|
|
|
|
const GType *param_types;
|
|
|
|
gint j;
|
|
|
|
|
2001-07-27 16:35:27 +00:00
|
|
|
query = g_new0(GSignalQuery,1);
|
|
|
|
g_signal_query (signals[i], query);
|
2001-07-25 21:40:42 +00:00
|
|
|
n_params = query->n_params;
|
|
|
|
return_type = query->return_type;
|
|
|
|
param_types = query->param_types;
|
|
|
|
|
|
|
|
printf (" \"%s\" :\t %s user_function (%s* object, \n", query->signal_name, g_type_name (return_type),
|
|
|
|
g_type_name (G_OBJECT_TYPE (element)));
|
|
|
|
|
|
|
|
for (j=0; j<n_params; j++) {
|
|
|
|
printf (" \t\t\t\t%s arg%d,\n", g_type_name (param_types[j]), j);
|
|
|
|
}
|
|
|
|
printf (" \t\t\t\tgpointer user_data);\n");
|
|
|
|
}
|
|
|
|
if (nsignals == 0) g_print (" none\n");
|
|
|
|
}
|
|
|
|
|
2001-05-25 21:00:07 +00:00
|
|
|
|
2001-12-14 20:56:51 +00:00
|
|
|
/* for compound elements */
|
2001-05-25 21:00:07 +00:00
|
|
|
if (GST_IS_BIN(element)) {
|
|
|
|
printf("\nChildren:\n");
|
2002-04-19 19:49:41 +00:00
|
|
|
children = (GList *) gst_bin_get_list(GST_BIN(element));
|
2001-07-25 21:40:42 +00:00
|
|
|
if (!children)
|
|
|
|
g_print (" none\n");
|
|
|
|
else {
|
|
|
|
while (children) {
|
|
|
|
child = GST_ELEMENT (children->data);
|
|
|
|
children = g_list_next (children);
|
|
|
|
|
|
|
|
g_print(" %s\n",GST_ELEMENT_NAME(child));
|
|
|
|
}
|
2001-05-25 21:00:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-01-03 07:38:45 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2001-01-04 10:47:39 +00:00
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
static void
|
|
|
|
print_element_list (void)
|
|
|
|
{
|
|
|
|
GList *plugins;
|
2001-01-04 10:47:39 +00:00
|
|
|
|
2002-04-19 19:49:41 +00:00
|
|
|
plugins = (GList *) gst_plugin_get_list();
|
2001-01-04 10:47:39 +00:00
|
|
|
while (plugins) {
|
2001-08-21 20:16:48 +00:00
|
|
|
GList *features;
|
|
|
|
GstPlugin *plugin;
|
|
|
|
|
2001-01-04 10:47:39 +00:00
|
|
|
plugin = (GstPlugin*)(plugins->data);
|
|
|
|
plugins = g_list_next (plugins);
|
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
features = gst_plugin_get_feature_list (plugin);
|
|
|
|
while (features) {
|
|
|
|
GstPluginFeature *feature;
|
2001-01-04 10:47:39 +00:00
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
feature = GST_PLUGIN_FEATURE (features->data);
|
2001-01-04 10:47:39 +00:00
|
|
|
|
2002-04-11 20:35:18 +00:00
|
|
|
if (GST_IS_ELEMENT_FACTORY (feature)) {
|
2001-08-21 20:16:48 +00:00
|
|
|
GstElementFactory *factory;
|
|
|
|
|
2002-04-11 20:35:18 +00:00
|
|
|
factory = GST_ELEMENT_FACTORY (feature);
|
2002-04-14 10:13:24 +00:00
|
|
|
printf("%s element: %s: %s\n",plugin->name, GST_OBJECT_NAME (factory) ,factory->details->longname);
|
2001-08-21 20:16:48 +00:00
|
|
|
}
|
2002-04-11 20:35:18 +00:00
|
|
|
else if (GST_IS_AUTOPLUG_FACTORY (feature)) {
|
2001-08-21 20:16:48 +00:00
|
|
|
GstAutoplugFactory *factory;
|
|
|
|
|
2002-04-11 20:35:18 +00:00
|
|
|
factory = GST_AUTOPLUG_FACTORY (feature);
|
2002-04-14 10:13:24 +00:00
|
|
|
printf("%s autoplug: %s: %s\n", plugin->name, GST_OBJECT_NAME (factory), factory->longdesc);
|
2001-08-21 20:16:48 +00:00
|
|
|
}
|
2002-04-11 20:35:18 +00:00
|
|
|
else if (GST_IS_TYPE_FACTORY (feature)) {
|
2001-08-21 20:16:48 +00:00
|
|
|
GstTypeFactory *factory;
|
|
|
|
|
2002-04-11 20:35:18 +00:00
|
|
|
factory = GST_TYPE_FACTORY (feature);
|
2002-04-14 10:13:24 +00:00
|
|
|
printf("%s type: %s: %s\n", plugin->name, factory->mime, factory->exts);
|
2001-01-04 10:47:39 +00:00
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
if (factory->typefindfunc)
|
|
|
|
printf(" Has typefind function: %s\n",GST_DEBUG_FUNCPTR_NAME(factory->typefindfunc));
|
|
|
|
}
|
2002-04-11 20:35:18 +00:00
|
|
|
else if (GST_IS_SCHEDULER_FACTORY (feature)) {
|
2001-12-04 22:12:50 +00:00
|
|
|
GstSchedulerFactory *factory;
|
|
|
|
|
2002-04-11 20:35:18 +00:00
|
|
|
factory = GST_SCHEDULER_FACTORY (feature);
|
2002-04-14 10:13:24 +00:00
|
|
|
printf("%s scheduler: %s: %s\n", plugin->name, GST_OBJECT_NAME (factory), factory->longdesc);
|
2001-12-04 22:12:50 +00:00
|
|
|
}
|
2001-08-21 20:16:48 +00:00
|
|
|
else {
|
|
|
|
printf("%s: %s (%s)\n", plugin->name, gst_object_get_name (GST_OBJECT (feature)),
|
|
|
|
g_type_name (G_OBJECT_TYPE (feature)));
|
|
|
|
}
|
|
|
|
|
|
|
|
features = g_list_next (features);
|
|
|
|
}
|
2001-01-04 10:47:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
static void
|
2001-03-07 21:52:56 +00:00
|
|
|
print_plugin_info (GstPlugin *plugin)
|
|
|
|
{
|
2001-08-21 20:16:48 +00:00
|
|
|
GList *features;
|
|
|
|
|
2001-01-04 10:47:39 +00:00
|
|
|
printf("Plugin Details:\n");
|
|
|
|
printf(" Name:\t\t%s\n",plugin->name);
|
|
|
|
printf(" Long Name:\t%s\n",plugin->longname);
|
|
|
|
printf(" Filename:\t%s\n",plugin->filename);
|
|
|
|
printf("\n");
|
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
features = gst_plugin_get_feature_list (plugin);
|
2001-01-04 10:47:39 +00:00
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
while (features) {
|
|
|
|
GstPluginFeature *feature;
|
2001-03-07 21:52:56 +00:00
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
feature = GST_PLUGIN_FEATURE (features->data);
|
2001-03-07 21:52:56 +00:00
|
|
|
|
2002-04-11 20:35:18 +00:00
|
|
|
if (GST_IS_ELEMENT_FACTORY (feature)) {
|
2001-08-21 20:16:48 +00:00
|
|
|
GstElementFactory *factory;
|
2001-03-07 21:52:56 +00:00
|
|
|
|
2002-04-11 20:35:18 +00:00
|
|
|
factory = GST_ELEMENT_FACTORY (feature);
|
2001-08-21 20:16:48 +00:00
|
|
|
printf(" %s: %s\n", GST_OBJECT_NAME (factory) ,factory->details->longname);
|
2001-03-07 21:52:56 +00:00
|
|
|
}
|
2002-04-11 20:35:18 +00:00
|
|
|
else if (GST_IS_AUTOPLUG_FACTORY (feature)) {
|
2001-08-21 20:16:48 +00:00
|
|
|
GstAutoplugFactory *factory;
|
2001-03-07 21:52:56 +00:00
|
|
|
|
2002-04-11 20:35:18 +00:00
|
|
|
factory = GST_AUTOPLUG_FACTORY (feature);
|
2001-08-21 20:16:48 +00:00
|
|
|
printf(" %s: %s\n", GST_OBJECT_NAME (factory), factory->longdesc);
|
|
|
|
}
|
2002-04-11 20:35:18 +00:00
|
|
|
else if (GST_IS_TYPE_FACTORY (feature)) {
|
2001-08-21 20:16:48 +00:00
|
|
|
GstTypeFactory *factory;
|
2001-03-07 21:52:56 +00:00
|
|
|
|
2002-04-11 20:35:18 +00:00
|
|
|
factory = GST_TYPE_FACTORY (feature);
|
2001-03-07 21:52:56 +00:00
|
|
|
printf(" %s: %s\n", factory->mime, factory->exts);
|
2001-08-21 20:16:48 +00:00
|
|
|
|
2001-03-07 21:52:56 +00:00
|
|
|
if (factory->typefindfunc)
|
|
|
|
printf(" Has typefind function: %s\n",GST_DEBUG_FUNCPTR_NAME(factory->typefindfunc));
|
|
|
|
}
|
2002-04-11 20:35:18 +00:00
|
|
|
else if (GST_IS_SCHEDULER_FACTORY (feature)) {
|
2001-12-04 22:12:50 +00:00
|
|
|
GstSchedulerFactory *factory;
|
|
|
|
|
2002-04-11 20:35:18 +00:00
|
|
|
factory = GST_SCHEDULER_FACTORY (feature);
|
2001-12-04 22:12:50 +00:00
|
|
|
printf(" %s: %s\n", GST_OBJECT_NAME (factory), factory->longdesc);
|
|
|
|
}
|
2001-08-21 20:16:48 +00:00
|
|
|
else {
|
|
|
|
printf(" %s (%s)\n", gst_object_get_name (GST_OBJECT (feature)),
|
|
|
|
g_type_name (G_OBJECT_TYPE (feature)));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
features = g_list_next (features);
|
2001-03-07 21:52:56 +00:00
|
|
|
}
|
2001-01-04 10:47:39 +00:00
|
|
|
printf("\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
|
|
|
{
|
2001-01-04 10:47:39 +00:00
|
|
|
GstElementFactory *factory;
|
|
|
|
GstPlugin *plugin;
|
|
|
|
gchar *so;
|
|
|
|
|
|
|
|
gst_init(&argc,&argv);
|
2002-04-14 10:13:24 +00:00
|
|
|
gst_control_init(&argc,&argv);
|
|
|
|
|
2001-12-14 20:56:51 +00:00
|
|
|
/* if no arguments, print out list of elements */
|
2001-01-04 10:47:39 +00:00
|
|
|
if (argc == 1) {
|
2001-03-07 21:52:56 +00:00
|
|
|
print_element_list();
|
2001-01-04 10:47:39 +00:00
|
|
|
|
2001-12-14 20:56:51 +00:00
|
|
|
/* else we try to get a factory */
|
2001-01-04 10:47:39 +00:00
|
|
|
} else {
|
2001-12-14 20:56:51 +00:00
|
|
|
/* first check for help */
|
2001-01-04 10:47:39 +00:00
|
|
|
if (strstr(argv[1],"-help")) {
|
|
|
|
printf("Usage: %s\t\t\tList all registered elements\n",argv[0]);
|
|
|
|
printf(" %s element-name\tShow element details\n",argv[0]);
|
|
|
|
printf(" %s plugin-name[.so]\tShow information about plugin\n",argv[0]);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2001-12-14 20:56:51 +00:00
|
|
|
/* only search for a factory if there's not a '.so' */
|
2001-01-04 10:47:39 +00:00
|
|
|
if (! strstr(argv[1],".so")) {
|
2002-04-11 20:35:18 +00:00
|
|
|
factory = gst_element_factory_find (argv[1]);
|
2001-01-04 10:47:39 +00:00
|
|
|
|
2001-12-14 20:56:51 +00:00
|
|
|
/* if there's a factory, print out the info */
|
2001-01-04 10:47:39 +00:00
|
|
|
if (factory)
|
|
|
|
return print_element_info(factory);
|
|
|
|
} else {
|
2001-12-14 20:56:51 +00:00
|
|
|
/* strip the .so */
|
2001-01-04 10:47:39 +00:00
|
|
|
so = strstr(argv[1],".so");
|
|
|
|
so[0] = '\0';
|
|
|
|
}
|
|
|
|
|
2001-12-14 20:56:51 +00:00
|
|
|
/* otherwise assume it's a plugin */
|
2001-01-04 10:47:39 +00:00
|
|
|
plugin = gst_plugin_find (argv[1]);
|
|
|
|
|
2001-12-14 20:56:51 +00:00
|
|
|
/* if there is such a plugin, print out info */
|
|
|
|
|
2001-01-04 10:47:39 +00:00
|
|
|
if (plugin) {
|
|
|
|
print_plugin_info(plugin);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
printf("no such element or plugin '%s'\n",argv[1]);
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|