plugin: remove gst_plugin_name_filter

It's only used internally, most other users will likely
want to use gst_registry_find_plugin() directly instead
(and if not, they can easily walk the list and doing the
strcmp themselves).
This commit is contained in:
Tim-Philipp Müller 2012-04-29 18:35:11 +01:00
parent c7eca5ca15
commit 4889fd6b6f
5 changed files with 7 additions and 23 deletions

View file

@ -1998,7 +1998,6 @@ gst_plugin_get_release_date_string
gst_plugin_is_loaded
gst_plugin_get_cache_data
gst_plugin_set_cache_data
gst_plugin_name_filter
gst_plugin_load_file
gst_plugin_load
gst_plugin_load_by_name

View file

@ -1159,25 +1159,7 @@ gst_plugin_list_feature_filter (GList * list,
return data.result;
}
#endif
/**
* gst_plugin_name_filter:
* @plugin: the plugin to check
* @name: the name of the plugin
*
* A standard filter that returns TRUE when the plugin is of the
* given name.
*
* Returns: TRUE if the plugin is of the given name.
*/
gboolean
gst_plugin_name_filter (GstPlugin * plugin, const gchar * name)
{
return (plugin->desc.name && !strcmp (plugin->desc.name, name));
}
#if 0
/**
* gst_plugin_find_feature:
* @plugin: plugin to get the feature from

View file

@ -298,8 +298,6 @@ void gst_plugin_set_cache_data (GstPlugin * plugin, GstStructure *cache_data);
gboolean gst_plugin_is_loaded (GstPlugin *plugin);
gboolean gst_plugin_name_filter (GstPlugin *plugin, const gchar *name);
GstPlugin * gst_plugin_load_file (const gchar *filename, GError** error);
GstPlugin * gst_plugin_load (GstPlugin *plugin);

View file

@ -816,6 +816,12 @@ gst_registry_feature_filter (GstRegistry * registry,
return list;
}
static gboolean
gst_registry_plugin_name_filter (GstPlugin * plugin, const gchar * name)
{
return (plugin->desc.name && !strcmp (plugin->desc.name, name));
}
/**
* gst_registry_find_plugin:
* @registry: the registry to search
@ -839,7 +845,7 @@ gst_registry_find_plugin (GstRegistry * registry, const gchar * name)
g_return_val_if_fail (name != NULL, NULL);
walk = gst_registry_plugin_filter (registry,
(GstPluginFilter) gst_plugin_name_filter, TRUE, (gpointer) name);
(GstPluginFilter) gst_registry_plugin_name_filter, TRUE, (gpointer) name);
if (walk) {
result = GST_PLUGIN_CAST (walk->data);

View file

@ -773,7 +773,6 @@ EXPORTS
gst_plugin_load
gst_plugin_load_by_name
gst_plugin_load_file
gst_plugin_name_filter
gst_plugin_register_static
gst_plugin_register_static_full
gst_plugin_set_cache_data