From: Tim-Philipp Müller Date: Sat, 19 May 2012 16:16:35 +0000 (+0100) Subject: pluginfeature: add gst_plugin_feature_get_plugin() X-Git-Tag: RELEASE-0.11.92~82 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab6171373cd71d7c5e69c6d2a8a4e79f2b50d6e1;hp=7ba60c9aa08debdb3d809d4863887589de7185af;p=platform%2Fupstream%2Fgstreamer.git pluginfeature: add gst_plugin_feature_get_plugin() Add function to retrieve plugin that provides this feature. API: gst_plugin_feature_get_plugin() --- diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index 2d3de81..524ad42 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -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 diff --git a/gst/gstpluginfeature.c b/gst/gstpluginfeature.c index e61fee2..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 diff --git a/gst/gstpluginfeature.h b/gst/gstpluginfeature.h index b99d9ee..c3f212c 100644 --- a/gst/gstpluginfeature.h +++ b/gst/gstpluginfeature.h @@ -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); diff --git a/win32/common/libgstreamer.def b/win32/common/libgstreamer.def index 3a510b5..e6753bf 100644 --- a/win32/common/libgstreamer.def +++ b/win32/common/libgstreamer.def @@ -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