diff --git a/gst/gstplugin.c b/gst/gstplugin.c index 9401b665dc..5795727745 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -345,6 +345,19 @@ gst_plugin_is_loaded (GstPlugin *plugin) return (plugin->module != NULL); } +/** + * gst_plugin_feature_list: + * @plugin: plugin to query + * @filter: the filter to use + * @first: only return first match + * @user_data: user data passed to the filter function + * + * Runs a filter against all plugin features and returns a GList with + * the results. If the first flag is set, only the first match is + * returned (as a list with a single object). + * + * Returns: a GList of features, g_list_free after use. + */ GList* gst_plugin_feature_filter (GstPlugin *plugin, GstPluginFeatureFilter filter, @@ -362,7 +375,7 @@ typedef struct GList *result; } FeatureFilterData; -gboolean +static gboolean _feature_filter (GstPlugin *plugin, gpointer user_data) { GList *result; @@ -376,6 +389,20 @@ _feature_filter (GstPlugin *plugin, gpointer user_data) return FALSE; } +/** + * gst_plugin_list_feature_list: + * @list: a list of plugins to query + * @filter: the filter to use + * @first: only return first match + * @user_data: user data passed to the filter function + * + * Runs a filter against all plugin features of the plugins in the given + * list and returns a GList with the results. + * If the first flag is set, only the first match is + * returned (as a list with a single object). + * + * Returns: a GList of features, g_list_free after use. + */ GList* gst_plugin_list_feature_filter (GList *list, GstPluginFeatureFilter filter, @@ -396,7 +423,16 @@ gst_plugin_list_feature_filter (GList *list, return data.result; } - +/** + * gst_plugin_name_filter: + * @plugin: the plugin to check + * @name: the name of the plugin + * + * A standard filterthat 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) { diff --git a/gst/gstregistry.c b/gst/gstregistry.c index 453a19cdb8..71289a2cef 100644 --- a/gst/gstregistry.c +++ b/gst/gstregistry.c @@ -299,6 +299,19 @@ gst_registry_remove_plugin (GstRegistry *registry, GstPlugin *plugin) registry->plugins = g_list_remove (registry->plugins, plugin); } +/** + * gst_registry_plugin_filter: + * @registry: registry to query + * @filter: the filter to use + * @first: only return first match + * @user_data: user data passed to the filter function + * + * Runs a filter against all plugins in the registry and returns a GList with + * the results. If the first flag is set, only the first match is + * returned (as a list with a single object). + * + * Returns: a GList of plugins, g_list_free after use. + */ GList* gst_registry_plugin_filter (GstRegistry *registry, GstPluginFilter filter, @@ -310,6 +323,20 @@ gst_registry_plugin_filter (GstRegistry *registry, return gst_filter_run (registry->plugins, (GstFilterFunc) filter, first, user_data); } +/** + * gst_registry_feature_filter: + * @registry: registry to query + * @filter: the filter to use + * @first: only return first match + * @user_data: user data passed to the filter function + * + * Runs a filter against all features of the plugins in the registry + * and returns a GList with the results. + * If the first flag is set, only the first match is + * returned (as a list with a single object). + * + * Returns: a GList of plugin features, g_list_free after use. + */ GList* gst_registry_feature_filter (GstRegistry *registry, GstPluginFeatureFilter filter, diff --git a/gst/gstregistrypool.c b/gst/gstregistrypool.c index ea9f33a78a..ca9e951944 100644 --- a/gst/gstregistrypool.c +++ b/gst/gstregistrypool.c @@ -27,7 +27,10 @@ #include "gstlog.h" #include "gstfilter.h" +/* list of registries in the pool */ static GList *_gst_registry_pool = NULL; +/* list of plugins without a registry, like statically linked + * plugins */ static GList *_gst_registry_pool_plugins = NULL; /** @@ -132,6 +135,18 @@ gst_registry_pool_plugin_list (void) return gst_registry_pool_plugin_filter (NULL, FALSE, NULL); } +/** + * gst_registry_pool_plugin_filter: + * @filter: the filter to use + * @first: only return first match + * @user_data: user data passed to the filter function + * + * Runs a filter against all plugins in all registries and returns a GList with + * the results. If the first flag is set, only the first match is + * returned (as a list with a single object). + * + * Returns: a GList of plugins, g_list_free after use. + */ GList* gst_registry_pool_plugin_filter (GstPluginFilter filter, gboolean first, gpointer user_data) { diff --git a/gst/gsturi.c b/gst/gsturi.c index b0ac13520a..82dd7718fd 100644 --- a/gst/gsturi.c +++ b/gst/gsturi.c @@ -157,6 +157,16 @@ g_str_has_prefix_glib22 (gchar *haystack, gchar *needle) return FALSE; } +/** + * gst_uri_handler_uri_filter: + * @feature: the feature to inspect + * @uri: the name of the uri to match + * + * Check if the given pluginfeature is a uri hanler and that + * it can handle the given uri. + * + * Returns: TRUE if the feature can handle the uri. + */ gboolean gst_uri_handler_uri_filter (GstPluginFeature *feature, const gchar *uri) { @@ -169,6 +179,7 @@ gst_uri_handler_uri_filter (GstPluginFeature *feature, const gchar *uri) } return FALSE; } + /** * gst_uri_handler_find_by_uri: * @uri: the uri to find a handler for