summaryrefslogtreecommitdiff
path: root/gst/gstpluginfeature.c
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2012-05-19 17:16:35 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2012-05-19 17:16:35 +0100
commitab6171373cd71d7c5e69c6d2a8a4e79f2b50d6e1 (patch)
tree7748766a4aaf5ea77dc6aa7b2d5b799b80717981 /gst/gstpluginfeature.c
parent7ba60c9aa08debdb3d809d4863887589de7185af (diff)
pluginfeature: add gst_plugin_feature_get_plugin()
Add function to retrieve plugin that provides this feature. API: gst_plugin_feature_get_plugin()
Diffstat (limited to 'gst/gstpluginfeature.c')
-rw-r--r--gst/gstpluginfeature.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gst/gstpluginfeature.c b/gst/gstpluginfeature.c
index e61fee269..3e1228e33 100644
--- a/gst/gstpluginfeature.c
+++ b/gst/gstpluginfeature.c
@@ -180,6 +180,26 @@ gst_plugin_feature_get_rank (GstPluginFeature * feature)
}
/**
+ * gst_plugin_feature_get_plugin:
+ * @feature: a feature
+ *
+ * Get the plugin that provides this feature.
+ *
+ * Returns: (transfer full): the plugin that provides this feature, or %NULL.
+ * Unref with gst_object_unref() when no longer needed.
+ */
+GstPlugin *
+gst_plugin_feature_get_plugin (GstPluginFeature * feature)
+{
+ g_return_val_if_fail (GST_IS_PLUGIN_FEATURE (feature), NULL);
+
+ if (feature->plugin == NULL)
+ return NULL;
+
+ return (GstPlugin *) gst_object_ref (feature->plugin);
+}
+
+/**
* gst_plugin_feature_list_free:
* @list: (transfer full) (element-type Gst.PluginFeature): list
* of #GstPluginFeature