From 6ea2e71c48a047e8b931e9f534dad281971c4fbc Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 28 Apr 2011 16:20:22 +0200 Subject: [PATCH] query: fix typo in method name and improve docs Fixed typo in method name and add/improve the docs. --- gst/gstquery.c | 62 ++++++++++++++++++++++++++++++++++++++++--- gst/gstquery.h | 4 +-- win32/common/libgstreamer.def | 2 +- 3 files changed, 62 insertions(+), 6 deletions(-) diff --git a/gst/gstquery.c b/gst/gstquery.c index c630df2..aeca7c0 100644 --- a/gst/gstquery.c +++ b/gst/gstquery.c @@ -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) { diff --git a/gst/gstquery.h b/gst/gstquery.h index e59dc7f..b7d67cd 100644 --- a/gst/gstquery.h +++ b/gst/gstquery.h @@ -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); diff --git a/win32/common/libgstreamer.def b/win32/common/libgstreamer.def index 5556092..1e753a6 100644 --- a/win32/common/libgstreamer.def +++ b/win32/common/libgstreamer.def @@ -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 -- 2.7.4