pluginfeature: deprecate gst_plugin_feature_type_name_filter()

It's only used internally anyway and the helper struct
has namespace issues.

API: deprecated gst_plugin_feature_type_name_filter()
API: deprecated GstTypeNameData
This commit is contained in:
Tim-Philipp Müller 2011-10-30 21:21:59 +00:00
parent 606c53fc94
commit 19b4c9c793
4 changed files with 35 additions and 0 deletions

View 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:

View 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);

View 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 */

View 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)