#include <locale.h>
#include <glib/gprintf.h>
+/* FIXME: shouldn't have to access private API */
+#include "gst/gst_private.h"
+
static char *_name = NULL;
static int print_element_info (GstElementFactory * factory,
for (cur = plugins; cur != NULL; cur = g_list_next (cur)) {
GstPlugin *plugin = (GstPlugin *) (cur->data);
if (plugin->flags & GST_PLUGIN_FLAG_BLACKLISTED) {
- g_print (" %s\n", plugin->desc.name);
+ g_print (" %s\n", gst_plugin_get_name (plugin));
count++;
}
}
orig_features = features =
gst_registry_get_feature_list_by_plugin (gst_registry_get (),
- plugin->desc.name);
+ gst_plugin_get_name (plugin));
while (features) {
GstPluginFeature *feature;
if (print_all)
print_element_info (factory, TRUE);
else
- g_print ("%s: %s: %s\n", plugin->desc.name,
+ g_print ("%s: %s: %s\n", gst_plugin_get_name (plugin),
GST_OBJECT_NAME (factory),
gst_element_factory_get_longname (factory));
#if 0
factory = GST_TYPE_FIND_FACTORY (feature);
if (!print_all)
- g_print ("%s: %s: ", plugin->desc.name,
+ g_print ("%s: %s: ", gst_plugin_get_name (plugin),
gst_plugin_feature_get_name (feature));
if (factory->extensions) {
guint i = 0;
}
} else {
if (!print_all)
- n_print ("%s: %s (%s)\n", plugin->desc.name,
+ n_print ("%s: %s (%s)\n", gst_plugin_get_name (plugin),
GST_OBJECT_NAME (feature), g_type_name (G_OBJECT_TYPE (feature)));
}
features =
gst_registry_get_feature_list_by_plugin (gst_registry_get (),
- plugin->desc.name);
+ gst_plugin_get_name (plugin));
for (f = features; f; f = f->next) {
GstPluginFeature *feature = GST_PLUGIN_FEATURE (f->data);
factory = GST_ELEMENT_FACTORY (gst_plugin_feature_load (feature));
if (!factory) {
- g_print ("element plugin %s couldn't be loaded\n", plugin->desc.name);
+ g_print ("element plugin %s couldn't be loaded\n",
+ gst_plugin_get_name (plugin));
continue;
}
static void
print_plugin_info (GstPlugin * plugin)
{
+ const gchar *release_date = gst_plugin_get_release_date_string (plugin);
+ const gchar *filename = gst_plugin_get_filename (plugin);
+
n_print ("Plugin Details:\n");
- n_print (" Name:\t\t\t%s\n", plugin->desc.name);
- n_print (" Description:\t\t%s\n", plugin->desc.description);
- n_print (" Filename:\t\t%s\n",
- plugin->filename ? plugin->filename : "(null)");
- n_print (" Version:\t\t%s\n", plugin->desc.version);
- n_print (" License:\t\t%s\n", plugin->desc.license);
- n_print (" Source module:\t%s\n", plugin->desc.source);
- if (plugin->desc.release_datetime != NULL) {
+ n_print (" Name:\t\t\t%s\n", gst_plugin_get_name (plugin));
+ n_print (" Description:\t\t%s\n", gst_plugin_get_description (plugin));
+ n_print (" Filename:\t\t%s\n", (filename != NULL) ? filename : "(null)");
+ n_print (" Version:\t\t%s\n", gst_plugin_get_version (plugin));
+ n_print (" License:\t\t%s\n", gst_plugin_get_license (plugin));
+ n_print (" Source module:\t%s\n", gst_plugin_get_source (plugin));
+
+ if (release_date != NULL) {
const gchar *tz = "(UTC)";
gchar *str, *sep;
/* may be: YYYY-MM-DD or YYYY-MM-DDTHH:MMZ */
/* YYYY-MM-DDTHH:MMZ => YYYY-MM-DD HH:MM (UTC) */
- str = g_strdup (plugin->desc.release_datetime);
+ str = g_strdup (release_date);
sep = strstr (str, "T");
if (sep != NULL) {
*sep = ' ';
n_print (" Source release date:\t%s%s\n", str, tz);
g_free (str);
}
- n_print (" Binary package:\t%s\n", plugin->desc.package);
- n_print (" Origin URL:\t\t%s\n", plugin->desc.origin);
+ n_print (" Binary package:\t%s\n", gst_plugin_get_package (plugin));
+ n_print (" Origin URL:\t\t%s\n", gst_plugin_get_origin (plugin));
n_print ("\n");
}
origlist = features =
gst_registry_get_feature_list_by_plugin (gst_registry_get (),
- plugin->desc.name);
+ gst_plugin_get_name (plugin));
while (features) {
GstPluginFeature *feature;
if (factory->extensions) {
guint i = 0;
- g_print ("%s: %s: ", plugin->desc.name,
+ g_print ("%s: %s: ", gst_plugin_get_name (plugin),
gst_plugin_feature_get_name (feature));
while (factory->extensions[i]) {
g_print ("%s%s", i > 0 ? ", " : "", factory->extensions[i]);
}
g_print ("\n");
} else
- g_print ("%s: %s: no extensions\n", plugin->desc.name,
+ g_print ("%s: %s: no extensions\n", gst_plugin_get_name (plugin),
gst_plugin_feature_get_name (feature));
num_typefinders++;