2003-06-29 14:05:49 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
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
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
static void
|
|
|
|
print_prop (GstPropsEntry *prop, gboolean showname, const gchar *pfx)
|
2001-08-21 20:16:48 +00:00
|
|
|
{
|
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-09-19 18:14:09 +00:00
|
|
|
g_print("%s%-20.20s: ", 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
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print(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
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
type = gst_props_entry_get_props_type (prop);
|
2002-03-30 17:06:45 +00:00
|
|
|
|
|
|
|
switch (type) {
|
|
|
|
case GST_PROPS_INT_TYPE:
|
|
|
|
{
|
|
|
|
gint val;
|
|
|
|
gst_props_entry_get_int (prop, &val);
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print("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);
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print("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);
|
2003-07-27 01:22:07 +00:00
|
|
|
g_print("Float: %g\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);
|
2003-07-27 01:22:07 +00:00
|
|
|
g_print("Float range: %g - %g\n", min, max);
|
2001-04-28 19:16:30 +00:00
|
|
|
break;
|
2002-03-30 17:06:45 +00:00
|
|
|
}
|
2002-11-27 20:47:39 +00:00
|
|
|
case GST_PROPS_BOOLEAN_TYPE:
|
2002-03-30 17:06:45 +00:00
|
|
|
{
|
|
|
|
gboolean val;
|
|
|
|
gst_props_entry_get_boolean (prop, &val);
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print("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);
|
2002-09-19 18:14:09 +00:00
|
|
|
g_print("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);
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print("FourCC: '%c%c%c%c'\n",
|
2003-03-16 20:06:02 +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);
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("List:\n");
|
2002-09-19 18:14:09 +00:00
|
|
|
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-09-09 22:07:56 +00:00
|
|
|
g_print("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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
static void
|
|
|
|
print_props (GstProps *properties, const gchar *pfx)
|
2001-08-21 20:16:48 +00:00
|
|
|
{
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
static void
|
|
|
|
print_caps (const GstCaps *caps, const gchar *pfx)
|
2002-09-17 21:32:26 +00:00
|
|
|
{
|
|
|
|
while (caps) {
|
|
|
|
GstType *type;
|
|
|
|
|
2003-01-27 21:40:13 +00:00
|
|
|
g_print ("%s'%s': (%sfixed)\n", pfx, caps->name, (GST_CAPS_IS_FIXED (caps) ? "" : "NOT "));
|
2002-09-17 21:32:26 +00:00
|
|
|
|
|
|
|
type = gst_type_find_by_id (caps->id);
|
2003-03-16 20:06:02 +00:00
|
|
|
if (type)
|
2002-09-17 21:32:26 +00:00
|
|
|
g_print ("%s MIME type: '%s':\n", pfx, type->mime);
|
|
|
|
else
|
|
|
|
g_print ("%s MIME type: 'unknown/unknown':\n", pfx);
|
|
|
|
|
|
|
|
if (caps->properties) {
|
|
|
|
gchar *prefix = g_strdup_printf ("%s ", pfx);
|
|
|
|
|
|
|
|
print_props(caps->properties, prefix);
|
|
|
|
|
|
|
|
g_free (prefix);
|
|
|
|
}
|
|
|
|
|
|
|
|
caps = caps->next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
static void
|
|
|
|
print_formats (const GstFormat *formats)
|
2002-07-24 21:13:30 +00:00
|
|
|
{
|
|
|
|
while (formats && *formats) {
|
2002-09-29 17:17:28 +00:00
|
|
|
const GstFormatDefinition *definition;
|
|
|
|
|
|
|
|
definition = gst_format_get_details (*formats);
|
|
|
|
if (definition)
|
|
|
|
g_print ("\t\t(%d):\t%s (%s)\n", *formats,
|
2003-03-16 20:06:02 +00:00
|
|
|
definition->nick, definition->description);
|
2002-07-30 19:25:24 +00:00
|
|
|
else
|
|
|
|
g_print ("\t\t(%d):\tUnknown format\n", *formats);
|
|
|
|
|
2002-07-24 21:13:30 +00:00
|
|
|
formats++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
static void
|
|
|
|
print_query_types (const GstQueryType *types)
|
2003-01-07 20:49:46 +00:00
|
|
|
{
|
|
|
|
while (types && *types) {
|
|
|
|
const GstQueryTypeDefinition *definition;
|
|
|
|
|
|
|
|
definition = gst_query_type_get_details (*types);
|
|
|
|
if (definition)
|
|
|
|
g_print ("\t\t(%d):\t%s (%s)\n", *types,
|
2003-03-16 20:06:02 +00:00
|
|
|
definition->nick, definition->description);
|
2003-01-07 20:49:46 +00:00
|
|
|
else
|
|
|
|
g_print ("\t\t(%d):\tUnknown query format\n", *types);
|
|
|
|
|
|
|
|
types++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
static void
|
|
|
|
print_event_masks (const GstEventMask *masks)
|
2002-07-24 21:13:30 +00:00
|
|
|
{
|
2003-02-10 20:32:32 +00:00
|
|
|
#ifndef GST_DISABLE_ENUMTYPES
|
2002-07-24 21:13:30 +00:00
|
|
|
GType event_type;
|
|
|
|
GEnumClass *klass;
|
|
|
|
GType event_flags;
|
|
|
|
GFlagsClass *flags_class = NULL;
|
|
|
|
|
|
|
|
event_type = gst_event_type_get_type();
|
|
|
|
klass = (GEnumClass *) g_type_class_ref (event_type);
|
|
|
|
|
|
|
|
while (masks && masks->type) {
|
|
|
|
GEnumValue *value;
|
|
|
|
gint flags = 0, index = 0;
|
|
|
|
|
|
|
|
switch (masks->type) {
|
|
|
|
case GST_EVENT_SEEK:
|
|
|
|
flags = masks->flags;
|
2003-03-16 20:06:02 +00:00
|
|
|
event_flags = gst_seek_type_get_type ();
|
|
|
|
flags_class = (GFlagsClass *) g_type_class_ref (event_flags);
|
2002-07-24 21:13:30 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2002-07-24 21:13:30 +00:00
|
|
|
value = g_enum_get_value (klass, masks->type);
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("\t\t%s ", value->value_nick);
|
2002-07-24 21:13:30 +00:00
|
|
|
|
|
|
|
while (flags) {
|
|
|
|
GFlagsValue *value;
|
|
|
|
|
|
|
|
if (flags & 1) {
|
|
|
|
value = g_flags_get_first_value (flags_class, 1 << index);
|
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
if (value)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("| %s ", value->value_nick);
|
2003-03-16 20:06:02 +00:00
|
|
|
else
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("| ? ");
|
2002-07-24 21:13:30 +00:00
|
|
|
}
|
|
|
|
flags >>= 1;
|
|
|
|
index++;
|
|
|
|
}
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("\n");
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2002-07-24 21:13:30 +00:00
|
|
|
masks++;
|
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#endif
|
2002-07-24 21:13:30 +00:00
|
|
|
}
|
|
|
|
|
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);
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2001-07-25 21:40:42 +00:00
|
|
|
for (i=1; i<*maxlevel-level; i++)
|
|
|
|
g_print (" ");
|
|
|
|
if (*maxlevel-level)
|
|
|
|
g_print (" +----");
|
|
|
|
|
|
|
|
g_print ("%s\n", g_type_name (type));
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2001-07-25 21:40:42 +00:00
|
|
|
if (level == 1)
|
|
|
|
g_print ("\n");
|
|
|
|
}
|
|
|
|
|
2002-05-08 20:40:48 +00:00
|
|
|
static void
|
2003-03-16 20:06:02 +00:00
|
|
|
print_element_properties (GstElement *element)
|
2002-05-08 20:40:48 +00:00
|
|
|
{
|
|
|
|
GParamSpec **property_specs;
|
|
|
|
gint num_properties,i;
|
2002-09-19 18:14:09 +00:00
|
|
|
gboolean readable;
|
2003-07-25 14:31:15 +00:00
|
|
|
const char *string_val;
|
2003-03-16 20:06:02 +00:00
|
|
|
|
|
|
|
property_specs = g_object_class_list_properties
|
|
|
|
(G_OBJECT_GET_CLASS (element), &num_properties);
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print("\nElement Arguments:\n");
|
2002-05-08 20:40:48 +00:00
|
|
|
|
|
|
|
for (i = 0; i < num_properties; i++) {
|
|
|
|
GValue value = { 0, };
|
|
|
|
GParamSpec *param = property_specs[i];
|
2002-09-19 18:14:09 +00:00
|
|
|
readable = FALSE;
|
2002-05-08 20:40:48 +00:00
|
|
|
|
2002-09-19 18:14:09 +00:00
|
|
|
g_value_init (&value, param->value_type);
|
2002-05-08 20:40:48 +00:00
|
|
|
if (param->flags & G_PARAM_READABLE) {
|
|
|
|
g_object_get_property (G_OBJECT (element), param->name, &value);
|
2002-09-19 18:14:09 +00:00
|
|
|
readable = TRUE;
|
2002-05-08 20:40:48 +00:00
|
|
|
}
|
|
|
|
|
2002-09-15 18:59:27 +00:00
|
|
|
g_print(" %-20s: %s\n", g_param_spec_get_name (param),
|
2003-03-16 20:06:02 +00:00
|
|
|
g_param_spec_get_blurb (param));
|
2002-05-08 20:40:48 +00:00
|
|
|
|
|
|
|
switch (G_VALUE_TYPE (&value)) {
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_STRING:
|
2003-07-25 14:31:15 +00:00
|
|
|
string_val = g_value_get_string (&value);
|
2003-03-16 20:06:02 +00:00
|
|
|
g_print ("%-23.23s String. ", "");
|
2003-07-25 14:31:15 +00:00
|
|
|
if (readable) {
|
|
|
|
if (string_val == NULL)
|
|
|
|
g_print ("(Default \"\")");
|
|
|
|
else
|
|
|
|
g_print ("(Default \"%s\")", g_value_get_string (&value));
|
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
break;
|
|
|
|
case G_TYPE_BOOLEAN:
|
|
|
|
g_print ("%-23.23s Boolean. ", "");
|
|
|
|
if (readable) g_print ("(Default %s)", (g_value_get_boolean (&value) ? "true" : "false"));
|
|
|
|
break;
|
|
|
|
case G_TYPE_ULONG:
|
2002-05-08 20:40:48 +00:00
|
|
|
{
|
2003-03-16 20:06:02 +00:00
|
|
|
GParamSpecULong *pulong = G_PARAM_SPEC_ULONG (param);
|
|
|
|
g_print("%-23.23s Unsigned Long. ", "");
|
|
|
|
if (readable) g_print("Range: %lu - %lu (Default %lu)",
|
|
|
|
pulong->minimum, pulong->maximum, g_value_get_ulong (&value));
|
|
|
|
break;
|
2002-05-08 20:40:48 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_LONG:
|
2002-05-08 20:40:48 +00:00
|
|
|
{
|
2003-03-16 20:06:02 +00:00
|
|
|
GParamSpecLong *plong = G_PARAM_SPEC_LONG (param);
|
|
|
|
g_print("%-23.23s Long. ", "");
|
|
|
|
if (readable) g_print("Range: %ld - %ld (Default %ld)",
|
|
|
|
plong->minimum, plong->maximum, g_value_get_long (&value));
|
|
|
|
break;
|
2002-05-08 20:40:48 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_UINT:
|
2002-05-08 20:40:48 +00:00
|
|
|
{
|
2003-03-16 20:06:02 +00:00
|
|
|
GParamSpecUInt *puint = G_PARAM_SPEC_UINT (param);
|
|
|
|
g_print("%-23.23s Unsigned Integer. ", "");
|
|
|
|
if (readable) g_print("Range: %u - %u (Default %u)",
|
|
|
|
puint->minimum, puint->maximum, g_value_get_uint (&value));
|
|
|
|
break;
|
2002-05-08 20:40:48 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_INT:
|
2002-05-08 20:40:48 +00:00
|
|
|
{
|
2003-03-16 20:06:02 +00:00
|
|
|
GParamSpecInt *pint = G_PARAM_SPEC_INT (param);
|
|
|
|
g_print("%-23.23s Integer. ", "");
|
|
|
|
if (readable) g_print("Range: %d - %d (Default %d)",
|
|
|
|
pint->minimum, pint->maximum, g_value_get_int (&value));
|
|
|
|
break;
|
2002-05-08 20:40:48 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_UINT64:
|
2002-05-14 00:45:10 +00:00
|
|
|
{
|
2003-03-16 20:06:02 +00:00
|
|
|
GParamSpecUInt64 *puint64 = G_PARAM_SPEC_UINT64 (param);
|
|
|
|
g_print("%-23.23s Unsigned Integer64. ", "");
|
|
|
|
if (readable) g_print("Range: %" G_GUINT64_FORMAT " - %"
|
|
|
|
G_GUINT64_FORMAT " (Default %" G_GUINT64_FORMAT ")",
|
|
|
|
puint64->minimum, puint64->maximum,
|
|
|
|
g_value_get_uint64 (&value));
|
|
|
|
break;
|
2002-05-14 00:45:10 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_INT64:
|
2002-05-14 00:45:10 +00:00
|
|
|
{
|
2003-03-16 20:06:02 +00:00
|
|
|
GParamSpecInt64 *pint64 = G_PARAM_SPEC_INT64 (param);
|
|
|
|
g_print("%-23.23s Integer64. ", "");
|
|
|
|
if (readable) g_print("Range: %" G_GINT64_FORMAT " - %" G_GINT64_FORMAT " (Default %" G_GINT64_FORMAT ")", pint64->minimum,
|
|
|
|
pint64->maximum, g_value_get_int64 (&value));
|
|
|
|
break;
|
2002-05-14 00:45:10 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_FLOAT:
|
2002-05-08 20:40:48 +00:00
|
|
|
{
|
2003-03-16 20:06:02 +00:00
|
|
|
GParamSpecFloat *pfloat = G_PARAM_SPEC_FLOAT (param);
|
|
|
|
g_print("%-23.23s Float. Default: %-8.8s %15.7g\n", "", "",
|
|
|
|
g_value_get_float (&value));
|
|
|
|
g_print("%-23.23s Range: %15.7g - %15.7g", "",
|
|
|
|
pfloat->minimum, pfloat->maximum);
|
|
|
|
break;
|
2002-05-08 20:40:48 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_DOUBLE:
|
2002-05-08 20:40:48 +00:00
|
|
|
{
|
2003-03-16 20:06:02 +00:00
|
|
|
GParamSpecDouble *pdouble = G_PARAM_SPEC_DOUBLE (param);
|
|
|
|
g_print("%-23.23s Double. Default: %-8.8s %15.7g\n", "", "",
|
|
|
|
g_value_get_double (&value));
|
|
|
|
g_print("%-23.23s Range: %15.7g - %15.7g", "",
|
|
|
|
pdouble->minimum, pdouble->maximum);
|
|
|
|
break;
|
2002-05-08 20:40:48 +00:00
|
|
|
}
|
|
|
|
default:
|
2003-02-10 20:32:32 +00:00
|
|
|
if (param->value_type == GST_TYPE_URI) {
|
|
|
|
g_print("%-23.23s URI", "");
|
2003-03-16 20:06:02 +00:00
|
|
|
}
|
2002-09-17 21:32:26 +00:00
|
|
|
if (param->value_type == GST_TYPE_CAPS) {
|
|
|
|
GstCaps *caps = g_value_peek_pointer (&value);
|
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
if (!caps)
|
2002-09-17 21:32:26 +00:00
|
|
|
g_print("%-23.23s Caps (NULL)", "");
|
2003-03-16 20:06:02 +00:00
|
|
|
else {
|
2002-09-17 21:32:26 +00:00
|
|
|
print_caps (caps, " ");
|
2003-03-16 20:06:02 +00:00
|
|
|
}
|
|
|
|
}
|
2002-05-08 20:40:48 +00:00
|
|
|
else if (G_IS_PARAM_SPEC_ENUM (param)) {
|
|
|
|
GEnumValue *values;
|
2003-03-16 20:06:02 +00:00
|
|
|
guint j = 0;
|
|
|
|
gint enum_value;
|
|
|
|
|
|
|
|
values = G_ENUM_CLASS (g_type_class_ref (param->value_type))->values;
|
|
|
|
enum_value = g_value_get_enum (&value);
|
|
|
|
|
|
|
|
while (values[j].value_name) {
|
|
|
|
if (values[j].value == enum_value)
|
|
|
|
break;
|
|
|
|
j++;
|
|
|
|
}
|
|
|
|
|
|
|
|
g_print ("%-23.23s Enum \"%s\" (default %d, \"%s\")", "",
|
|
|
|
g_type_name (G_VALUE_TYPE (&value)),
|
|
|
|
enum_value, values[j].value_nick);
|
|
|
|
|
|
|
|
j = 0;
|
|
|
|
while (values[j].value_name) {
|
|
|
|
g_print("\n%-23.23s (%d): \t%s", "",
|
|
|
|
values[j].value, values[j].value_nick);
|
|
|
|
j++;
|
|
|
|
}
|
|
|
|
/* g_type_class_unref (ec); */
|
|
|
|
}
|
2002-09-09 22:07:56 +00:00
|
|
|
else if (G_IS_PARAM_SPEC_FLAGS (param)) {
|
|
|
|
GFlagsValue *values;
|
2003-03-16 20:06:02 +00:00
|
|
|
guint j = 0;
|
|
|
|
gint flags_value;
|
|
|
|
GString *flags = NULL;
|
|
|
|
|
|
|
|
values = G_FLAGS_CLASS (g_type_class_ref (param->value_type))->values;
|
|
|
|
flags_value = g_value_get_flags (&value);
|
|
|
|
|
|
|
|
while (values[j].value_name) {
|
|
|
|
if (values[j].value & flags_value) {
|
|
|
|
if (flags) {
|
|
|
|
g_string_append_printf (flags, " | %s", values[j].value_nick);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
flags = g_string_new (values[j].value_nick);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
j++;
|
|
|
|
}
|
|
|
|
|
|
|
|
g_print("%-23.23s Flags \"%s\" (default %d, \"%s\")", "",
|
|
|
|
g_type_name (G_VALUE_TYPE (&value)),
|
|
|
|
flags_value, (flags ? flags->str : "(none)"));
|
|
|
|
|
|
|
|
j = 0;
|
|
|
|
while (values[j].value_name) {
|
|
|
|
g_print("\n%-23.23s (%d): \t%s", "",
|
|
|
|
values[j].value, values[j].value_nick);
|
|
|
|
j++;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (flags)
|
|
|
|
g_string_free (flags, TRUE);
|
|
|
|
}
|
|
|
|
else if (G_IS_PARAM_SPEC_OBJECT (param)) {
|
|
|
|
g_print("%-23.23s Object of type \"%s\"", "",
|
|
|
|
g_type_name(param->value_type));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
g_print ("%-23.23s Unknown type %ld \"%s\"", "", param->value_type,
|
|
|
|
g_type_name(param->value_type));
|
2002-11-02 13:22:31 +00:00
|
|
|
}
|
2002-05-08 20:40:48 +00:00
|
|
|
break;
|
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
if (!readable)
|
2003-01-21 21:34:31 +00:00
|
|
|
g_print (" Write only\n");
|
2003-03-16 20:06:02 +00:00
|
|
|
else
|
2002-09-19 18:14:09 +00:00
|
|
|
g_print ("\n");
|
2002-05-08 20:40:48 +00:00
|
|
|
}
|
2003-03-16 20:06:02 +00:00
|
|
|
if (num_properties == 0)
|
2002-05-08 20:40:48 +00:00
|
|
|
g_print (" none\n");
|
|
|
|
}
|
|
|
|
|
2003-08-21 05:57:05 +00:00
|
|
|
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";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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;
|
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-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-09-09 09:30:07 +00:00
|
|
|
element = gst_element_factory_create (factory, "element");
|
2001-01-04 10:47:39 +00:00
|
|
|
if (!element) {
|
2002-09-09 22:07:56 +00:00
|
|
|
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
|
|
|
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("Factory Details:\n");
|
|
|
|
g_print (" Long name:\t%s\n", factory->details->longname);
|
|
|
|
g_print (" Class:\t%s\n", factory->details->klass);
|
2002-10-03 02:59:15 +00:00
|
|
|
g_print (" License:\t%s\n", factory->details->license);
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Description:\t%s\n", factory->details->description);
|
|
|
|
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);
|
2003-08-21 05:57:05 +00:00
|
|
|
g_print (" Rank:\t\t%s\n", get_rank_name(GST_PLUGIN_FEATURE(factory)->rank));
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("\n");
|
2001-01-03 07:38:45 +00:00
|
|
|
|
2001-07-25 21:40:42 +00:00
|
|
|
output_hierarchy (G_OBJECT_TYPE (element), 0, &maxlevel);
|
|
|
|
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("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)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" SRC template: '%s'\n", padtemplate->name_template);
|
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->direction == GST_PAD_SINK)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" SINK template: '%s'\n", padtemplate->name_template);
|
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-09-09 22:07:56 +00:00
|
|
|
g_print (" UNKNOWN!!! template: '%s'\n", padtemplate->name_template);
|
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->presence == GST_PAD_ALWAYS)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" 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)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Availability: Sometimes\n");
|
2001-07-11 15:50:16 +00:00
|
|
|
else if (padtemplate->presence == GST_PAD_REQUEST) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Availability: On request\n");
|
|
|
|
g_print (" Has request_new_pad() function: %s\n",
|
2002-09-09 09:30:07 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (gstelement_class->request_new_pad));
|
2001-07-11 15:50:16 +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-09-09 22:07:56 +00:00
|
|
|
g_print (" 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) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Capabilities:\n");
|
2003-03-16 20:06:02 +00:00
|
|
|
print_caps (padtemplate->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
|
|
|
}
|
|
|
|
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("\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
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" 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-09-09 22:07:56 +00:00
|
|
|
g_print ("\nElement Flags:\n");
|
2002-09-09 09:30:07 +00:00
|
|
|
if (GST_FLAG_IS_SET (element, GST_ELEMENT_COMPLEX)) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" GST_ELEMENT_COMPLEX\n");
|
2001-05-20 20:12:45 +00:00
|
|
|
have_flags = TRUE;
|
|
|
|
}
|
2002-09-09 09:30:07 +00:00
|
|
|
if (GST_FLAG_IS_SET (element, GST_ELEMENT_DECOUPLED)) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" GST_ELEMENT_DECOUPLED\n");
|
2001-05-20 20:12:45 +00:00
|
|
|
have_flags = TRUE;
|
|
|
|
}
|
2002-09-09 09:30:07 +00:00
|
|
|
if (GST_FLAG_IS_SET (element, GST_ELEMENT_THREAD_SUGGESTED)) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" GST_ELEMENT_THREADSUGGESTED\n");
|
2001-05-20 20:12:45 +00:00
|
|
|
have_flags = TRUE;
|
|
|
|
}
|
2002-09-09 09:30:07 +00:00
|
|
|
if (GST_FLAG_IS_SET (element, GST_ELEMENT_EVENT_AWARE)) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print(" GST_ELEMENT_EVENT_AWARE\n");
|
2001-05-20 20:12:45 +00:00
|
|
|
have_flags = TRUE;
|
|
|
|
}
|
|
|
|
if (!have_flags)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print(" no flags set\n");
|
2001-01-03 07:38:45 +00:00
|
|
|
|
2002-03-30 17:06:45 +00:00
|
|
|
if (GST_IS_BIN (element)) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("\nBin Flags:\n");
|
2002-09-09 09:30:07 +00:00
|
|
|
if (GST_FLAG_IS_SET (element, GST_BIN_FLAG_MANAGER)) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" GST_BIN_FLAG_MANAGER\n");
|
2002-03-30 17:06:45 +00:00
|
|
|
have_flags = TRUE;
|
|
|
|
}
|
2002-09-09 09:30:07 +00:00
|
|
|
if (GST_FLAG_IS_SET (element, GST_BIN_SELF_SCHEDULABLE)) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" GST_BIN_SELF_SCHEDULABLE\n");
|
2002-03-30 17:06:45 +00:00
|
|
|
have_flags = TRUE;
|
|
|
|
}
|
2002-09-09 09:30:07 +00:00
|
|
|
if (GST_FLAG_IS_SET (element, GST_BIN_FLAG_PREFER_COTHREADS)) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" GST_BIN_FLAG_PREFER_COTHREADS\n");
|
2002-03-30 17:06:45 +00:00
|
|
|
have_flags = TRUE;
|
|
|
|
}
|
|
|
|
if (!have_flags)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" no flags set\n");
|
2002-03-30 17:06:45 +00:00
|
|
|
}
|
|
|
|
|
2001-01-03 07:38:45 +00:00
|
|
|
|
2001-05-25 21:00:07 +00:00
|
|
|
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("\nElement Implementation:\n");
|
2001-05-25 21:00:07 +00:00
|
|
|
|
2001-01-03 07:38:45 +00:00
|
|
|
if (element->loopfunc)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" loopfunc()-based element: %s\n",
|
2003-03-16 20:06:02 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (element->loopfunc));
|
2001-01-03 07:38:45 +00:00
|
|
|
else
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" No loopfunc(), must be chain-based or not configured yet\n");
|
2001-01-03 07:38:45 +00:00
|
|
|
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Has change_state() function: %s\n",
|
2002-09-09 09:30:07 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (gstelement_class->change_state));
|
2001-10-17 10:21:27 +00:00
|
|
|
#ifndef GST_DISABLE_LOADSAVE
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Has custom save_thyself() function: %s\n",
|
2002-09-09 09:30:07 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (gstobject_class->save_thyself));
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Has custom restore_thyself() function: %s\n",
|
2002-09-09 09:30:07 +00:00
|
|
|
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;
|
|
|
|
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("\nClocking Interaction:\n");
|
2002-11-27 20:47:39 +00:00
|
|
|
if (gst_element_requires_clock (element)) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" element requires a clock\n");
|
2002-03-30 17:06:45 +00:00
|
|
|
have_flags = TRUE;
|
|
|
|
}
|
2002-11-27 20:47:39 +00:00
|
|
|
if (gst_element_provides_clock (element)) {
|
2002-03-30 17:06:45 +00:00
|
|
|
GstClock *clock;
|
|
|
|
|
|
|
|
clock = gst_element_get_clock (element);
|
2002-07-04 16:03:48 +00:00
|
|
|
if (clock)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" element provides a clock: %s\n", GST_OBJECT_NAME(clock));
|
2002-11-27 20:47:39 +00:00
|
|
|
else
|
|
|
|
g_print (" element is supposed to provide a clock but returned NULL\n");
|
2002-03-30 17:06:45 +00:00
|
|
|
have_flags = TRUE;
|
|
|
|
}
|
|
|
|
if (!have_flags) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" none\n");
|
2002-03-30 17:06:45 +00:00
|
|
|
}
|
2001-05-25 21:00:07 +00:00
|
|
|
|
2003-02-10 20:32:32 +00:00
|
|
|
#ifndef GST_DISABLE_INDEX
|
2002-12-14 15:01:22 +00:00
|
|
|
g_print ("\nIndexing capabilities:\n");
|
2002-12-14 15:00:08 +00:00
|
|
|
if (gst_element_is_indexable (element)) {
|
2002-12-14 15:01:22 +00:00
|
|
|
g_print (" element can do indexing\n");
|
2002-11-27 20:47:39 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
g_print (" none\n");
|
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#endif
|
2001-05-25 21:00:07 +00:00
|
|
|
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("\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) {
|
2002-09-09 22:07:56 +00:00
|
|
|
const GList *pads;
|
2002-09-09 09:30:07 +00:00
|
|
|
pads = gst_element_get_pad_list (element);
|
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 (pads) {
|
2002-09-09 09:30:07 +00:00
|
|
|
pad = GST_PAD (pads->data);
|
|
|
|
pads = g_list_next (pads);
|
|
|
|
realpad = GST_PAD_REALIZE (pad);
|
|
|
|
|
|
|
|
if (gst_pad_get_direction (pad) == GST_PAD_SRC)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" SRC: '%s'", gst_pad_get_name (pad));
|
2002-09-09 09:30:07 +00:00
|
|
|
else if (gst_pad_get_direction (pad) == GST_PAD_SINK)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" SINK: '%s'", gst_pad_get_name (pad));
|
2001-01-03 07:38:45 +00:00
|
|
|
else
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" UNKNOWN!!!: '%s'\n", 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
|
|
|
|
2002-09-09 09:30:07 +00:00
|
|
|
if (GST_IS_GHOST_PAD (pad))
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (", ghost of real pad %s:%s\n", GST_DEBUG_PAD_NAME (realpad));
|
2001-05-25 21:00:07 +00:00
|
|
|
else
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("\n");
|
2001-05-25 21:00:07 +00:00
|
|
|
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Implementation:\n");
|
2001-01-19 02:23:35 +00:00
|
|
|
if (realpad->chainfunc)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Has chainfunc(): %s\n",
|
2003-03-16 20:06:02 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (realpad->chainfunc));
|
2001-01-19 02:23:35 +00:00
|
|
|
if (realpad->getfunc)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Has getfunc(): %s\n",
|
2003-03-16 20:06:02 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (realpad->getfunc));
|
2002-07-24 21:13:30 +00:00
|
|
|
if (realpad->formatsfunc != gst_pad_get_formats_default) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Supports seeking/conversion/query formats:\n");
|
2003-03-16 20:06:02 +00:00
|
|
|
print_formats (gst_pad_get_formats (GST_PAD (realpad)));
|
2002-07-24 21:13:30 +00:00
|
|
|
}
|
|
|
|
if (realpad->convertfunc != gst_pad_convert_default)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Has custom convertfunc(): %s\n",
|
2003-03-16 20:06:02 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (realpad->convertfunc));
|
2002-07-24 21:13:30 +00:00
|
|
|
if (realpad->eventfunc != gst_pad_event_default)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Has custom eventfunc(): %s\n",
|
2003-03-16 20:06:02 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (realpad->eventfunc));
|
2002-07-24 21:13:30 +00:00
|
|
|
if (realpad->eventmaskfunc != gst_pad_get_event_masks_default) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Provides event masks:\n");
|
2003-03-16 20:06:02 +00:00
|
|
|
print_event_masks (gst_pad_get_event_masks (GST_PAD (realpad)));
|
2002-07-24 21:13:30 +00:00
|
|
|
}
|
|
|
|
if (realpad->queryfunc != gst_pad_query_default)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Has custom queryfunc(): %s\n",
|
2003-03-16 20:06:02 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (realpad->queryfunc));
|
2002-07-24 21:13:30 +00:00
|
|
|
if (realpad->querytypefunc != gst_pad_get_query_types_default) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Provides query types:\n");
|
2003-03-16 20:06:02 +00:00
|
|
|
print_query_types (gst_pad_get_query_types (GST_PAD (realpad)));
|
2002-07-24 21:13:30 +00:00
|
|
|
}
|
|
|
|
|
2003-01-09 22:59:37 +00:00
|
|
|
if (realpad->intlinkfunc != gst_pad_get_internal_links_default)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Has custom intconnfunc(): %s\n",
|
2003-03-16 20:06:02 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME(realpad->intlinkfunc));
|
2002-07-24 21:13:30 +00:00
|
|
|
|
|
|
|
if (realpad->bufferpoolfunc)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Has bufferpoolfunc(): %s\n",
|
2003-03-16 20:06:02 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME(realpad->bufferpoolfunc));
|
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)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Pad Template: '%s'\n",
|
2003-03-16 20:06:02 +00:00
|
|
|
pad->padtemplate->name_template);
|
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-01-19 02:23:35 +00:00
|
|
|
if (realpad->caps) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Capabilities:\n");
|
2003-03-16 20:06:02 +00:00
|
|
|
print_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
|
|
|
}
|
|
|
|
}
|
|
|
|
} else
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" none\n");
|
2001-05-25 21:00:07 +00:00
|
|
|
|
2002-05-08 20:40:48 +00:00
|
|
|
print_element_properties (element);
|
2001-07-25 21:40:42 +00:00
|
|
|
|
2002-04-14 10:13:24 +00:00
|
|
|
/* Dynamic Parameters block */
|
|
|
|
{
|
|
|
|
GstDParamManager* dpman;
|
|
|
|
GParamSpec** specs;
|
|
|
|
gint x;
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("\nDynamic Parameters:\n");
|
2002-09-09 09:30:07 +00:00
|
|
|
if((dpman = gst_dpman_get_manager (element))) {
|
|
|
|
specs = gst_dpman_list_dparam_specs (dpman);
|
|
|
|
for (x = 0; specs[x] != NULL; x++) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" %-20.20s: ", g_param_spec_get_name (specs[x]));
|
2002-06-04 16:32:53 +00:00
|
|
|
|
2002-04-14 10:13:24 +00:00
|
|
|
switch (G_PARAM_SPEC_VALUE_TYPE (specs[x])) {
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_INT64:
|
|
|
|
g_print ("64 Bit Integer (Default %" G_GINT64_FORMAT ", Range %"
|
|
|
|
G_GINT64_FORMAT " -> %" G_GINT64_FORMAT ")",
|
2002-09-09 09:30:07 +00:00
|
|
|
((GParamSpecInt64 *) specs[x])->default_value,
|
2003-03-16 20:06:02 +00:00
|
|
|
((GParamSpecInt64 *) specs[x])->minimum,
|
2002-09-09 09:30:07 +00:00
|
|
|
((GParamSpecInt64 *) specs[x])->maximum);
|
2002-04-14 10:13:24 +00:00
|
|
|
break;
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_INT:
|
|
|
|
g_print ("Integer (Default %d, Range %d -> %d)",
|
2002-09-09 09:30:07 +00:00
|
|
|
((GParamSpecInt *) specs[x])->default_value,
|
2003-03-16 20:06:02 +00:00
|
|
|
((GParamSpecInt *) specs[x])->minimum,
|
2002-09-09 09:30:07 +00:00
|
|
|
((GParamSpecInt *) specs[x])->maximum);
|
2002-04-14 10:13:24 +00:00
|
|
|
break;
|
2003-03-16 20:06:02 +00:00
|
|
|
case G_TYPE_FLOAT:
|
|
|
|
g_print ("Float. Default: %-8.8s %15.7g\n", "",
|
2002-09-09 09:30:07 +00:00
|
|
|
((GParamSpecFloat *) specs[x])->default_value);
|
2003-03-16 20:06:02 +00:00
|
|
|
g_print ("%-23.23s Range: %15.7g - %15.7g", "",
|
|
|
|
((GParamSpecFloat *) specs[x])->minimum,
|
2002-09-09 09:30:07 +00:00
|
|
|
((GParamSpecFloat *) specs[x])->maximum);
|
2002-04-14 10:13:24 +00:00
|
|
|
break;
|
2002-09-09 22:07:56 +00:00
|
|
|
default: g_print ("unknown %ld", G_PARAM_SPEC_VALUE_TYPE (specs[x]));
|
2002-04-14 10:13:24 +00:00
|
|
|
}
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("\n");
|
2002-04-14 10:13:24 +00:00
|
|
|
}
|
2002-09-09 09:30:07 +00:00
|
|
|
g_free (specs);
|
2002-04-14 10:13:24 +00:00
|
|
|
}
|
|
|
|
else {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" none\n");
|
2002-04-14 10:13:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
/* Signals/Actions Block */
|
2001-07-25 21:40:42 +00:00
|
|
|
{
|
|
|
|
guint *signals;
|
|
|
|
guint nsignals;
|
2002-07-24 21:13:30 +00:00
|
|
|
gint i, k;
|
2001-07-27 16:35:27 +00:00
|
|
|
GSignalQuery *query;
|
2003-08-18 07:34:17 +00:00
|
|
|
GType type;
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2002-09-09 09:30:07 +00:00
|
|
|
for (k = 0; k < 2; k++) {
|
2002-07-24 21:13:30 +00:00
|
|
|
gint counted = 0;
|
|
|
|
|
|
|
|
if (k == 0)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("\nElement Signals:\n");
|
2002-07-24 21:13:30 +00:00
|
|
|
else
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("\nElement Actions:\n");
|
2001-01-03 07:38:45 +00:00
|
|
|
|
2003-08-18 07:34:17 +00:00
|
|
|
for(type = G_OBJECT_TYPE(element); type; type = g_type_parent(type)){
|
|
|
|
signals = g_signal_list_ids (type, &nsignals);
|
|
|
|
|
|
|
|
for (i = 0; i < nsignals; i++) {
|
|
|
|
gint n_params;
|
|
|
|
GType return_type;
|
|
|
|
const GType *param_types;
|
|
|
|
gint j;
|
|
|
|
|
|
|
|
query = g_new0 (GSignalQuery,1);
|
|
|
|
g_signal_query (signals[i], query);
|
|
|
|
|
|
|
|
if ((k == 0 && !(query->signal_flags & G_SIGNAL_ACTION)) ||
|
|
|
|
(k == 1 && (query->signal_flags & G_SIGNAL_ACTION))) {
|
|
|
|
n_params = query->n_params;
|
|
|
|
return_type = query->return_type;
|
|
|
|
param_types = query->param_types;
|
|
|
|
|
|
|
|
g_print (" \"%s\" :\t %s user_function (%s* object",
|
|
|
|
query->signal_name, g_type_name (return_type),
|
|
|
|
g_type_name (type));
|
|
|
|
|
|
|
|
for (j = 0; j < n_params; j++) {
|
|
|
|
g_print (",\n \t\t\t\t%s arg%d", g_type_name(param_types[j]), j);
|
|
|
|
}
|
|
|
|
if (k == 0)
|
|
|
|
g_print (",\n \t\t\t\tgpointer user_data);\n");
|
|
|
|
else
|
|
|
|
g_print (");\n");
|
|
|
|
|
|
|
|
counted++;
|
|
|
|
}
|
|
|
|
|
|
|
|
g_free (query);
|
|
|
|
}
|
2002-07-24 21:13:30 +00:00
|
|
|
}
|
2002-09-09 22:07:56 +00:00
|
|
|
if (counted == 0) g_print (" none\n");
|
2001-07-25 21:40:42 +00:00
|
|
|
}
|
|
|
|
}
|
2001-05-25 21:00:07 +00:00
|
|
|
|
2001-12-14 20:56:51 +00:00
|
|
|
/* for compound elements */
|
2002-09-09 09:30:07 +00:00
|
|
|
if (GST_IS_BIN (element)) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("\nChildren:\n");
|
2002-09-09 09:30:07 +00:00
|
|
|
children = (GList *) gst_bin_get_list (GST_BIN (element));
|
2003-03-16 20:06:02 +00:00
|
|
|
if (!children)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" none\n");
|
2001-07-25 21:40:42 +00:00
|
|
|
else {
|
|
|
|
while (children) {
|
|
|
|
child = GST_ELEMENT (children->data);
|
|
|
|
children = g_list_next (children);
|
|
|
|
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" %s\n", GST_ELEMENT_NAME (child));
|
2001-07-25 21:40:42 +00:00
|
|
|
}
|
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
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
static void
|
|
|
|
print_element_list (void)
|
2001-08-21 20:16:48 +00:00
|
|
|
{
|
|
|
|
GList *plugins;
|
2001-01-04 10:47:39 +00:00
|
|
|
|
2002-05-08 20:40:48 +00:00
|
|
|
plugins = gst_registry_pool_plugin_list();
|
2001-01-04 10:47:39 +00:00
|
|
|
while (plugins) {
|
2001-08-21 20:16:48 +00:00
|
|
|
GList *features;
|
|
|
|
GstPlugin *plugin;
|
2003-03-16 20:06:02 +00:00
|
|
|
|
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);
|
2003-03-16 20:06:02 +00:00
|
|
|
g_print ("%s: %s: %s\n", plugin->name,
|
|
|
|
GST_PLUGIN_FEATURE_NAME (factory) ,factory->details->longname);
|
2001-08-21 20:16:48 +00:00
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#ifndef GST_DISABLE_AUTOPLUG
|
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);
|
2003-03-16 20:06:02 +00:00
|
|
|
g_print ("%s: %s: %s\n", plugin->name,
|
|
|
|
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
|
2001-08-21 20:16:48 +00:00
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#endif
|
|
|
|
#ifndef GST_DISABLE_INDEX
|
2002-12-12 22:14:36 +00:00
|
|
|
else if (GST_IS_INDEX_FACTORY (feature)) {
|
|
|
|
GstIndexFactory *factory;
|
2002-11-29 18:18:34 +00:00
|
|
|
|
2002-12-12 22:14:36 +00:00
|
|
|
factory = GST_INDEX_FACTORY (feature);
|
2003-03-16 20:06:02 +00:00
|
|
|
g_print ("%s: %s: %s\n", plugin->name,
|
|
|
|
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
|
2002-11-29 18:18:34 +00:00
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#endif
|
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);
|
2003-06-25 12:18:31 +00:00
|
|
|
if (factory->exts)
|
|
|
|
g_print ("%s type: %s: %s\n", plugin->name,
|
|
|
|
factory->mime, factory->exts);
|
|
|
|
else
|
|
|
|
g_print ("%s type: %s: N/A\n", plugin->name,
|
|
|
|
factory->mime);
|
2001-01-04 10:47:39 +00:00
|
|
|
|
2001-08-21 20:16:48 +00:00
|
|
|
if (factory->typefindfunc)
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" Has typefind function: %s\n",
|
2003-03-16 20:06:02 +00:00
|
|
|
GST_DEBUG_FUNCPTR_NAME (factory->typefindfunc));
|
2001-08-21 20:16:48 +00:00
|
|
|
}
|
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);
|
2003-03-16 20:06:02 +00:00
|
|
|
g_print ("%s: %s: %s\n", plugin->name,
|
|
|
|
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
|
2001-12-04 22:12:50 +00:00
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#ifndef GST_DISABLE_URI
|
2003-01-16 21:22:26 +00:00
|
|
|
else if (GST_IS_URI_HANDLER (feature)) {
|
|
|
|
GstURIHandler *handler;
|
|
|
|
|
|
|
|
handler = GST_URI_HANDLER (feature);
|
2003-03-16 20:06:02 +00:00
|
|
|
g_print ("%s: %s: \"%s\" (%s) element \"%s\" property \"%s\"\n",
|
|
|
|
plugin->name, GST_PLUGIN_FEATURE_NAME (handler), handler->uri,
|
|
|
|
handler->longdesc, handler->element, handler->property);
|
2003-01-16 21:22:26 +00:00
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#endif
|
2001-08-21 20:16:48 +00:00
|
|
|
else {
|
2003-03-16 20:06:02 +00:00
|
|
|
g_print ("%s: %s (%s)\n", plugin->name,
|
|
|
|
GST_PLUGIN_FEATURE_NAME (feature),
|
|
|
|
g_type_name (G_OBJECT_TYPE (feature)));
|
2001-08-21 20:16:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
2002-11-27 20:47:39 +00:00
|
|
|
gint num_features = 0;
|
|
|
|
gint num_elements = 0;
|
|
|
|
gint num_autoplug = 0;
|
|
|
|
gint num_types = 0;
|
|
|
|
gint num_schedulers = 0;
|
2002-12-12 22:14:36 +00:00
|
|
|
gint num_indexes = 0;
|
2002-11-27 20:47:39 +00:00
|
|
|
gint num_other = 0;
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("Plugin Details:\n");
|
|
|
|
g_print (" Name:\t\t%s\n", plugin->name);
|
|
|
|
g_print (" Long Name:\t%s\n", plugin->longname);
|
|
|
|
g_print (" Filename:\t%s\n", plugin->filename);
|
|
|
|
g_print ("\n");
|
2001-01-04 10:47:39 +00:00
|
|
|
|
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);
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" %s: %s\n", GST_OBJECT_NAME (factory),
|
2003-03-16 20:06:02 +00:00
|
|
|
factory->details->longname);
|
2002-11-27 20:47:39 +00:00
|
|
|
num_elements++;
|
2001-03-07 21:52:56 +00:00
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#ifndef GST_DISABLE_AUTOPLUG
|
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);
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" %s: %s\n", GST_OBJECT_NAME (factory), factory->longdesc);
|
2002-11-27 20:47:39 +00:00
|
|
|
num_autoplug++;
|
2001-08-21 20:16:48 +00:00
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#endif
|
|
|
|
#ifndef GST_DISABLE_INDEX
|
2002-12-12 22:14:36 +00:00
|
|
|
else if (GST_IS_INDEX_FACTORY (feature)) {
|
|
|
|
GstIndexFactory *factory;
|
2002-11-29 18:18:34 +00:00
|
|
|
|
2002-12-12 22:14:36 +00:00
|
|
|
factory = GST_INDEX_FACTORY (feature);
|
2002-11-29 18:18:34 +00:00
|
|
|
g_print (" %s: %s\n", GST_OBJECT_NAME (factory), factory->longdesc);
|
2002-12-12 22:14:36 +00:00
|
|
|
num_indexes++;
|
2002-11-29 18:18:34 +00:00
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#endif
|
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);
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print (" %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)
|
2003-03-16 20:06:02 +00:00
|
|
|
g_print (" Has typefind function: %s\n",
|
|
|
|
GST_DEBUG_FUNCPTR_NAME (factory->typefindfunc));
|
2002-11-27 20:47:39 +00:00
|
|
|
num_types++;
|
2001-03-07 21:52:56 +00:00
|
|
|
}
|
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-09-09 22:07:56 +00:00
|
|
|
g_print (" %s: %s\n", GST_OBJECT_NAME (factory), factory->longdesc);
|
2002-11-27 20:47:39 +00:00
|
|
|
num_schedulers++;
|
2001-12-04 22:12:50 +00:00
|
|
|
}
|
2001-08-21 20:16:48 +00:00
|
|
|
else {
|
2003-03-16 20:06:02 +00:00
|
|
|
g_print (" %s (%s)\n", gst_object_get_name (GST_OBJECT (feature)),
|
|
|
|
g_type_name (G_OBJECT_TYPE (feature)));
|
2002-11-27 20:47:39 +00:00
|
|
|
num_other++;
|
2001-08-21 20:16:48 +00:00
|
|
|
}
|
2002-11-27 20:47:39 +00:00
|
|
|
num_features++;
|
2001-08-21 20:16:48 +00:00
|
|
|
features = g_list_next (features);
|
2001-03-07 21:52:56 +00:00
|
|
|
}
|
2002-11-27 20:47:39 +00:00
|
|
|
g_print ("\n %d features:\n", num_features);
|
|
|
|
if (num_elements > 0)
|
|
|
|
g_print (" +-- %d elements\n", num_elements);
|
|
|
|
if (num_autoplug > 0)
|
|
|
|
g_print (" +-- %d autopluggers\n", num_autoplug);
|
|
|
|
if (num_types > 0)
|
|
|
|
g_print (" +-- %d types\n", num_types);
|
|
|
|
if (num_schedulers > 0)
|
|
|
|
g_print (" +-- %d schedulers\n", num_schedulers);
|
2002-12-12 22:14:36 +00:00
|
|
|
if (num_indexes > 0)
|
|
|
|
g_print (" +-- %d indexes\n", num_indexes);
|
2002-11-27 20:47:39 +00:00
|
|
|
if (num_other > 0)
|
|
|
|
g_print (" +-- %d other objects\n", num_other);
|
2003-03-16 20:06:02 +00:00
|
|
|
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("\n");
|
2001-01-04 10:47:39 +00:00
|
|
|
}
|
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
2001-08-21 20:16:48 +00:00
|
|
|
{
|
2001-01-04 10:47:39 +00:00
|
|
|
GstElementFactory *factory;
|
|
|
|
GstPlugin *plugin;
|
|
|
|
gchar *so;
|
2002-09-15 18:59:27 +00:00
|
|
|
struct poptOption options[] = {
|
2003-03-16 20:06:02 +00:00
|
|
|
{"gst-inspect-plugin", 'p', POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, 0,
|
|
|
|
"Show plugin details", NULL},
|
|
|
|
{"gst-inspect-scheduler", 's', POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, 0,
|
|
|
|
"Show scheduler details", NULL},
|
2002-09-15 18:59:27 +00:00
|
|
|
POPT_TABLEEND
|
|
|
|
};
|
|
|
|
|
|
|
|
gst_init_with_popt_table (&argc, &argv, options);
|
2002-09-09 09:30:07 +00:00
|
|
|
gst_control_init (&argc, &argv);
|
2003-03-16 20:06:02 +00:00
|
|
|
|
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 */
|
2002-09-09 09:30:07 +00:00
|
|
|
if (strstr (argv[1], "-help")) {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print ("Usage: %s\t\t\tList all registered elements\n",argv[0]);
|
|
|
|
g_print (" %s element-name\tShow element details\n",argv[0]);
|
|
|
|
g_print (" %s plugin-name[.so]\tShow information about plugin\n",
|
2003-03-16 20:06:02 +00:00
|
|
|
argv[0]);
|
2001-01-04 10:47:39 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2001-12-14 20:56:51 +00:00
|
|
|
/* only search for a factory if there's not a '.so' */
|
2002-09-09 09:30:07 +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)
|
2002-09-09 09:30:07 +00:00
|
|
|
return print_element_info (factory);
|
2003-01-21 21:15:00 +00:00
|
|
|
else {
|
2003-03-16 20:06:02 +00:00
|
|
|
GstPluginFeature* feature;
|
2003-01-21 21:15:00 +00:00
|
|
|
|
2003-03-16 20:06:02 +00:00
|
|
|
/* FIXME implement other pretty print function for these */
|
|
|
|
feature = gst_registry_pool_find_feature (argv[1],
|
|
|
|
GST_TYPE_SCHEDULER_FACTORY);
|
|
|
|
if (feature) {
|
2003-01-21 21:15:00 +00:00
|
|
|
g_print ("%s: a scheduler\n", argv[1]);
|
2003-03-16 20:06:02 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#ifndef GST_DISABLE_INDEX
|
2003-03-16 20:06:02 +00:00
|
|
|
feature = gst_registry_pool_find_feature (argv[1],
|
|
|
|
GST_TYPE_INDEX_FACTORY);
|
|
|
|
if (feature) {
|
2003-01-21 21:15:00 +00:00
|
|
|
g_print ("%s: an index\n", argv[1]);
|
2003-03-16 20:06:02 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#endif
|
|
|
|
#ifndef GST_DISABLE_AUTOPLUG
|
2003-03-16 20:06:02 +00:00
|
|
|
feature = gst_registry_pool_find_feature (argv[1],
|
|
|
|
GST_TYPE_AUTOPLUG_FACTORY);
|
|
|
|
if (feature) {
|
2003-01-21 21:15:00 +00:00
|
|
|
g_print ("%s: an autoplugger\n", argv[1]);
|
2003-03-16 20:06:02 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#endif
|
2003-03-16 20:06:02 +00:00
|
|
|
feature = gst_registry_pool_find_feature (argv[1],
|
|
|
|
GST_TYPE_TYPE_FACTORY);
|
|
|
|
if (feature) {
|
2003-01-21 21:15:00 +00:00
|
|
|
g_print ("%s: an type\n", argv[1]);
|
2003-03-16 20:06:02 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#ifndef GST_DISABLE_URI
|
2003-03-16 20:06:02 +00:00
|
|
|
feature = gst_registry_pool_find_feature (argv[1],
|
|
|
|
GST_TYPE_URI_HANDLER);
|
|
|
|
if (feature) {
|
2003-01-21 21:15:00 +00:00
|
|
|
g_print ("%s: an uri handler\n", argv[1]);
|
2003-03-16 20:06:02 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2003-02-10 20:32:32 +00:00
|
|
|
#endif
|
2003-01-21 21:15:00 +00:00
|
|
|
}
|
2001-01-04 10:47:39 +00:00
|
|
|
} 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 */
|
2002-05-08 20:40:48 +00:00
|
|
|
plugin = gst_registry_pool_find_plugin (argv[1]);
|
2001-01-04 10:47:39 +00:00
|
|
|
|
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) {
|
2002-09-09 09:30:07 +00:00
|
|
|
print_plugin_info (plugin);
|
2001-01-04 10:47:39 +00:00
|
|
|
|
|
|
|
} else {
|
2002-09-09 22:07:56 +00:00
|
|
|
g_print("no such element or plugin '%s'\n", argv[1]);
|
2001-01-04 10:47:39 +00:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|