mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-02 08:42:32 +00:00
query: fix parsing of the ALLOCATION query
Add methods for parsing the caps and the need_pool boolean.
This commit is contained in:
parent
6ea2e71c48
commit
ccfaa53fb2
3 changed files with 24 additions and 11 deletions
|
@ -1498,19 +1498,30 @@ gst_query_new_allocation (GstCaps * caps, gboolean need_pool)
|
|||
return query;
|
||||
}
|
||||
|
||||
void
|
||||
gst_query_parse_allocation (GstQuery * query, GstCaps ** caps,
|
||||
gboolean * need_pool)
|
||||
{
|
||||
g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_ALLOCATION);
|
||||
|
||||
gst_structure_id_get (query->structure,
|
||||
GST_QUARK (CAPS), GST_TYPE_CAPS, caps,
|
||||
GST_QUARK (NEED_POOL), G_TYPE_BOOLEAN, need_pool, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_query_set_allocation
|
||||
* gst_query_set_allocation_params
|
||||
* @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.
|
||||
* Set the allocation parameters in @query.
|
||||
*/
|
||||
void
|
||||
gst_query_set_allocation (GstQuery * query, guint alignment, guint prefix,
|
||||
guint size, GstBufferPool * pool)
|
||||
gst_query_set_allocation_params (GstQuery * query, guint alignment,
|
||||
guint prefix, guint size, GstBufferPool * pool)
|
||||
{
|
||||
g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_ALLOCATION);
|
||||
|
||||
|
@ -1522,18 +1533,18 @@ gst_query_set_allocation (GstQuery * query, guint alignment, guint prefix,
|
|||
}
|
||||
|
||||
/**
|
||||
* gst_query_parse_allocation
|
||||
* gst_query_parse_allocation_params
|
||||
* @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.
|
||||
* Get the allocation parameters in @query.
|
||||
*/
|
||||
void
|
||||
gst_query_parse_allocation (GstQuery * query, guint * alignment, guint * prefix,
|
||||
guint * size, GstBufferPool ** pool)
|
||||
gst_query_parse_allocation_params (GstQuery * query, guint * alignment,
|
||||
guint * prefix, guint * size, GstBufferPool ** pool)
|
||||
{
|
||||
g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_ALLOCATION);
|
||||
|
||||
|
|
|
@ -330,10 +330,11 @@ void gst_query_set_uri (GstQuery *query, const gchar
|
|||
|
||||
/* allocation query */
|
||||
GstQuery * gst_query_new_allocation (GstCaps *caps, gboolean need_pool);
|
||||
void gst_query_parse_allocation (GstQuery *query, GstCaps **caps, gboolean *need_pool);
|
||||
|
||||
void gst_query_set_allocation (GstQuery *query, guint alignment, guint prefix,
|
||||
void gst_query_set_allocation_params (GstQuery *query, guint alignment, guint prefix,
|
||||
guint size, GstBufferPool *pool);
|
||||
void gst_query_parse_allocation (GstQuery *query, guint *alignment, guint *prefix,
|
||||
void gst_query_parse_allocation_params (GstQuery *query, guint *alignment, guint *prefix,
|
||||
guint *size, GstBufferPool **pool);
|
||||
|
||||
void gst_query_add_allocation_meta (GstQuery *query, const gchar *api);
|
||||
|
|
|
@ -846,6 +846,7 @@ EXPORTS
|
|||
gst_query_new_uri
|
||||
gst_query_parse_allocation
|
||||
gst_query_parse_allocation_meta
|
||||
gst_query_parse_allocation_params
|
||||
gst_query_parse_buffering_percent
|
||||
gst_query_parse_buffering_range
|
||||
gst_query_parse_buffering_stats
|
||||
|
@ -859,7 +860,7 @@ EXPORTS
|
|||
gst_query_parse_seeking
|
||||
gst_query_parse_segment
|
||||
gst_query_parse_uri
|
||||
gst_query_set_allocation
|
||||
gst_query_set_allocation_params
|
||||
gst_query_set_buffering_percent
|
||||
gst_query_set_buffering_range
|
||||
gst_query_set_buffering_stats
|
||||
|
|
Loading…
Reference in a new issue