]> git.pld-linux.org Git - packages/gstreamer.git/blobdiff - gstreamer-inspect-rpm-format.patch
- made _libexecdir aware; release 2
[packages/gstreamer.git] / gstreamer-inspect-rpm-format.patch
index 7d3e5ef201284f045bf0a6cf108f4b6605241ae7..309b37f7a044e0c849215a9de2f79df30d408a31 100644 (file)
@@ -1,17 +1,7 @@
-From 3f3f59c66d5eaf0efd32b8d6dabb7895cba5dda6 Mon Sep 17 00:00:00 2001
-From: Bastien Nocera <hadess@hadess.net>
-Date: Wed, 11 Nov 2009 13:53:46 +0000
-Subject: [PATCH] Add RPM provides output to gst-inspect
-
----
- tools/gst-inspect.c |  272 ++++++++++++++++++++++++++++++++++++++++++++++++---
- 1 files changed, 257 insertions(+), 15 deletions(-)
-
-diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c
-index b2502f4..dfd2eb4 100644
---- a/tools/gst-inspect.c
-+++ b/tools/gst-inspect.c
-@@ -1308,9 +1308,225 @@ print_element_info (GstElementFactory * factory, gboolean print_names)
+diff -urp gstreamer-0.11.94.orig/tools/gst-inspect.c gstreamer-0.11.94/tools/gst-inspect.c
+--- gstreamer-0.11.94.orig/tools/gst-inspect.c 2012-09-01 18:02:10.000000000 -0400
++++ gstreamer-0.11.94/tools/gst-inspect.c      2012-09-14 08:04:52.690369047 -0400
+@@ -1350,9 +1350,225 @@ print_element_info (GstElementFactory *
    return 0;
  }
  
@@ -26,9 +16,8 @@ index b2502f4..dfd2eb4 100644
 +    g_string_append (s->data, field);
 +  }
 +}
- static void
--print_plugin_automatic_install_info_codecs (GstElementFactory * factory)
++
++static void
 +print_gst_structure_append_field_index (GList * strings, const char *field,
 +    guint num_items, guint offset)
 +{
@@ -135,8 +124,8 @@ index b2502f4..dfd2eb4 100644
 +  }
 +
 +  /* Example:
-+   * gstreamer0.10(decoder-video/mpeg)(mpegversion=1)()(64bit) */
-+  string = g_string_new ("gstreamer0.10");
++   * gstreamer1(decoder-video/mpeg)(mpegversion=1)()(64bit) */
++  string = g_string_new ("gstreamer1");
 +  g_string_append_c (string, '(');
 +  g_string_append (string, type_name);
 +  g_string_append_c (string, '-');
@@ -231,27 +220,28 @@ index b2502f4..dfd2eb4 100644
 +  }
 +  g_list_free (strings);
 +}
-+
-+static void
+ static void
+-print_plugin_automatic_install_info_codecs (GstElementFactory * factory)
 +print_plugin_automatic_install_info_codecs (GstElementFactory * factory,
 +    gboolean rpm_format)
  {
    GstPadDirection direction;
    const gchar *type_name;
-@@ -1335,6 +1551,12 @@ print_plugin_automatic_install_info_codecs (GstElementFactory * factory)
+@@ -1377,6 +1593,12 @@ print_plugin_automatic_install_info_code
      return;
    }
  
 +  if (rpm_format) {
 +    /* Ignore NONE ranked plugins */
-+    if (GST_PLUGIN_FEATURE (factory)->rank == GST_RANK_NONE)
++      if ((gst_plugin_feature_get_rank (GST_PLUGIN_FEATURE (factory))) == GST_RANK_NONE)
 +      return;
 +  }
 +
    /* decoder/demuxer sink pads should always be static and there should only
     * be one, the same applies to encoders/muxers and source pads */
    static_templates = gst_element_factory_get_static_pad_templates (factory);
-@@ -1371,15 +1593,20 @@ print_plugin_automatic_install_info_codecs (GstElementFactory * factory)
+@@ -1413,15 +1635,20 @@ print_plugin_automatic_install_info_code
      gst_structure_remove_field (s, "rate");
      gst_structure_remove_field (s, "depth");
      gst_structure_remove_field (s, "clock-rate");
