query: fix typo in method name and improve docs
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 28 Apr 2011 14:20:22 +0000 (16:20 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 28 Apr 2011 14:20:22 +0000 (16:20 +0200)
Fixed typo in method name and add/improve the docs.

gst/gstquery.c
gst/gstquery.h
win32/common/libgstreamer.def

index c630df2..aeca7c0 100644 (file)
@@ -1067,7 +1067,7 @@ gst_query_parse_formats_nth (GstQuery * query, guint nth, GstFormat * format)
  * Constructs a new query object for querying the buffering status of
  * a stream.
  *
- * Free-function: gst_query_new
+ * Free-function: gst_query_unref
  *
  * Returns: (transfer full): a new #GstQuery
  *
@@ -1467,9 +1467,19 @@ gst_query_parse_uri (GstQuery * query, gchar ** uri)
             GST_QUARK (URI)));
 }
 
-
+/**
+ * gst_query_new_allocation
+ * @caps: the negotiated caps
+ * @need_pool: return a pool
+ *
+ * Constructs a new query object for querying the allocation properties.
+ *
+ * Free-function: gst_query_unref
+ *
+ * Returns: (transfer full): a new #GstQuery
+ */
 GstQuery *
-gst_query_new_alloction (GstCaps * caps, gboolean need_pool)
+gst_query_new_allocation (GstCaps * caps, gboolean need_pool)
 {
   GstQuery *query;
   GstStructure *structure;
@@ -1488,6 +1498,16 @@ gst_query_new_alloction (GstCaps * caps, gboolean need_pool)
   return query;
 }
 
+/**
+ * gst_query_set_allocation
+ * @query: A valid #GstQuery of type GST_QUERY_ALLOCATION.
+ * @alignment: the alignment
+ * @prefix: the prefix
+ * @size: the size
+ * @pool: the #GstBufferPool
+ *
+ * Set the allocation properties in @query.
+ */
 void
 gst_query_set_allocation (GstQuery * query, guint alignment, guint prefix,
     guint size, GstBufferPool * pool)
@@ -1501,6 +1521,16 @@ gst_query_set_allocation (GstQuery * query, guint alignment, guint prefix,
       GST_QUARK (POOL), GST_TYPE_BUFFER_POOL, pool, NULL);
 }
 
+/**
+ * gst_query_parse_allocation
+ * @query: A valid #GstQuery of type GST_QUERY_ALLOCATION.
+ * @alignment: the alignment
+ * @prefix: the prefix
+ * @size: the size
+ * @pool: the #GstBufferPool
+ *
+ * Get the allocation properties in @query.
+ */
 void
 gst_query_parse_allocation (GstQuery * query, guint * alignment, guint * prefix,
     guint * size, GstBufferPool ** pool)
@@ -1514,6 +1544,13 @@ gst_query_parse_allocation (GstQuery * query, guint * alignment, guint * prefix,
       GST_QUARK (POOL), GST_TYPE_BUFFER_POOL, pool, NULL);
 }
 
+/**
+ * gst_query_add_allocation_meta
+ * @query: a GST_QUERY_ALLOCATION type query #GstQuery
+ * @api: the metadata API
+ *
+ * Add @api as aone of the supported metadata API to @query.
+ */
 void
 gst_query_add_allocation_meta (GstQuery * query, const gchar * api)
 {
@@ -1544,6 +1581,15 @@ gst_query_add_allocation_meta (GstQuery * query, const gchar * api)
   g_value_unset (&api_value);
 }
 
+/**
+ * gst_query_get_n_allocation_meta
+ * @query: a GST_QUERY_ALLOCATION type query #GstQuery
+ *
+ * Retrieve the number of values currently stored in the
+ * meta API array of the query's structure.
+ *
+ * Returns: the metadata API array size as a #guint.
+ */
 guint
 gst_query_get_n_allocation_meta (GstQuery * query)
 {
@@ -1561,6 +1607,16 @@ gst_query_get_n_allocation_meta (GstQuery * query)
   return size;
 }
 
+/**
+ * gst_query_parse_allocation_meta
+ * @query: a GST_QUERY_ALLOCATION type query #GstQuery
+ * @index: position in the metadata API array to read
+ *
+ * Parse an available query and get the metadata API
+ * at @index of the metadata API array.
+ *
+ * Returns: a #gchar of the metadata API at @index.
+ */
 const gchar *
 gst_query_parse_allocation_meta (GstQuery * query, guint index)
 {
index e59dc7f..b7d67cd 100644 (file)
@@ -52,7 +52,7 @@ G_BEGIN_DECLS
  * @GST_QUERY_CUSTOM: a custom application or element defined query. Since
  * 0.10.22.
  * @GST_QUERY_URI: query the URI of the source or sink. Since 0.10.22.
- * @GST_QUERY_TRANSPORT: the buffer allocation properties
+ * @GST_QUERY_ALLOCATION: the buffer allocation properties
  *
  * Standard predefined Query types
  */
@@ -329,7 +329,7 @@ void            gst_query_parse_uri               (GstQuery *query, gchar **uri)
 void            gst_query_set_uri                 (GstQuery *query, const gchar *uri);
 
 /* allocation query */
-GstQuery *      gst_query_new_alloction           (GstCaps *caps, gboolean need_pool);
+GstQuery *      gst_query_new_allocation          (GstCaps *caps, gboolean need_pool);
 
 void            gst_query_set_allocation          (GstQuery *query, guint alignment, guint prefix,
                                                    guint size, GstBufferPool *pool);
index 5556092..1e753a6 100644 (file)
@@ -833,7 +833,7 @@ EXPORTS
        gst_query_get_n_buffering_ranges
        gst_query_get_structure
        gst_query_get_type
-       gst_query_new_alloction
+       gst_query_new_allocation
        gst_query_new_application
        gst_query_new_buffering
        gst_query_new_convert