pluginfeature: deprecate gst_plugin_feature_type_name_filter()
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 30 Oct 2011 21:21:59 +0000 (21:21 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 30 Oct 2011 21:47:26 +0000 (21:47 +0000)
It's only used internally anyway and the helper struct
has namespace issues.

API: deprecated gst_plugin_feature_type_name_filter()
API: deprecated GstTypeNameData

gst/gstpluginfeature.c
gst/gstpluginfeature.h
gst/gstregistry.c
tests/check/gst/struct_x86_64.h

index 88adc40959544b214edd9c1f895d509f78a53bdb..acdc621581db0a64254dac8d38156c541d827467 100644 (file)
@@ -156,6 +156,16 @@ not_found:
  *
  * Returns: TRUE if equal.
  */
+#ifndef GST_REMOVE_DEPRECATED
+#ifdef GST_DISABLE_DEPRECATED
+typedef struct
+{
+  const gchar *name;
+  GType type;
+} GstTypeNameData;
+gboolean gst_plugin_feature_type_name_filter (GstPluginFeature * feature,
+    GstTypeNameData * data);
+#endif
 gboolean
 gst_plugin_feature_type_name_filter (GstPluginFeature * feature,
     GstTypeNameData * data)
@@ -166,6 +176,7 @@ gst_plugin_feature_type_name_filter (GstPluginFeature * feature,
       (data->name == NULL
           || !strcmp (data->name, GST_PLUGIN_FEATURE_NAME (feature))));
 }
+#endif /* GST_REMOVE_DEPRECATED */
 
 /**
  * gst_plugin_feature_set_name:
index 11641a4c24dcf5f5994b596b821d62aac25f53cc..835d49b292acd7d1f87ce2473fc801505085a293 100644 (file)
@@ -105,10 +105,12 @@ struct _GstPluginFeatureClass {
  *
  * Structure used for filtering based on @name and @type.
  */
+#ifndef GST_DISABLE_DEPRECATED
 typedef struct {
   const gchar   *name;
   GType          type;
 } GstTypeNameData;
+#endif
 
 /**
  * GstPluginFeatureFilter:
@@ -130,8 +132,10 @@ GType           gst_plugin_feature_get_type             (void);
 GstPluginFeature *
                 gst_plugin_feature_load                 (GstPluginFeature *feature);
 
+#ifndef GST_DISABLE_DEPRECATED
 gboolean        gst_plugin_feature_type_name_filter     (GstPluginFeature *feature,
                                                          GstTypeNameData *data);
+#endif
 
 void            gst_plugin_feature_set_rank             (GstPluginFeature *feature, guint rank);
 void            gst_plugin_feature_set_name             (GstPluginFeature *feature, const gchar *name);
index ddbb78901d8b29b83b3555c5d03519ef0f5a0256..67c09b46605862de4b00fbfc7f842a21df0c83ba 100644 (file)
@@ -642,6 +642,24 @@ gst_registry_plugin_filter (GstRegistry * registry,
   return list;
 }
 
+#ifdef GST_DISABLE_DEPRECATED
+typedef struct
+{
+  const gchar *name;
+  GType type;
+} GstTypeNameData;
+static gboolean
+gst_plugin_feature_type_name_filter (GstPluginFeature * feature,
+    GstTypeNameData * data)
+{
+  g_assert (GST_IS_PLUGIN_FEATURE (feature));
+
+  return ((data->type == 0 || data->type == G_OBJECT_TYPE (feature)) &&
+      (data->name == NULL
+          || !strcmp (data->name, GST_PLUGIN_FEATURE_NAME (feature))));
+}
+#endif
+
 /* returns TRUE if the list was changed
  *
  * Must be called with the object lock taken */
index e03509043597adb12bd4037208da8c1a5aebeab2..e412f5466e162d7b031635070997f7e48f51ec4e 100644 (file)
@@ -77,7 +77,9 @@ static GstCheckABIStruct list[] = {
   {"GstTypeFindFactoryClass", sizeof (GstTypeFindFactoryClass), 304},
   {"GstTypeFindFactory", sizeof (GstTypeFindFactory), 216},
   {"GstTypeFind", sizeof (GstTypeFind), 64},
+#if !defined(GST_DISABLE_DEPRECATED) && !defined(GST_REMOVE_DEPRECATED)
   {"GstTypeNameData", sizeof (GstTypeNameData), 16},
+#endif
   {"GstURIHandlerInterface", sizeof (GstURIHandlerInterface), 88},
   {"GstValueTable", sizeof (GstValueTable), 64},
 #if !defined(GST_DISABLE_LOADSAVE) && !defined(GST_DISABLE_DEPRECATED) && !defined(GST_REMOVE_DEPRECATED)