From 6b835e324f939bed3f06a15b11d454f9d144458f Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Thu, 12 Aug 2004 11:50:31 +0000 Subject: [PATCH] fix origin and package name; make gst-inspect print plugin info for element Original commit message from CVS: fix origin and package name; make gst-inspect print plugin info for element --- ChangeLog | 8 ++++++++ configure.ac | 15 +++++++++++++-- tools/gst-inspect.c | 27 ++++++++++++++++++--------- 3 files changed, 39 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index d598c31c09..81d808777d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-08-12 Thomas Vander Stichele + + * configure.ac: + fix GST_ORIGIN + set GST_PACKAGE to source, and distinguish between release and other + * tools/gst-inspect.c: + print out plugin an element factory is part of so we see this info + 2004-08-12 Thomas Vander Stichele * docs/gst/gstreamer-sections.txt: diff --git a/configure.ac b/configure.ac index 8a2e7ae949..ac86962161 100644 --- a/configure.ac +++ b/configure.ac @@ -515,6 +515,7 @@ dnl ############################ dnl set license and copyright notice AC_DEFINE(GST_LICENSE, "LGPL", [GStreamer license]) + dnl package name in plugins AC_ARG_WITH(package-name, AC_HELP_STRING([--with-package-name],[specify package name to use in plugins]), @@ -523,9 +524,19 @@ AC_HELP_STRING([--with-package-name],[specify package name to use in plugins]), no) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;; *) GST_PACKAGE="${withval}" ;; esac], -[GST_PACKAGE="GStreamer"]) dnl Default value +[ +if test "x$GST_CVS" = "xyes" +then + dnl nano >= 1 + GST_PACKAGE="GStreamer CVS/prerelease" +else + GST_PACKAGE="GStreamer source release" +fi +] +) dnl Default value AC_MSG_NOTICE(Using $GST_PACKAGE as package name) AC_DEFINE_UNQUOTED(GST_PACKAGE, "$GST_PACKAGE", [package name in plugins]) + dnl package origin URL AC_ARG_WITH(package-origin, AC_HELP_STRING([--with-package-origin],[specify package origin URL to use in plugins]), @@ -534,7 +545,7 @@ AC_HELP_STRING([--with-package-origin],[specify package origin URL to use in plu no) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;; *) GST_ORIGIN="${withval}" ;; esac], -[GST_ORIGIN="http://gstreamer.net/"]) dnl Default value +[GST_ORIGIN="http://gstreamer.freedesktop.org/"]) dnl Default value AC_MSG_NOTICE(Using $GST_ORIGIN as package origin) AC_DEFINE_UNQUOTED(GST_ORIGIN, "$GST_ORIGIN", [package origin]) diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index adfec20316..f4124fa3ee 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -205,7 +205,6 @@ print_factory_details_info (GstElementFactory * factory) get_rank_name (GST_PLUGIN_FEATURE (factory)->rank), GST_PLUGIN_FEATURE (factory)->rank); n_print ("\n"); - } static void @@ -943,14 +942,6 @@ print_element_list (gboolean print_all) static void print_plugin_info (GstPlugin * plugin) { - GList *features; - gint num_features = 0; - gint num_elements = 0; - gint num_types = 0; - gint num_schedulers = 0; - gint num_indexes = 0; - gint num_other = 0; - n_print ("Plugin Details:\n"); n_print (" Name:\t\t%s\n", plugin->desc.name); n_print (" Description:\t%s\n", plugin->desc.description); @@ -960,6 +951,18 @@ print_plugin_info (GstPlugin * plugin) n_print (" Package:\t%s\n", plugin->desc.package); n_print (" Origin URL:\t%s\n", plugin->desc.origin); n_print ("\n"); +} + +static void +print_plugin_features (GstPlugin * plugin) +{ + GList *features; + gint num_features = 0; + gint num_elements = 0; + gint num_types = 0; + gint num_schedulers = 0; + gint num_indexes = 0; + gint num_other = 0; features = gst_plugin_get_feature_list (plugin); @@ -1086,6 +1089,11 @@ print_element_info (GstElementFactory * factory, gboolean print_names) _name = ""; print_factory_details_info (factory); + if (GST_PLUGIN_FEATURE (factory)->manager) { + GstPlugin *plugin = (GstPlugin *) GST_PLUGIN_FEATURE (factory)->manager; + + print_plugin_info (plugin); + } print_hierarchy (G_OBJECT_TYPE (element), 0, &maxlevel); @@ -1155,6 +1163,7 @@ main (int argc, char *argv[]) /* if there is such a plugin, print out info */ if (plugin) { print_plugin_info (plugin); + print_plugin_features (plugin); } else { g_print ("No such element or plugin '%s'\n", arg); return -1;