diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c
index 807d7450d688f4e4864e6bb3ff818d55567d9d8d..ef93a33505142a61295a2810f8f1b2e911df957d 100644 (file)
--- a/tools/gst-inspect.c
+++ b/tools/gst-inspect.c
definition = gst_format_get_details (*formats);
if (definition)
g_print ("\t\t(%d):\t%s (%s)\n", *formats,
- definition->nick, definition->description);
+ definition->nick, definition->description);
else
g_print ("\t\t(%d):\tUnknown format\n", *formats);
definition = gst_query_type_get_details (*types);
if (definition)
g_print ("\t\t(%d):\t%s (%s)\n", *types,
- definition->nick, definition->description);
+ definition->nick, definition->description);
else
g_print ("\t\t(%d):\tUnknown query format\n", *types);
switch (masks->type) {
case GST_EVENT_SEEK:
- flags = masks->flags;
- event_flags = gst_seek_type_get_type ();
- flags_class = (GFlagsClass *) g_type_class_ref (event_flags);
- break;
+ flags = masks->flags;
+ event_flags = gst_seek_type_get_type ();
+ flags_class = (GFlagsClass *) g_type_class_ref (event_flags);
+ break;
default:
- break;
+ break;
}
value = g_enum_get_value (klass, masks->type);
GFlagsValue *value;
if (flags & 1) {
- value = g_flags_get_first_value (flags_class, 1 << index);
+ value = g_flags_get_first_value (flags_class, 1 << index);
- if (value)
- g_print ("| %s ", value->value_nick);
- else
- g_print ("| ? ");
+ if (value)
+ g_print ("| %s ", value->value_nick);
+ else
+ g_print ("| ? ");
}
flags >>= 1;
index++;
}
g_print (" %-20s: %s\n", g_param_spec_get_name (param),
- g_param_spec_get_blurb (param));
+ g_param_spec_get_blurb (param));
switch (G_VALUE_TYPE (&value)) {
case G_TYPE_STRING:
- string_val = g_value_get_string (&value);
- g_print ("%-23.23s String. ", "");
- if (readable) {
- if (string_val == NULL)
- g_print ("(Default \"\")");
- else
- g_print ("(Default \"%s\")", g_value_get_string (&value));
- }
- break;
+ string_val = g_value_get_string (&value);
+ g_print ("%-23.23s String. ", "");
+ if (readable) {
+ if (string_val == NULL)
+ g_print ("(Default \"\")");
+ else
+ g_print ("(Default \"%s\")", g_value_get_string (&value));
+ }
+ break;
case G_TYPE_BOOLEAN:
- g_print ("%-23.23s Boolean. ", "");
- if (readable)
- g_print ("(Default %s)",
- (g_value_get_boolean (&value) ? "true" : "false"));
- break;
+ g_print ("%-23.23s Boolean. ", "");
+ if (readable)
+ g_print ("(Default %s)",
+ (g_value_get_boolean (&value) ? "true" : "false"));
+ break;
case G_TYPE_ULONG:
{
- GParamSpecULong *pulong = G_PARAM_SPEC_ULONG (param);
+ 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;
+ 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;
}
case G_TYPE_LONG:
{
- GParamSpecLong *plong = G_PARAM_SPEC_LONG (param);
+ 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;
+ g_print ("%-23.23s Long. ", "");
+ if (readable)
+ g_print ("Range: %ld - %ld (Default %ld)",
+ plong->minimum, plong->maximum, g_value_get_long (&value));
+ break;
}
case G_TYPE_UINT:
{
- GParamSpecUInt *puint = G_PARAM_SPEC_UINT (param);
+ 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;
+ 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;
}
case G_TYPE_INT:
{
- GParamSpecInt *pint = G_PARAM_SPEC_INT (param);
+ 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;
+ g_print ("%-23.23s Integer. ", "");
+ if (readable)
+ g_print ("Range: %d - %d (Default %d)",
+ pint->minimum, pint->maximum, g_value_get_int (&value));
+ break;
}
case G_TYPE_UINT64:
{
- 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;
+ 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;
}
case G_TYPE_INT64:
{
- 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;
+ 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;
}
case G_TYPE_FLOAT:
{
- GParamSpecFloat *pfloat = G_PARAM_SPEC_FLOAT (param);
+ 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;
+ 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;
}
case G_TYPE_DOUBLE:
{
- GParamSpecDouble *pdouble = G_PARAM_SPEC_DOUBLE (param);
+ 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;
+ 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;
}
default:
- if (param->value_type == GST_TYPE_URI) {
- g_print ("%-23.23s URI", "");
- }
- if (param->value_type == GST_TYPE_CAPS) {
- const GstCaps *caps = gst_value_get_caps (&value);
-
- if (!caps)
- g_print ("%-23.23s Caps (NULL)", "");
- else {
- print_caps (caps, " ");
- }
- } else if (G_IS_PARAM_SPEC_ENUM (param)) {
- GEnumValue *values;
- 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); */
- } else if (G_IS_PARAM_SPEC_FLAGS (param)) {
- GFlagsValue *values;
- 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));
- }
- break;
+ if (param->value_type == GST_TYPE_URI) {
+ g_print ("%-23.23s URI", "");
+ }
+ if (param->value_type == GST_TYPE_CAPS) {
+ const GstCaps *caps = gst_value_get_caps (&value);
+
+ if (!caps)
+ g_print ("%-23.23s Caps (NULL)", "");
+ else {
+ print_caps (caps, " ");
+ }
+ } else if (G_IS_PARAM_SPEC_ENUM (param)) {
+ GEnumValue *values;
+ 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); */
+ } else if (G_IS_PARAM_SPEC_FLAGS (param)) {
+ GFlagsValue *values;
+ 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));
+ }
+ break;
}
if (!readable)
g_print (" Write only\n");
pads = g_list_next (pads);
if (padtemplate->direction == GST_PAD_SRC)
- g_print (" SRC template: '%s'\n", padtemplate->name_template);
+ g_print (" SRC template: '%s'\n", padtemplate->name_template);
else if (padtemplate->direction == GST_PAD_SINK)
- g_print (" SINK template: '%s'\n", padtemplate->name_template);
+ g_print (" SINK template: '%s'\n", padtemplate->name_template);
else
- g_print (" UNKNOWN!!! template: '%s'\n", padtemplate->name_template);
+ g_print (" UNKNOWN!!! template: '%s'\n", padtemplate->name_template);
if (padtemplate->presence == GST_PAD_ALWAYS)
- g_print (" Availability: Always\n");
+ g_print (" Availability: Always\n");
else if (padtemplate->presence == GST_PAD_SOMETIMES)
- g_print (" Availability: Sometimes\n");
+ g_print (" Availability: Sometimes\n");
else if (padtemplate->presence == GST_PAD_REQUEST) {
- g_print (" Availability: On request\n");
- g_print (" Has request_new_pad() function: %s\n",
- GST_DEBUG_FUNCPTR_NAME (gstelement_class->request_new_pad));
+ g_print (" Availability: On request\n");
+ g_print (" Has request_new_pad() function: %s\n",
+ GST_DEBUG_FUNCPTR_NAME (gstelement_class->request_new_pad));
} else
- g_print (" Availability: UNKNOWN!!!\n");
+ g_print (" Availability: UNKNOWN!!!\n");
if (padtemplate->caps) {
- g_print (" Capabilities:\n");
- print_caps (padtemplate->caps, " ");
+ g_print (" Capabilities:\n");
+ print_caps (padtemplate->caps, " ");
}
g_print ("\n");
if (element->loopfunc)
g_print (" loopfunc()-based element: %s\n",
- GST_DEBUG_FUNCPTR_NAME (element->loopfunc));
+ GST_DEBUG_FUNCPTR_NAME (element->loopfunc));
else
g_print (" No loopfunc(), must be chain-based or not configured yet\n");
realpad = GST_PAD_REALIZE (pad);
if (gst_pad_get_direction (pad) == GST_PAD_SRC)
- g_print (" SRC: '%s'", gst_pad_get_name (pad));
+ g_print (" SRC: '%s'", gst_pad_get_name (pad));
else if (gst_pad_get_direction (pad) == GST_PAD_SINK)
- g_print (" SINK: '%s'", gst_pad_get_name (pad));
+ g_print (" SINK: '%s'", gst_pad_get_name (pad));
else
- g_print (" UNKNOWN!!!: '%s'\n", gst_pad_get_name (pad));
+ g_print (" UNKNOWN!!!: '%s'\n", gst_pad_get_name (pad));
if (GST_IS_GHOST_PAD (pad))
- g_print (", ghost of real pad %s:%s\n", GST_DEBUG_PAD_NAME (realpad));
+ g_print (", ghost of real pad %s:%s\n", GST_DEBUG_PAD_NAME (realpad));
else
- g_print ("\n");
+ g_print ("\n");
g_print (" Implementation:\n");
if (realpad->chainfunc)
- g_print (" Has chainfunc(): %s\n",
- GST_DEBUG_FUNCPTR_NAME (realpad->chainfunc));
+ g_print (" Has chainfunc(): %s\n",
+ GST_DEBUG_FUNCPTR_NAME (realpad->chainfunc));
if (realpad->getfunc)
- g_print (" Has getfunc(): %s\n",
- GST_DEBUG_FUNCPTR_NAME (realpad->getfunc));
+ g_print (" Has getfunc(): %s\n",
+ GST_DEBUG_FUNCPTR_NAME (realpad->getfunc));
if (realpad->formatsfunc != gst_pad_get_formats_default) {
- g_print (" Supports seeking/conversion/query formats:\n");
- print_formats (gst_pad_get_formats (GST_PAD (realpad)));
+ g_print (" Supports seeking/conversion/query formats:\n");
+ print_formats (gst_pad_get_formats (GST_PAD (realpad)));
}
if (realpad->convertfunc != gst_pad_convert_default)
- g_print (" Has custom convertfunc(): %s\n",
- GST_DEBUG_FUNCPTR_NAME (realpad->convertfunc));
+ g_print (" Has custom convertfunc(): %s\n",
+ GST_DEBUG_FUNCPTR_NAME (realpad->convertfunc));
if (realpad->eventfunc != gst_pad_event_default)
- g_print (" Has custom eventfunc(): %s\n",
- GST_DEBUG_FUNCPTR_NAME (realpad->eventfunc));
+ g_print (" Has custom eventfunc(): %s\n",
+ GST_DEBUG_FUNCPTR_NAME (realpad->eventfunc));
if (realpad->eventmaskfunc != gst_pad_get_event_masks_default) {
- g_print (" Provides event masks:\n");
- print_event_masks (gst_pad_get_event_masks (GST_PAD (realpad)));
+ g_print (" Provides event masks:\n");
+ print_event_masks (gst_pad_get_event_masks (GST_PAD (realpad)));
}
if (realpad->queryfunc != gst_pad_query_default)
- g_print (" Has custom queryfunc(): %s\n",
- GST_DEBUG_FUNCPTR_NAME (realpad->queryfunc));
+ g_print (" Has custom queryfunc(): %s\n",
+ GST_DEBUG_FUNCPTR_NAME (realpad->queryfunc));
if (realpad->querytypefunc != gst_pad_get_query_types_default) {
- g_print (" Provides query types:\n");
- print_query_types (gst_pad_get_query_types (GST_PAD (realpad)));
+ g_print (" Provides query types:\n");
+ print_query_types (gst_pad_get_query_types (GST_PAD (realpad)));
}
if (realpad->intlinkfunc != gst_pad_get_internal_links_default)
- g_print (" Has custom intconnfunc(): %s\n",
- GST_DEBUG_FUNCPTR_NAME (realpad->intlinkfunc));
+ g_print (" Has custom intconnfunc(): %s\n",
+ GST_DEBUG_FUNCPTR_NAME (realpad->intlinkfunc));
if (realpad->bufferallocfunc)
- g_print (" Has bufferallocfunc(): %s\n",
- GST_DEBUG_FUNCPTR_NAME (realpad->bufferallocfunc));
+ g_print (" Has bufferallocfunc(): %s\n",
+ GST_DEBUG_FUNCPTR_NAME (realpad->bufferallocfunc));
if (pad->padtemplate)
- g_print (" Pad Template: '%s'\n", pad->padtemplate->name_template);
+ g_print (" Pad Template: '%s'\n", pad->padtemplate->name_template);
if (realpad->caps) {
- g_print (" Capabilities:\n");
- print_caps (realpad->caps, " ");
+ g_print (" Capabilities:\n");
+ print_caps (realpad->caps, " ");
}
}
} else
if ((dpman = gst_dpman_get_manager (element))) {
specs = gst_dpman_list_dparam_specs (dpman);
for (x = 0; specs[x] != NULL; x++) {
- g_print (" %-20.20s: ", g_param_spec_get_name (specs[x]));
-
- switch (G_PARAM_SPEC_VALUE_TYPE (specs[x])) {
- case G_TYPE_INT64:
- g_print ("64 Bit Integer (Default %" G_GINT64_FORMAT ", Range %"
- G_GINT64_FORMAT " -> %" G_GINT64_FORMAT ")",
- ((GParamSpecInt64 *) specs[x])->default_value,
- ((GParamSpecInt64 *) specs[x])->minimum,
- ((GParamSpecInt64 *) specs[x])->maximum);
- break;
- case G_TYPE_INT:
- g_print ("Integer (Default %d, Range %d -> %d)",
- ((GParamSpecInt *) specs[x])->default_value,
- ((GParamSpecInt *) specs[x])->minimum,
- ((GParamSpecInt *) specs[x])->maximum);
- break;
- case G_TYPE_FLOAT:
- g_print ("Float. Default: %-8.8s %15.7g\n", "",
- ((GParamSpecFloat *) specs[x])->default_value);
- g_print ("%-23.23s Range: %15.7g - %15.7g", "",
- ((GParamSpecFloat *) specs[x])->minimum,
- ((GParamSpecFloat *) specs[x])->maximum);
- break;
- case G_TYPE_DOUBLE:
- g_print ("Double. Default: %-8.8s %15.7g\n", "",
- ((GParamSpecDouble *) specs[x])->default_value);
- g_print ("%-23.23s Range: %15.7g - %15.7g", "",
- ((GParamSpecDouble *) specs[x])->minimum,
- ((GParamSpecDouble *) specs[x])->maximum);
- break;
- default:
- g_print ("unknown %ld", G_PARAM_SPEC_VALUE_TYPE (specs[x]));
- }
- g_print ("\n");
+ g_print (" %-20.20s: ", g_param_spec_get_name (specs[x]));
+
+ switch (G_PARAM_SPEC_VALUE_TYPE (specs[x])) {
+ case G_TYPE_INT64:
+ g_print ("64 Bit Integer (Default %" G_GINT64_FORMAT ", Range %"
+ G_GINT64_FORMAT " -> %" G_GINT64_FORMAT ")",
+ ((GParamSpecInt64 *) specs[x])->default_value,
+ ((GParamSpecInt64 *) specs[x])->minimum,
+ ((GParamSpecInt64 *) specs[x])->maximum);
+ break;
+ case G_TYPE_INT:
+ g_print ("Integer (Default %d, Range %d -> %d)",
+ ((GParamSpecInt *) specs[x])->default_value,
+ ((GParamSpecInt *) specs[x])->minimum,
+ ((GParamSpecInt *) specs[x])->maximum);
+ break;
+ case G_TYPE_FLOAT:
+ g_print ("Float. Default: %-8.8s %15.7g\n", "",
+ ((GParamSpecFloat *) specs[x])->default_value);
+ g_print ("%-23.23s Range: %15.7g - %15.7g", "",
+ ((GParamSpecFloat *) specs[x])->minimum,
+ ((GParamSpecFloat *) specs[x])->maximum);
+ break;
+ case G_TYPE_DOUBLE:
+ g_print ("Double. Default: %-8.8s %15.7g\n", "",
+ ((GParamSpecDouble *) specs[x])->default_value);
+ g_print ("%-23.23s Range: %15.7g - %15.7g", "",
+ ((GParamSpecDouble *) specs[x])->minimum,
+ ((GParamSpecDouble *) specs[x])->maximum);
+ break;
+ default:
+ g_print ("unknown %ld", G_PARAM_SPEC_VALUE_TYPE (specs[x]));
+ }
+ g_print ("\n");
}
g_free (specs);
} else {
gint counted = 0;
if (k == 0)
- g_print ("\nElement Signals:\n");
+ g_print ("\nElement Signals:\n");
else
- g_print ("\nElement Actions:\n");
+ g_print ("\nElement Actions:\n");
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);
- }
+ 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);
+ }
}
if (counted == 0)
- g_print (" none\n");
+ g_print (" none\n");
}
}
g_print (" none\n");
else {
while (children) {
- child = GST_ELEMENT (children->data);
- children = g_list_next (children);
+ child = GST_ELEMENT (children->data);
+ children = g_list_next (children);
- g_print (" %s\n", GST_ELEMENT_NAME (child));
+ g_print (" %s\n", GST_ELEMENT_NAME (child));
}
}
}
feature = GST_PLUGIN_FEATURE (features->data);
if (GST_IS_ELEMENT_FACTORY (feature)) {
- GstElementFactory *factory;
+ GstElementFactory *factory;
- factory = GST_ELEMENT_FACTORY (feature);
- g_print ("%s: %s: %s\n", plugin->desc.name,
- GST_PLUGIN_FEATURE_NAME (factory), factory->details.longname);
+ factory = GST_ELEMENT_FACTORY (feature);
+ g_print ("%s: %s: %s\n", plugin->desc.name,
+ GST_PLUGIN_FEATURE_NAME (factory), factory->details.longname);
}
#ifndef GST_DISABLE_INDEX
else if (GST_IS_INDEX_FACTORY (feature)) {
- GstIndexFactory *factory;
+ GstIndexFactory *factory;
- factory = GST_INDEX_FACTORY (feature);
- g_print ("%s: %s: %s\n", plugin->desc.name,
- GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
+ factory = GST_INDEX_FACTORY (feature);
+ g_print ("%s: %s: %s\n", plugin->desc.name,
+ GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
}
#endif
else if (GST_IS_TYPE_FIND_FACTORY (feature)) {
- GstTypeFindFactory *factory;
-
- factory = GST_TYPE_FIND_FACTORY (feature);
- g_print ("%s: %s: ", plugin->desc.name,
- gst_plugin_feature_get_name (feature));
- if (factory->extensions) {
- guint i = 0;
-
- while (factory->extensions[i]) {
- g_print ("%s%s", i > 0 ? ", " : "", factory->extensions[i]);
- i++;
- }
- g_print ("\n");
- } else {
- g_print ("no extensions\n");
- }
+ GstTypeFindFactory *factory;
+
+ factory = GST_TYPE_FIND_FACTORY (feature);
+ g_print ("%s: %s: ", plugin->desc.name,
+ gst_plugin_feature_get_name (feature));
+ if (factory->extensions) {
+ guint i = 0;
+
+ while (factory->extensions[i]) {
+ g_print ("%s%s", i > 0 ? ", " : "", factory->extensions[i]);
+ i++;
+ }
+ g_print ("\n");
+ } else {
+ g_print ("no extensions\n");
+ }
} else if (GST_IS_SCHEDULER_FACTORY (feature)) {
- GstSchedulerFactory *factory;
+ GstSchedulerFactory *factory;
- factory = GST_SCHEDULER_FACTORY (feature);
- g_print ("%s: %s: %s\n", plugin->desc.name,
- GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
+ factory = GST_SCHEDULER_FACTORY (feature);
+ g_print ("%s: %s: %s\n", plugin->desc.name,
+ GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
} else {
- g_print ("%s: %s (%s)\n", plugin->desc.name,
- GST_PLUGIN_FEATURE_NAME (feature),
- g_type_name (G_OBJECT_TYPE (feature)));
+ g_print ("%s: %s (%s)\n", plugin->desc.name,
+ GST_PLUGIN_FEATURE_NAME (feature),
+ g_type_name (G_OBJECT_TYPE (feature)));
}
features = g_list_next (features);
factory = GST_ELEMENT_FACTORY (feature);
g_print (" %s: %s\n", GST_OBJECT_NAME (factory),
- factory->details.longname);
+ factory->details.longname);
num_elements++;
}
#ifndef GST_DISABLE_INDEX
factory = GST_TYPE_FIND_FACTORY (feature);
if (factory->extensions) {
- guint i = 0;
+ guint i = 0;
- g_print ("%s type: ", plugin->desc.name);
- while (factory->extensions[i]) {
- g_print ("%s%s", i > 0 ? ", " : "", factory->extensions[i]);
- i++;
- }
+ g_print ("%s type: ", plugin->desc.name);
+ while (factory->extensions[i]) {
+ g_print ("%s%s", i > 0 ? ", " : "", factory->extensions[i]);
+ i++;
+ }
} else
- g_print ("%s type: N/A\n", plugin->desc.name);
+ g_print ("%s type: N/A\n", plugin->desc.name);
num_types++;
} else if (GST_IS_SCHEDULER_FACTORY (feature)) {
num_schedulers++;
} else {
g_print (" %s (%s)\n", gst_object_get_name (GST_OBJECT (feature)),
- g_type_name (G_OBJECT_TYPE (feature)));
+ g_type_name (G_OBJECT_TYPE (feature)));
num_other++;
}
num_features++;
gchar *so;
struct poptOption options[] = {
{"gst-inspect-plugin", 'p', POPT_ARG_STRING | POPT_ARGFLAG_STRIP, NULL, 0,
- N_("Show plugin details"), NULL},
+ N_("Show plugin details"), NULL},
{"gst-inspect-scheduler", 's', POPT_ARG_STRING | POPT_ARGFLAG_STRIP, NULL,
- 0,
- N_("Show scheduler details"), NULL},
+ 0,
+ N_("Show scheduler details"), NULL},
POPT_TABLEEND
};
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",
- argv[0]);
+ argv[0]);
return 0;
}
/* if there's a factory, print out the info */
if (factory)
- return print_element_info (factory);
+ return print_element_info (factory);
else {
- GstPluginFeature *feature;
-
- /* FIXME implement other pretty print function for these */
- feature = gst_registry_pool_find_feature (argv[1],
- GST_TYPE_SCHEDULER_FACTORY);
- if (feature) {
- g_print ("%s: a scheduler\n", argv[1]);
- return 0;
- }
+ GstPluginFeature *feature;
+
+ /* FIXME implement other pretty print function for these */
+ feature = gst_registry_pool_find_feature (argv[1],
+ GST_TYPE_SCHEDULER_FACTORY);
+ if (feature) {
+ g_print ("%s: a scheduler\n", argv[1]);
+ return 0;
+ }
#ifndef GST_DISABLE_INDEX
- feature = gst_registry_pool_find_feature (argv[1],
- GST_TYPE_INDEX_FACTORY);
- if (feature) {
- g_print ("%s: an index\n", argv[1]);
- return 0;
- }
+ feature = gst_registry_pool_find_feature (argv[1],
+ GST_TYPE_INDEX_FACTORY);
+ if (feature) {
+ g_print ("%s: an index\n", argv[1]);
+ return 0;
+ }
#endif
- feature = gst_registry_pool_find_feature (argv[1],
- GST_TYPE_TYPE_FIND_FACTORY);
- if (feature) {
- g_print ("%s: a typefind function\n", argv[1]);
- return 0;
- }
+ feature = gst_registry_pool_find_feature (argv[1],
+ GST_TYPE_TYPE_FIND_FACTORY);
+ if (feature) {
+ g_print ("%s: a typefind function\n", argv[1]);
+ return 0;
+ }
#ifndef GST_DISABLE_URI
- feature = gst_registry_pool_find_feature (argv[1],
- GST_TYPE_URI_HANDLER);
- if (feature) {
- g_print ("%s: an uri handler\n", argv[1]);
- return 0;
- }
+ feature = gst_registry_pool_find_feature (argv[1],
+ GST_TYPE_URI_HANDLER);
+ if (feature) {
+ g_print ("%s: an uri handler\n", argv[1]);
+ return 0;
+ }
#endif
}
} else {