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,
GList *result;
} FeatureFilterData;
-gboolean
+static gboolean
_feature_filter (GstPlugin *plugin, gpointer user_data)
{
GList *result;
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,
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)
{
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,
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,
#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;
/**
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)
{
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)
{
}
return FALSE;
}
+
/**
* gst_uri_handler_find_by_uri:
* @uri: the uri to find a handler for