X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=gst%2Fgstpluginfeature.c;h=3e1228e332f9736ee3f1a5584c11f79525248811;hb=066b515985897495cae32fca5b7eeeec260c40c9;hp=5b86fd30275034ede0f45caec2f3bff29cc96662;hpb=1d052f0ccef9872a2d7c82e4286298f34df13b95;p=platform%2Fupstream%2Fgstreamer.git diff --git a/gst/gstpluginfeature.c b/gst/gstpluginfeature.c index 5b86fd3..3e1228e 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 @@ -221,7 +241,7 @@ gst_plugin_feature_list_copy (GList * list) GList *last; new_list = g_list_alloc (); - new_list->data = g_object_ref ((GObject *) list->data); + new_list->data = gst_object_ref (list->data); new_list->prev = NULL; last = new_list; list = list->next; @@ -229,7 +249,7 @@ gst_plugin_feature_list_copy (GList * list) last->next = g_list_alloc (); last->next->prev = last; last = last->next; - last->data = g_object_ref ((GObject *) list->data); + last->data = gst_object_ref (list->data); list = list->next; } last->next = NULL;