Documentation updates
authorWim Taymans <wim.taymans@gmail.com>
Tue, 6 May 2003 22:10:29 +0000 (22:10 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Tue, 6 May 2003 22:10:29 +0000 (22:10 +0000)
Original commit message from CVS:
Documentation updates

gst/gstplugin.c
gst/gstregistry.c
gst/gstregistrypool.c
gst/gsturi.c

index 9401b66..5795727 100644 (file)
@@ -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)
 {
index 453a19c..71289a2 100644 (file)
@@ -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,
index ea9f33a..ca9e951 100644 (file)
 #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)
 {
index b0ac135..82dd771 100644 (file)
@@ -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