# include "config.h"
#endif
-/* FIXME 0.11: suppress warnings for deprecated API such as GValueArray
+/* FIXME 2.0: suppress warnings for deprecated API such as GValueArray
* with newer GLib versions (>= 2.31.0) */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#define KNOWN_PARAM_FLAGS \
(G_PARAM_CONSTRUCT | G_PARAM_CONSTRUCT_ONLY | \
G_PARAM_LAX_VALIDATION | G_PARAM_STATIC_STRINGS | \
- G_PARAM_READABLE | G_PARAM_WRITABLE | GST_PARAM_CONTROLLABLE | \
- GST_PARAM_MUTABLE_PLAYING | GST_PARAM_MUTABLE_PAUSED | \
- GST_PARAM_MUTABLE_READY)
+ G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_DEPRECATED | \
+ GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING | \
+ GST_PARAM_MUTABLE_PAUSED | GST_PARAM_MUTABLE_READY)
static void
print_element_properties_info (GstElement * element)
g_print ("%s%s", (first_flag) ? "" : ", ", _("writable"));
first_flag = FALSE;
}
+ if (param->flags & G_PARAM_DEPRECATED) {
+ g_print ("%s%s", (first_flag) ? "" : ", ", _("deprecated"));
+ first_flag = FALSE;
+ }
if (param->flags & GST_PARAM_CONTROLLABLE) {
g_print (", %s", _("controllable"));
first_flag = FALSE;
name = gst_pad_get_name (pad);
if (gst_pad_get_direction (pad) == GST_PAD_SRC)
- g_print (" SRC: '%s'", name);
+ n_print (" SRC: '%s'\n", name);
else if (gst_pad_get_direction (pad) == GST_PAD_SINK)
- g_print (" SINK: '%s'", name);
+ n_print (" SINK: '%s'\n", name);
else
- g_print (" UNKNOWN!!!: '%s'", name);
+ n_print (" UNKNOWN!!!: '%s'\n", name);
g_free (name);
- g_print ("\n");
-
- n_print (" Implementation:\n");
- if (pad->chainfunc)
- n_print (" Has chainfunc(): %s\n",
- GST_DEBUG_FUNCPTR_NAME (pad->chainfunc));
- if (pad->getrangefunc)
- n_print (" Has getrangefunc(): %s\n",
- GST_DEBUG_FUNCPTR_NAME (pad->getrangefunc));
- if (pad->eventfunc != gst_pad_event_default)
- n_print (" Has custom eventfunc(): %s\n",
- GST_DEBUG_FUNCPTR_NAME (pad->eventfunc));
- if (pad->queryfunc != gst_pad_query_default)
- n_print (" Has custom queryfunc(): %s\n",
- GST_DEBUG_FUNCPTR_NAME (pad->queryfunc));
-
- if (pad->iterintlinkfunc != gst_pad_iterate_internal_links_default)
- n_print (" Has custom iterintlinkfunc(): %s\n",
- GST_DEBUG_FUNCPTR_NAME (pad->iterintlinkfunc));
-
if (pad->padtemplate)
n_print (" Pad Template: '%s'\n", pad->padtemplate->name_template);
}
static void
+print_preset_list (GstElement * element)
+{
+ gchar **presets, **preset;
+
+ if (!GST_IS_PRESET (element))
+ return;
+
+ presets = gst_preset_get_preset_names (GST_PRESET (element));
+ if (presets && *presets) {
+ n_print ("\n");
+ n_print ("Presets:\n");
+ for (preset = presets; *preset; preset++) {
+ n_print (" \"%s\"\n", *preset);
+ }
+ g_strfreev (presets);
+ }
+}
+
+static void
print_blacklist (void)
{
GList *plugins, *cur;
GList *features, *origlist;
gint num_features = 0;
gint num_elements = 0;
+ gint num_tracers = 0;
gint num_typefinders = 0;
gint num_devproviders = 0;
gint num_other = 0;
gst_device_provider_factory_get_metadata (factory,
GST_ELEMENT_METADATA_LONGNAME));
num_devproviders++;
+ } else if (GST_IS_TRACER_FACTORY (feature)) {
+ n_print (" %s (%s)\n", gst_object_get_name (GST_OBJECT (feature)),
+ g_type_name (G_OBJECT_TYPE (feature)));
+ num_tracers++;
} else if (feature) {
n_print (" %s (%s)\n", gst_object_get_name (GST_OBJECT (feature)),
g_type_name (G_OBJECT_TYPE (feature)));
n_print (" +-- %d typefinders\n", num_typefinders);
if (num_devproviders > 0)
n_print (" +-- %d device providers\n", num_devproviders);
+ if (num_tracers > 0)
+ n_print (" +-- %d tracers\n", num_tracers);
if (num_other > 0)
n_print (" +-- %d other objects\n", num_other);
n_print ("%s: a typefind function\n", element_name);
return 0;
}
+ feature = gst_registry_find_feature (gst_registry_get (), element_name,
+ GST_TYPE_TRACER_FACTORY);
+ if (feature) {
+ n_print ("%s: a tracer module\n", element_name);
+ return 0;
+ }
return -1;
}
print_element_properties_info (element);
print_signal_info (element);
print_children_info (element);
+ print_preset_list (element);
gst_object_unref (element);
gst_object_unref (factory);
g_option_context_add_group (ctx, gst_init_get_option_group ());
if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
g_printerr ("Error initializing: %s\n", err->message);
+ g_clear_error (&err);
+ g_option_context_free (ctx);
return -1;
}
g_option_context_free (ctx);
}
} else {
g_printerr (_("Could not load plugin file: %s\n"), error->message);
- g_error_free (error);
+ g_clear_error (&error);
return -1;
}
} else {