pluginfeature: add gst_plugin_feature_get_plugin_name()
authorTim-Philipp Müller <tim@centricular.net>
Sun, 28 Oct 2012 15:53:19 +0000 (15:53 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Sun, 28 Oct 2012 15:53:19 +0000 (15:53 +0000)
API: gst_plugin_feature_get_plugin_name()

https://bugzilla.gnome.org/show_bug.cgi?id=571832

docs/gst/gstreamer-sections.txt
gst/gstpluginfeature.c
gst/gstpluginfeature.h
win32/common/libgstreamer.def

index 26070dd..60b01e4 100644 (file)
@@ -2087,6 +2087,7 @@ gst_plugin_feature_set_name
 gst_plugin_feature_get_rank
 gst_plugin_feature_get_name
 gst_plugin_feature_get_plugin
+gst_plugin_feature_get_plugin_name
 gst_plugin_feature_load
 gst_plugin_feature_list_copy
 gst_plugin_feature_list_free
index 1fda31c..a436237 100644 (file)
@@ -200,6 +200,28 @@ gst_plugin_feature_get_plugin (GstPluginFeature * feature)
 }
 
 /**
+ * gst_plugin_feature_get_plugin_name:
+ * @feature: a feature
+ *
+ * Get the name of the plugin that provides this feature.
+ *
+ * Returns: the name of the plugin that provides this feature, or %NULL if
+ *     the feature is not associated with a plugin.
+ *
+ * Since: 1.2.0
+ */
+const gchar *
+gst_plugin_feature_get_plugin_name (GstPluginFeature * feature)
+{
+  g_return_val_if_fail (GST_IS_PLUGIN_FEATURE (feature), NULL);
+
+  if (feature->plugin == NULL)
+    return NULL;
+
+  return gst_plugin_get_name (feature->plugin);
+}
+
+/**
  * gst_plugin_feature_list_free:
  * @list: (transfer full) (element-type Gst.PluginFeature): list
  *     of #GstPluginFeature
index 69ba44d..586f0eb 100644 (file)
@@ -113,6 +113,7 @@ void            gst_plugin_feature_set_rank             (GstPluginFeature *featu
 guint           gst_plugin_feature_get_rank             (GstPluginFeature *feature);
 
 GstPlugin     * gst_plugin_feature_get_plugin           (GstPluginFeature *feature);
+const gchar   * gst_plugin_feature_get_plugin_name      (GstPluginFeature *feature);
 
 void            gst_plugin_feature_list_free            (GList *list);
 GList          *gst_plugin_feature_list_copy            (GList *list) G_GNUC_MALLOC;
index 4e5fcdb..acb9138 100644 (file)
@@ -784,6 +784,7 @@ EXPORTS
        gst_plugin_error_quark
        gst_plugin_feature_check_version
        gst_plugin_feature_get_plugin
+       gst_plugin_feature_get_plugin_name
        gst_plugin_feature_get_rank
        gst_plugin_feature_get_type
        gst_plugin_feature_list_copy