X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Fgstpluginfeature.c;h=831236e2b11493a61b4efc4e3440447b3abbbc21;hb=a143d9cb0caee85bbe0c5e8b86e9f05918153c9d;hp=f22f2b48b10f3d90068803dc4104579e449eb408;hpb=d3ffa8263901b7e3a9936235f48b1203838edd0c;p=platform%2Fupstream%2Fgstreamer.git diff --git a/gst/gstpluginfeature.c b/gst/gstpluginfeature.c index f22f2b4..831236e 100644 --- a/gst/gstpluginfeature.c +++ b/gst/gstpluginfeature.c @@ -16,12 +16,13 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /** * SECTION:gstpluginfeature + * @title: GstPluginfeature * @short_description: Base class for contents of a GstPlugin * @see_also: #GstPlugin * @@ -81,7 +82,7 @@ gst_plugin_feature_finalize (GObject * object) * unaffected; use the return value instead. * * Normally this function is used like this: - * |[ + * |[ * GstPluginFeature *loaded_feature; * * loaded_feature = gst_plugin_feature_load (feature); @@ -90,7 +91,8 @@ gst_plugin_feature_finalize (GObject * object) * feature = loaded_feature; * ]| * - * Returns: (transfer full): a reference to the loaded feature, or NULL on error + * Returns: (transfer full) (nullable): a reference to the loaded + * feature, or %NULL on error */ GstPluginFeature * gst_plugin_feature_load (GstPluginFeature * feature) @@ -185,8 +187,9 @@ gst_plugin_feature_get_rank (GstPluginFeature * 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. + * Returns: (transfer full) (nullable): 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) @@ -200,6 +203,29 @@ 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: (nullable): the name of the plugin that provides this + * feature, or %NULL if the feature is not associated with a + * plugin. + * + * Since: 1.2 + */ +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 @@ -285,8 +311,8 @@ gst_plugin_feature_list_debug (GList * list) * Checks whether the given plugin feature is at least * the required version * - * Returns: #TRUE if the plugin feature has at least - * the required version, otherwise #FALSE. + * Returns: %TRUE if the plugin feature has at least + * the required version, otherwise %FALSE. */ gboolean gst_plugin_feature_check_version (GstPluginFeature * feature, @@ -317,15 +343,6 @@ gst_plugin_feature_check_version (GstPluginFeature * feature, GST_DEBUG ("version string '%s' parsed to %d values", ver_str, nscan); if (nscan >= 3) { - /* FIXME 1.0: Remove this before doing the actual 1.0.0 release */ - if ((major == 0 && minor == 11 && micro >= 90) || - (major == 0 && minor == 11 && micro == 89 && nano > 0)) { - major = 1; - minor = 0; - micro = 0; - nano = 0; - } - if (major > min_major) ret = TRUE; else if (major < min_major) @@ -369,7 +386,7 @@ gst_plugin_feature_check_version (GstPluginFeature * feature, * Returns: negative value if the rank of p1 > the rank of p2 or the ranks are * equal but the name of p1 comes before the name of p2; zero if the rank * and names are equal; positive value if the rank of p1 < the rank of p2 or the - * ranks are equal but the name of p2 comes after the name of p1 + * ranks are equal but the name of p2 comes before the name of p1 */ gint gst_plugin_feature_rank_compare_func (gconstpointer p1, gconstpointer p2) @@ -384,7 +401,7 @@ gst_plugin_feature_rank_compare_func (gconstpointer p1, gconstpointer p2) if (diff != 0) return diff; - diff = strcmp (GST_OBJECT_NAME (f2), GST_OBJECT_NAME (f1)); + diff = strcmp (GST_OBJECT_NAME (f1), GST_OBJECT_NAME (f2)); return diff; }