@@ -274,44 +264,49 @@ index b2502f4..dfd2eb4 100644
 +print_plugin_automatic_install_info_protocols (GstElementFactory * factory,
 +    gboolean rpm_format)
  {
-   gchar **protocols, **p;
+   const gchar *const *protocols;
  
-@@ -1388,11 +1615,17 @@ print_plugin_automatic_install_info_protocols (GstElementFactory * factory)
+@@ -1430,13 +1657,19 @@ print_plugin_automatic_install_info_prot
      switch (gst_element_factory_get_uri_type (factory)) {
        case GST_URI_SINK:
-         for (p = protocols; *p != NULL; ++p)
--          g_print ("urisink-%s\n", *p);
+         while (*protocols != NULL) {
+-          g_print ("urisink-%s\n", *protocols);
 +          if (!rpm_format)
-+            g_print ("urisink-%s\n", *p);
++            g_print ("urisink-%s\n", *protocols);
 +          else
-+            g_print ("gstreamer0.10(urisink-%s)\n", *p);
++            g_print ("gstreamer1(urisink-%s)\n", *protocols);
+           ++protocols;
+         }
          break;
        case GST_URI_SRC:
-         for (p = protocols; *p != NULL; ++p)
--          g_print ("urisource-%s\n", *p);
+         while (*protocols != NULL) {
+-          g_print ("urisource-%s\n", *protocols);
 +          if (!rpm_format)
-+            g_print ("urisource-%s\n", *p);
++            g_print ("urisource-%s\n", *protocols);
 +          else
-+            g_print ("gstreamer0.10(urisource-%s)\n", *p);
-         break;
-       default:
++            g_print ("gstreamer1(urisource-%s)\n", *protocols);
+           ++protocols;
+         }
          break;
-@@ -1402,7 +1635,7 @@ print_plugin_automatic_install_info_protocols (GstElementFactory * factory)
+@@ -1447,7 +1680,7 @@ print_plugin_automatic_install_info_prot
  }
  
  static void
 -print_plugin_automatic_install_info (GstPlugin * plugin)
 +print_plugin_automatic_install_info (GstPlugin * plugin, gboolean rpm_format)
  {
-   const gchar *plugin_name;
    GList *features, *l;
-@@ -1422,11 +1655,12 @@ print_plugin_automatic_install_info (GstPlugin * plugin)
-     if (g_str_equal (plugin_name, feature->plugin_name)) {
+@@ -1466,11 +1699,15 @@ print_plugin_automatic_install_info (Gst
+     if (feature_plugin == plugin) {
        GstElementFactory *factory;
  
 -      g_print ("element-%s\n", gst_plugin_feature_get_name (feature));
 +      if (!rpm_format)
 +        g_print ("element-%s\n", gst_plugin_feature_get_name (feature));
++      else
++        g_print ("gstreamer1(element-%s)\n",
++            gst_plugin_feature_get_name (feature));
  
        factory = GST_ELEMENT_FACTORY (feature);
 -      print_plugin_automatic_install_info_protocols (factory);
@@ -319,9 +314,9 @@ index b2502f4..dfd2eb4 100644
 +      print_plugin_automatic_install_info_protocols (factory, rpm_format);
 +      print_plugin_automatic_install_info_codecs (factory, rpm_format);
      }
-   }
-@@ -1446,7 +1680,7 @@ print_all_plugin_automatic_install_info (void)
+     if (feature_plugin)
+       gst_object_unref (feature_plugin);
+@@ -1492,7 +1729,7 @@ print_all_plugin_automatic_install_info
      plugin = (GstPlugin *) (plugins->data);
      plugins = g_list_next (plugins);
  
@@ -330,15 +325,15 @@ index b2502f4..dfd2eb4 100644
    }
    gst_plugin_list_free (orig_plugins);
  }
-@@ -1458,6 +1692,7 @@ main (int argc, char *argv[])
+@@ -1504,6 +1741,7 @@ main (int argc, char *argv[])
    gboolean do_print_blacklist = FALSE;
    gboolean plugin_name = FALSE;
    gboolean print_aii = FALSE;
 +  gboolean print_aii_rpm = FALSE;
    gboolean uri_handlers = FALSE;
- #ifndef GST_DISABLE_OPTION_PARSING
-   GOptionEntry options[] = {
-@@ -1470,6 +1705,9 @@ main (int argc, char *argv[])
+   gboolean check_exists = FALSE;
+   gchar *min_version = NULL;
+@@ -1521,6 +1759,9 @@ main (int argc, char *argv[])
                "or all plugins provide.\n                                       "
                "Useful in connection with external automatic plugin "
                "installation mechanisms"), NULL},
@@ -347,8 +342,8 @@ index b2502f4..dfd2eb4 100644
 +              "Provides compatible-format"), NULL},
      {"plugin", '\0', 0, G_OPTION_ARG_NONE, &plugin_name,
          N_("List the plugin contents"), NULL},
-     {"uri-handlers", 'u', 0, G_OPTION_ARG_NONE, &uri_handlers,
-@@ -1557,7 +1795,7 @@ main (int argc, char *argv[])
+     {"exists", '\0', 0, G_OPTION_ARG_NONE, &check_exists,
+@@ -1650,7 +1891,7 @@ main (int argc, char *argv[])
        /* if there is such a plugin, print out info */
        if (plugin) {
          if (print_aii) {
@@ -357,7 +352,7 @@ index b2502f4..dfd2eb4 100644
          } else {
            print_plugin_info (plugin);
            print_plugin_features (plugin);
-@@ -1570,13 +1808,17 @@ main (int argc, char *argv[])
+@@ -1663,13 +1904,17 @@ main (int argc, char *argv[])
  
            if (plugin) {
              if (print_aii) {
@@ -368,15 +363,12 @@ index b2502f4..dfd2eb4 100644
                print_plugin_features (plugin);
              }
            } else {
--            g_print (_("Could not load plugin file: %s\n"), error->message);
+-            g_printerr (_("Could not load plugin file: %s\n"), error->message);
 +            if (!print_aii_rpm)
 +              g_print (_("Could not load plugin file: %s\n"), error->message);
 +            else
 +              g_printerr (_("Could not load plugin file: %s\n"),
 +                  error->message);
-             g_error_free (error);
+             g_clear_error (&error);
              return -1;
            }
--- 
-1.6.5.2
-
This page took 0.085032 seconds and 4 git commands to generate.