pluginfeature: add gst_plugin_feature_get_plugin()

Add function to retrieve plugin that provides this feature.

API: gst_plugin_feature_get_plugin()
This commit is contained in:
Tim-Philipp Müller 2012-05-19 17:16:35 +01:00
parent 7ba60c9aa0
commit ab6171373c
4 changed files with 24 additions and 0 deletions

View file

@ -2043,6 +2043,7 @@ gst_plugin_feature_set_rank
gst_plugin_feature_set_name
gst_plugin_feature_get_rank
gst_plugin_feature_get_name
gst_plugin_feature_get_plugin
gst_plugin_feature_load
gst_plugin_feature_list_copy
gst_plugin_feature_list_free

View file

@ -179,6 +179,26 @@ gst_plugin_feature_get_rank (GstPluginFeature * feature)
return feature->rank;
}
/**
* 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

View file

@ -133,6 +133,8 @@ GstPluginFeature *
void gst_plugin_feature_set_rank (GstPluginFeature *feature, guint rank);
guint gst_plugin_feature_get_rank (GstPluginFeature *feature);
GstPlugin * gst_plugin_feature_get_plugin (GstPluginFeature *feature);
void gst_plugin_feature_list_free (GList *list);
GList *gst_plugin_feature_list_copy (GList *list) G_GNUC_MALLOC;
void gst_plugin_feature_list_debug (GList *list);

View file

@ -749,6 +749,7 @@ EXPORTS
gst_plugin_error_get_type
gst_plugin_error_quark
gst_plugin_feature_check_version
gst_plugin_feature_get_plugin
gst_plugin_feature_get_rank
gst_plugin_feature_get_type
gst_plugin_feature_list_copy